TCL MSG Filter

MSG Filter

# MSG Filter v1.1

set nomsg(ignflags) "n"

set nomsg(filter) {
   "NickName"
   "NickName1"
   "#Channel"
   "#Channel1"
}
bind dcc -|- msg nomsg:filter
proc nomsg:filter {hand idx arg} {
global nomsg
set victime [string tolower [lindex $arg 0]]
foreach filter $nomsg(filter) {
   if {($victime == $filter) && ![matchattr $hand $nomsg(ignflags)|]} {
      putdcc $idx "You Don`t Have AutoriZatioN to Use .msg Those NickNames!!"
      return 0
   }
}
putserv "PRIVMSG $victime :[lrange $arg 1 end]"
putdcc $idx "Msg to [lindex $arg 0]: [lrange $arg 1 end]"
return 1
}

putlog "MSG Filter v1.1 by Neon loaded!"