Posted to tcl by dopsy at Sat Aug 28 09:24:08 GMT 2010view raw
- bind pubm -|- "% $botnick ping *" bind:ping
- bind pubm -|- "% $botnick dns *" bind:dns
- bind pubm -|- "% $botnick search *" bind:search
- bind nick -|- * new:bind
-
- proc new:bind {nick uhost hand chan newnick} {
- if { [isbotnick $nick]} {
- catch {
- unbind pubm -|- "% $nick ping *" bind:ping
- unbind pubm -|- "% $nick dns *" bind:dns
- unbind pubm -|- "% $nick search *" bind:search
- }
- bind pubm -|- "% $newnick ping *" bind:ping
- bind pubm -|- "% $newnick dns *" bind:dns
- bind pubm -|- "% $newnick search *" bind:search
- }
- }
-
- proc bind:ping {nickname hostname handle channel text} {
- set text [lrange $text 2 end]
- pPingPubCommand $nickname $hostname $handle $channel $text
- }
- proc bind:dns {nickname hostname handle channel text} {
- set text [lrange $text 2 end]
- pub_dns_lookup_req $nickname $hostname $handle $channel $text
- }
- proc bind:search {nickname hostname handle channel text} {
- set text [lrange $text 2 end]
- ip:search $nickname $hostname $handle $channel $text
- }
-