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;)
}
}
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.