Kicked count

By Andyhighton on Feb 20, 2009

Just thought it would be neat to be able to see how many times each person has been kicked in the channels i go in, so i wrote this.

!kicked - To see how many times you have been kicked
!kicked Nick - To see how many times another user has been kicked.

A little shabby, but im still getting used to the basics.. Lol.

on *:kick:#: {
  if ($knick == $me) { halt }
  if ($read(kicklist.txt, s, $knick)) {
    set %kicklist.count $read(kicklist.txt, s, $knick)
    inc %kicklist.count
    write -s $knick kicklist.txt $knick %kicklist.count
    unset %kicklist.count
  }
  else { write kicklist.txt $knick 1 }
}
on *:text:!kicked:#: { 
  if ($read(kicklist.txt, s, $nick)) {
    msg $chan 5 $nick - you have been kicked4 $read(kicklist.txt, s, $nick) times while i have been here.
  }
  else { msg $chan 5 $nick - you have not been kicked while i have been here. Would you like to be? 4;) 
  }
}
on *:text:!kicked*:#: {
  if ($2 == $me) { halt }
  If ($read(kicklist.txt, s, $2)) {
    msg $chan 5 $2 - has been kicked4 $read(kicklist.txt, s, $2) times while i have been here.
  }
  else { msg $chan 5 $2 - has not been kicked while i have been here. Would you like that to change? 4;) 
  }
}

Comments

Sign in to comment.
dashh   -  Feb 22, 2009

ok's sorry xD

 Respond  
slacker   -  Feb 21, 2009

@ dashh if you are going to post rewrites for help use the code tags

code here

it makes it less hard on the eyes.

 Respond  
tv3636   -  Feb 21, 2009

You could just use dynamic variables as well, for example:

on *:kick:#: { inc % $+ $knick }

Creates/increases the variable for that nickname.
you can do

on *:NICK:{ 
if (% $+ $nick != $null) { 
set % $+ $newnick % $+ $nick
unset % $+ $nick 
}
}

to account for nick changes that way

 Respond  
dashh   -  Feb 21, 2009

mmm.. text file make the kick slower.

Windows -h and aline is the most fast way. or if u prefered hash tables xD.

  if ($read(kicklist.txt, s, $knick)) {
    set %kicklist.count $read(kicklist.txt, s, $knick)
  if ($read(kicklist.txt, s, $knick)) {
    set %kicklist.count $v1

or

  if ($read(kicklist.txt, s, $knick)) {
    set %kicklist.count $calc($v1 +1)
;  %kicklist.count = $v1 + 1

u dont need repeat the same routine xD

but is very useful snippet, nice job.

 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.