All pastes #923455 Raw Edit

Untitled

public text v1 · immutable
#923455 ·published 2008-02-29 15:57 UTC
rendered paste body
# --- Procs ---
proc tsr:echo:msgm {unick uhost hand text} {tsr:echo:pubm $unick $uhost $hand "MSG" $text}
proc tsr:echo:pubm {unick uhost hand channel text} {
 global echo echolist echochan echochannel echostrip echofilters listen
 if {$channel!="MSG"} {
  foreach tags [array names echolist] {set tag ""
   foreach mask $echolist($tags) {if {[string match $mask [string tolower $unick!$uhost]]} {set tag $tags; continue}}
   if {$tag!=""} {
    if {[lsearch [string tolower $listen($tag)] [string tolower $channel]]!=-1} {
     if {$echofilters($tag)} {set filters [tsr:echo:checkfilter [string tolower $tag] [string tolower [tsr:echo:strip:all $text]]]} else {set filters 1}
     foreach chans $echochan($tag) {if {$echostrip($chans)} {set text [tsr:echo:checkstrip $echostrip($chans) $text]}}
     if {$filters} {
      set put $echo(output); set put [str $put msg $text]; set put [str $put chan $channel]; set put [str $put nick $unick]; set put [str $put tag $tag]
      foreach echos $echochan($tag) {if {$echochannel([string tolower $echos])} {putchan $echos $put}}
     }
    }
   }
  }
 }
}