Kick/Ban Counter For Bot(Modification)

By Archer91SM on May 25, 2011

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 
}

Comments

Sign in to comment.
Jethro   -  May 25, 2011

lol I fail to mention about this:

unset $+(%,blitzz,#) $+(%,blitzzb,#)

Change it to

unset %blitzz*

-Update: I updated my version. Thanks napa for my absentmindedness.

 Respond  
napa182   -  May 25, 2011

rofl @ LOL You sneaky geezer

 Respond  
Jethro   -  May 25, 2011

Yeah I overlooked that. Change > $+(%,blitzzb,#)to

$+(%,blitzz,$event,#)
 Respond  
napa182   -  May 25, 2011

Jethro you forgot to inc the kick var you only have it inc the ban var for both events
or just change the var to inc it as $event instead of the blitzzb

 Respond  
Jethro   -  May 25, 2011

I rethought that after the fact that you used #....so I supposed it was appropriate. :P But using $nick, $wildsite etc...will be a different story. Pardon my ignorance.

 Respond  
napa182   -  May 25, 2011

lol @ 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 can use a dynamic variable set for channels but with a 4 second timer it really dont matter

 Respond  
Archer91SM   -  May 25, 2011

ok Jethro_ tnx for comment :DDD

 Respond  
Jethro   -  May 25, 2011

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.

 Respond  
Archer91SM   -  May 25, 2011

anyone can tall me how to make in this snippet limit for use !kstatus ....thats need me for if someone try flooding with this....sry for my bad english dont speak it everyday :D

 Respond  
Jethro   -  May 25, 2011

It's sort of pointless to include the number one for the incremental count, as it will be increased by one upon trigger for kick and ban event.

 Respond  
Archer91SM   -  May 25, 2011

Thanks for support trill :DDD

 Respond  
trill   -  May 25, 2011

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
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.