#by wiebe @ QuakeNet
#requires lusers.tcl



#help lusers pub
bind pubm fvlomn|fvlomn "% ${botnet-nick} help lusers" c_lusers:help:pub

proc c_lusers:help:pub { nick uhost handle chan text } {
  lappend output "Usage: lusers"
  lappend output "Shows lusers output from the bot's server."
  if { [catch {set x [cnotice $nick $output]} error] || !$x } {
    foreach t $output { puthelp "NOTICE $nick :$t" }
  }
  putloglev c $chan "[lindex [split $text] 1]: $nick $uhost $handle $chan [join [lrange [split $text] 2 end]]"
}



#lusers
bind pubm fvlomn|fvlomn "% ${botnet-nick} lusers" c_lusers:pub

proc c_lusers:pub { nick uhost handle chan text } {
  if { [catch {lusers:pub $nick $uhost $handle $chan text} error] } {
    putlog "ERROR using lusers.tcl, perhaps you have not loaded it?"
    error $error
  }
  putloglev c $chan "[lindex [split $text] 1]: $nick $uhost $handle $chan [join [lrange [split $text] 2 end]]"
}

