If the nick, the fullname of the user who enters to the server matches with one of the nicks which I creadted I want it to be banned.
eg: The words inTXT
*merhaba*
*hale*
*selam*
*husnu*
In matching condition I need a tcl which bans directly. do you the any similar tcl.
the spammer bot's attacking way is like this:
it takes random string in front of or behind the the words in the list and it is delivered to the nicks or full name in this way.
Eg txt :
merhaba
osman
kazim
eg: it took kazim randomly from the line and made the nick kazimxx
other random took osman from the other line and made the realname xosman11
set badnicks [list "*nick1*" "*nick2*" "*nick3*"]
bind join - * ban:bnick
bind nick - * ban:bnick
proc ban:bnick {nick uhost hand chan {nn ""}} {
global badnicks
set bbanmask "*$nick*!*@*"
if {$nn == ""} { set nn $nick }
if {![isbotnick $nick]} {
foreach badnick $badnicks {
if {[string match -nocase $badnick $nn]} {
putserv "KICK $chan $nick :Nickname not allowed on this channel!"
putserv "KICK $chan $nick :Nickname not allowed on this channel!"
break
}
}
}
}