All pastes #934540 Raw Edit

Mine

public text v1 · immutable
·published 2008-03-08 22:28 UTC
rendered paste body
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 }
        ucheck { ik:ucheck $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" }
proc ik:ucheck {nick chan} {
   global ikadminchan
   foreach com [channels] {
     if {[llength [chanlist $com]] < 4} {
        putserv "PRIVMSG $ikadminchan :\[Part\] Parting $com Reason: [llength [chanlist $com]] users"
        channel remove $com
    }
  }
}