set replychan "#UT"
set yourmsg "I collect stats for this channel and they can be viewed here: http://www.staticbox.com/ut/"
bind pub m "!stats" crappy:reply
bind pub m "!poop" crappy:reply
proc crappy:reply { nickname hostname handle channel arguments } {
global replychan
global yourmsg
puthelp "PRIVMSG $replychan :$yourmsg"
}
how could i make it have a different reply on different channels?
by specifying different replies for different channels (possibly in array or list) and showing the appropriate reply depending on 'channel' parameter of proc crappy:reply
set reply(#foo) "got this on channel #foo"
set reply(#bar) "that was said on #bar"
bind pub m !one smart:reply
bind pub m !two smart:reply
proc smart:reply {n u h c t} {
foreach {chan reply} [array get ::reply] {
if [string equal -nocase $chan $c] {
puthelp "privmsg $c :$reply"; return
}
}
}