bind pub -|- mcps spb_decrypt
bind pub -|- +OK spb_decrypt


proc spb_decrypt {nick host hand chan args} {
  global blowkey procs
  set cmdline [decrypt $blowkey($chan) $args]
  putlog "key = $blowkey($chan)"
  putlog "decoded line = $cmdline" 
  if { [string index $cmdline 0] != "!" } { return }
  set dcmd [lindex $cmdline 0]
  set darg [lrange $cmdline 1 end]
  foreach eachproc $procs {
    set eachproc [split $eachproc :]
    if { $dcmd == [subst [lindex $eachproc 0]] } {
      [lindex $eachproc 1] $nick $uhost $hand $chan $darg
      return
    }
  }
}