package require http bind pubm - "*" bind:pubm proc bind:pubm {nick userhost handle chan text} { global botnick iktag ikadminchan if {[regexp -nocase "(^(All|$iktag|$botnick) (.*?))" "$text"] == 1} { if {[isop $nick $ikadminchan] == 1} { set text [lrange "$text" "1" "end"] set com [lindex "$text" "0"] switch $com { channels { ik:channels $nick $chan } help { ik:help $nick $chan } msg { ik:msg [lindex "$text" "1"] [lrange "$text" "2" "end"] } } } } } proc ik:help {nick chan} { puthelp "NOTICE $nick :Help Doc Information" } proc ik:channels {nick chan} { putserv "PRIVMSG $chan :Currently on: [channels]" } proc ik:msg {target message} { putserv "PRIVMSG $target :$message" }