I'm using lol.tcl, I've noticed today that the bot reacts on the !ban *!*@* mask, this is what happens:
Code: Select all
<@eXtremer> !ban *!*@*
*** Bot sets mode: +b *!*@*
*** [Banned]: Bot eXtremer nick1 nick2
*** BAN on you detected!!! (*!*@*)
*** eXtremer sets mode: -bo *!*@* Bot
*** You were kicked by Bot (Requested, (18:55/12.08.2008), by eXtremer)
*** Rejoined #channel
Here is the code:
Code: Select all
### !BAN <nick|mask> [time] [reason]
proc pub_lol_ban {nick host hand chan arg} {
set arg [charfilter $arg]
global lol botnick
if {![check $hand $nick $host]} {
if {$lol(silent) == 1 || [checksilent $hand]} {return 0}
puthelp "NOTICE $nick :You need to be identified to use this function. Type .identhelp in the partyline for more info. : \002/msg $botnick id <password>\002 or \002/msg $botnick silent <password>\002 to no more receive this warning."
return 0
}
if {[llength $arg] < 1} {
puthelp "NOTICE $nick :\002Usage:\002 [string trim $lol(cmdchar)]ban <nick|mask> \[time\] \[reason\]"
return 0
}
set who [lindex $arg 0]
if {[strlwr $who] == [strlwr $botnick]} {
puthelp "NOTICE $nick :Yeah right, like I'm going to let you ban ME!"
return 0
}
set ti [lindex $arg 1]
if {[isnumber $ti]} {
set reason [lrange $arg 2 end]
} {
set ti ""
set reason [lrange $arg 1 end]
}
if {$reason == ""} { set reason "requested" }
if {[onchan $who $chan]} {
if { $lol(bantype) == 0 } {
set ipmask [lindex [split [maskhost $who![getchanhost $who $chan]] "@"] 1]
set usermask [lindex [split [getchanhost $who $chan] "@"] 0]
set banmask *!*$usermask@$ipmask
} else {
set banmask [getchanhost $who $chan]
set banmask "*!*[string range $banmask [string first @ $banmask] e]"
}
} else {
set banmask [lindex $arg 0]
if {[string first "!" $banmask] == -1 && [string first "@" $banmask] == -1} {
if {[isnumber [string index $banmask 0]]} {
set banmask *!*@$banmask
} else {
set banmask $banmask*!*@*
}
}
if {[string first "!" $banmask] == -1} { set banmask *!*$banmask }
if {[string first "@" $banmask] == -1} { set banmask $banmask*@* }
}
if {![botisop $chan]} { return 0 }
putserv "MODE $chan +b $banmask"
foreach chanuser [chanlist $chan] {
if {[string match [strlwr $banmask] [strlwr "$chanuser![getchanhost $chanuser $chan]"]] && $chanuser != $botnick } {
if {[nick2hand $chanuser $chan] != "*"} {
if {$hand != [nick2hand $chanuser $chan]} {
if {[matchattr [nick2hand $chanuser $chan] o|o $chan] && ![matchattr $hand o|o $chan]} {
puthelp "NOTICE $nick :Sorry, you must be an operator to ban an operator."
return 0
}
if {([matchattr [nick2hand $chanuser $chan] m|m $chan] || [matchattr [nick2hand $who $chan] b]) && ![matchattr $hand m|m $chan]} {
puthelp "NOTICE $nick :Sorry, you must be a master to ban a master or a bot."
return 0
}
}
}
putkick $chan $chanuser $reason
}
}
switch $ti {
""
{
newchanban $chan $banmask $nick $reason
puthelp "NOTICE $nick :New mask added : $banmask"
}
0
{
newchanban $chan $banmask $nick $reason $ti
puthelp "NOTICE $nick :New mask added permanently : $banmask"
}
default
{
newchanban $chan $banmask $nick $reason $ti
puthelp "NOTICE $nick :New mask added for $ti minutes : $banmask"
}
}
return 0
}