Sintaxs:
!kcounter restart - Restart a counter
!kstatus - See Total Status
Only bots can use this snippet ..... count a kicks and bans on channel :DDD
This is All
Snippet is Modification
Orginal Snippet: http://www.hawkee.com/snippet/6441/
on *:text:!kcounter restart:#: {
if ($nick isop $chan) {
set %blitzz 0 | set %blitzzb 0 | msg $chan Kick/Ban Counter is restarted now totalstats is zero.
}
else { notice $nick Error: You can`t use this command $nick reserved for operators. }
}
on *:text:!kstatus:#: {
if ($nick isop #) { msg $chan 4Total kick/ban status on channel $chan $+ : %blitzz Kick(s). - %blitzzb Ban(s). }
}
on *:kick:#: {
inc %blitzz 1
.msg $chan 4Opsss....someone is kicked from chanel #! I all write and remember :D
}
on *:BAN:#: {
inc %blitzzb 1
}
Archer91SM, the code trill has shown you already has a dynamic trigger control variable for a delay of 4 seconds, but it doesn't account for the user that triggers it, so people can still flood it. I have edited the code here:
on !*:kick:#:kbcounter
on !*:ban:#:kbcounter
on $*:text:/^!k(counter restart|status)$/iS:#:kbcounter
alias -l kbcounter {
if $event = text {
if $nick isop # && !$($+(%,f,#),2) {
inc -u4 $+(%,f,#)
if $regml(1) = counter restart {
unset %blitzz*
msg # Kick/Ban Counter is restarted now totalstats is zero.
}
else {
msg # 4Total kick/ban status on channel # $+ : $iif($($+(%,blitzz,kick,#),2),$v1,0)$&
Kick(s). - $iif($($+(%,blitzz,ban,#),2),$v1,0) Ban(s).
}
}
}
else inc $+(%,blitzz,$event,#)
}
I wouldn't recommend dynamic variable for a trigger control, because you can still get flooded if they use a bot to bombard you with different proxies, various idents and nicknames.
you could make it so it ill say the right count on the channel if you use this in more then 1 channel that is..
on $*:text:/^!k(counter restart|status)$/iS:#: {
if ($nick isop # && !$($+(%,f,#),2)) { inc -u4 $+(%,f,#)
if ($regml(1) = counter restart) {
unset $+(%,blitzz,#) $+(%,blitzzb,#)
msg # Kick/Ban Counter is restarted now totalstats is zero.
}
if ($regml(1) = status) {
msg # 4Total kick/ban status on channel # $+ : $iif($($+(%,blitzz,#),2),$v1,0)$&
Kick(s). - $iif($($+(%,blitzzb,#),2),$v1,0) Ban(s).
}
}
}
on *:kick:#:inc $+(%,blitzz,#) 1
on *:BAN:#:inc $+(%,blitzzb,#) 1