lets say i have this script
Code: Select all
bind pub n !msg s_msg2
proc s_msg2 {nick uhost hand chan arg} {
global botnick
putserv "PRIVMSG $chan : $arg"
}
How can I make it message the channel OR the nickname
!msg #chan test
!msg nick test
:S
Code: Select all
bind pub n !msg s_msg2
proc s_msg2 {nick uhost hand chan arg} {
global botnick
putserv "PRIVMSG $chan : $arg"
}
Code: Select all
bind pub n !msg s_msg2
proc s_msg2 {nick uhost hand chan text} {
set where [lindex [join $text] 0]
set what [join [lrange [split $text] 1 end]]
putserv "PRIVMSG $where : $what"
}