Your script worked great all the times and I can't understand why you have problems...
Also you said that you liked a ban to the IP. You should know that a ban to an IP is different from a ban to userhost.
I made a script which the 3rd time bans the users IP
(the unban with chanserv doesn't work for that
)
If you want his host replace:
banip $1 $2 $remove(%tmp,@)
with:
ban $1-2 11 | kick $1-2 your reason
and remove alias banip and "on DNS" (with group too).
Take a look:
on @*:TEXT:*:#test:{ if (($nick !isop #) && ([censored] isin $1-)) { rl # $nick } }
alias -l rl {
var %tmp = $remove($address($2,2),!,*)
set -u3600 %rl. [ $+ [ %tmp ] ] $calc( %rl. [ $+ [ %tmp ] ] + 1)
if ( [ %rl. [ $+ [ %tmp ] ] ] == 1) { .notice $2 Please don't! - this is your first warning! }
elseif ( [ %rl. [ $+ [ %tmp ] ] ] == 2) { ban -u60 $1-2 11 }
else { banip $1-2 $remove(%tmp,@) }
}
alias -l banip {
set %banip.chan $1 | set %banip.nick $2 | set %banip.host $3 | .enable #banip | .dns $2
; *** Here you can add a timer (.timer 1 [sec] .disable #banip), so if you have lag to
; disable the #banip group.
}
#banip off
on *:DNS: {
if ($dns(0) == 0) { var %ip = *!*@ $+ $iaddress | goto kickban }
if (($dns(0) == 1) && (%banip.host == $dns(1).addr)) { var %ip = *!*@ $+ $raddress | goto kickban }
; *** I don't do know if there is any possibility $dns(0) returns a number > 1 :(
goto end
:kickban
mode %banip.chan +b %ip
if (%banip.nick ison %banip.chan) { kick %banip.chan %banip.nick You were warned. You have broken the rules one too many times! }
:end
unset %banip.* | .disable #banip
}
#banip end
It worked great...