bind pub - !site website_disp
proc website_disp {nick host handle channel testes} {
switch -- $channel {
"#techhelpwithjeff" { putserv "PRIVMSG $channel :$nick, our website is http://www.techhelpwithjeff.com/" }
"#sams-tech" { putserv "PRIVMSG $channel :$nick, our website is http://www.smartysamscomputerbuilds.com/" }
"#thenerdtv" { putserv "PRIVMSG $channel :$nick, our website is http://www.thenerdtv.com/" }
default { putserv "PRIVMSG $channel :$nick, I do not have a site defined for this channel yet" }
}
return 1
}
[switch] makes sense here, as those nested if/elseif/elseif/etc look horrible. You also want to make sure to return 1 from this "pub" procedure. If this were a glob matched "pubm" bind instead, a return of 0 would be used.