- Code:
-
# Says something on any channel
# Usage: !say <chan> <what>
proc pub:say {nick host hand chan arg} {
global botnick
if {![auth:check $hand]} {return 0}
if {[llength $arg] < 2} {
notice $nick "Usage: !say <chan> <what>"
return 0
}
set thechan [lindex [split $arg] 0]
set what [lrange [split $arg] 1 end]
if {![onchan $botnick $thechan]} {
notice $nick "I'm not on that channel."
return 0
}
puthelp "PRIVMSG $thechan :$what"
notice $nick "Said to $thechan: $what"
putcmdlog "<<$nick>> !$hand! ($thechan) !say $what"