Code: Select all
# Channel flag.
setudef flag monitorText
# Subchannel.
set subchannel #lineups
# Bind all text in all channels.
bind pubm - * monitorProc
proc monitorProc {nick uhost hand chan text} {
global subchannel
# Check channel flag.
if {![channel get $chan monitorText]} {
return 0
}
# Check text for matching values.
if { [string match "*chat with me*" $text] } {
# Send matching text to subchannel.
putserv "PRIVMSG #chatworld :$text"
}
}
For instance:
<Yamaha> (Tony): won't you chat with me?
Will relay it as:
<Bot> won't you chat with me?