# Channel flag.
setudef flag monitorText2
# Subchannel.
set subchannel2 #channeltolisten
# Bind all text in all channels.
bind pubm - * monitorProc2
proc monitorProc2 {nick uhost hand chan text} {
global subchannel2
# Check channel flag.
if {![channel get $chan monitorText2]} {
return 0
}
# Check text for matching values.
if {[string match "*(Source:*" $text] } {
# Send matching text to subchannel.
putserv "PRIVMSG GianniInfantino :msg #channeltorelayto $text"
}
}
But in practice what I'm looking for is a script that will ignore certain wildcards/texts - and relay every message that does not match that wildcard/text.
### Set the channel to relay all qualifying text to! ###
set relayto #channeltorelayto
### Set any exempt masks for text that will not be relayed ###
### One exempt word, phrase, or mask per line! ###
set relayxmpt {
} ;## End of exempt masks setting ##
# Channel flag for all monitored channels.
# To flag a channel to be monitored, do: .chanset #yourchannel +relayText
setudef flag relayText
# Bind all text in all channels.
bind pubm - * relayMonitor
# Clean and split any exempt masks.
set relayxmpt [split [string trim $relayxmpt] "\n"]
proc relayMonitor {nk uh hn ch tx} {
# Check channel flag.
if {![channel get $ch relayText]} { return 0 }
# Check text for matching exempt.
foreach xmpt $::relayxmpt {
if {[string match -nocase $xmpt $tx]} { return 0 }
}
# Send any qualifying text to $relayto channel.
puthelp "PRIVMSG $::relayto :<$nk@$ch> $tx"
return 0
}
### Set any exempt masks for text that will not be relayed ###
### One exempt word, phrase, or mask per line! ###
Example: