#by wiebe @ QuakeNet
#requires censor.tcl



#help censor msg

bind msgm mn "help censor" c_censor:help:msg

proc c_censor:help:msg { nick uhost handle text } {
  lappend output "Usage: censor <add|del|search>"
  lappend output "Channel settings: +censor +censor-pm +censor-instagib +censor-op +censor-hop +censor-voice and censor-bantime"
  if { [catch {set x [cnotice $nick $output]} error] || !$x } {
    foreach t $output { puthelp "NOTICE $nick :$t" }
  }
  putcmdlog "($nick!$uhost) !$handle! $text"
}




#censor msg
bind msg mn censor c_censor:msg

proc c_censor:msg { nick uhost handle text } {
  if { [catch {censor:pub $nick $uhost $handle chan $text} error] } {
    putlog "ERROR using censor.tcl, perhaps you have not loaded it?"
    error $error
  }
  return 1
}

