# text input channel
set vRelayChanInput "#eggtcl"
# text output channel
set vRelayChanOutput "#tcl"
# text word/phrase to match
set vRelayText "myspace"
bind PUBM - * pRelayCheckText
proc pRelayCheckText {nick uhost hand chan text} {
global vRelayChanInput vRelayChanOutput vRelayText
if {[string equal -nocase $vRelayChanInput $chan]} {
if {[string match -nocase *${vRelayText}* $text]} {
if {[isop $nick $chan]} {
if {[validchan $vRelayChanOutput]} {
if {[botonchan $vRelayChanOutput]} {
putserv "PRIVMSG $vRelayChanOutput :$nick said $text in $chan"
}
}
}
}
}
return 0
}
Thanks, it works great. Only question I have is: does eggdrop support foreign characters or no? Sometimes the string will end early if it encounters specific characters.