Code: Select all
"b" {
if {![check:auth $nick $hand]} { return 0 }
if {[lindex [split $arg] 1] == ""} {
puthelp "NOTICE $nick :SYNTAX: $fzcom(trigger)b <nick1/ban1,nick2/ban2,..> \[reason\] \[bantime\]."
return 0
}
set knicks [split [lindex [split $arg] 1] ,]
if {[llength [lrange [split $arg] 2 end]] == 1} {
if {[string is integer [lindex [split $arg] end]]} {
set kreason "Requested by $nick."
set btime "[lindex [split $arg] end]"
} else {
set kreason "($nick) [join [lrange [split $arg] 2 end]]"
set btime "$fzcom(btime)"
}
} elseif {[llength [lrange [split $arg] 2 end]] > 1} {
if {[string is integer [lindex [split $arg] end]]} {
set kreason "($nick) [join [lrange [split $arg] 2 end-1]]"
set btime "[lindex [split $arg] end]"
} else {
set kreason "($nick) [join [lrange [split $arg] 2 end]]"
set btime "$fzcom(btime)"
}
} else {
set kreason "Requested by $nick."
set btime "$fzcom(btime)"
}
foreach knick $knicks {
if {[string match -nocase *!*@* $knick]} {
if {![string match -nocase $knick $botname]} {
newchanban $chan $knick $nick "$kreason" $btime
lappend ibanned $knick
} else {
puthelp "NOTICE $nick :Can't outsmart me, I won't ban myself."
}
} else {
if {![isbotnick $knick] && ![matchattr [nick2hand $knick] mo|mo $chan]} {
if {[onchan $knick $chan]} {
newchanban $chan [set bmask [cmdbtype $knick![getchanhost $knick $chan] $fzcom(btype)]] $nick "$kreason" $btime
lappend ibanned "$knick ($bmask)"
} else {
puthelp "NOTICE $nick :$knick is not on $chan."
}
} else {
puthelp "NOTICE $nick :Can't outsmart me, no banning a master."
}
}
}
if {[info exists ibanned]} {
foreach wribanned [wordwrap [join $ibanned ,] 70 ,] {
puthelp "NOTICE $nick :Added $wribanned to my $chan banlist."
}
flushmode $chan
}
return 0
}
when i do .b nick msg time or .b nick msg the kick reason its always the ban time instead of the msg i put on it