mIRC Home    About    Download    Register    News    Help

Print Thread
kick counter.. #127201 10/08/05 09:27 AM
Joined: Aug 2005
Posts: 11
F
fobiC Offline OP
Pikka bird
OP Offline
Pikka bird
F
Joined: Aug 2005
Posts: 11
i want to do so that if i type !k (nick) the bot kicks and writes i a txt.. then reads what it have written so, every time i kick some one with that command it adds one in the txt.. i tink it should look something like this but i suppose that i'm compleatly wrong... on 1001:text:!k &:#:{ write kick.txt | kick $chan read (kick.txt)$2 }

Re: kick counter.. #127202 10/08/05 09:31 AM
Joined: May 2005
Posts: 106
S
Sleepyfreak Offline
Vogon poet
Offline
Vogon poet
S
Joined: May 2005
Posts: 106
Code:
 
on *:TEXT:!k*:*: {
  /kick # $2 Bye
  /write kicked.txt $2 was kicked from #
}
 


THIS CODE IS UNTESTED


and thats the way the scout leader burns
Re: kick counter.. #127203 10/08/05 09:47 AM
Joined: Apr 2005
Posts: 53
A
Abuser__ Offline
Babel fish
Offline
Babel fish
A
Joined: Apr 2005
Posts: 53
Code:
on 1001:TEXT:!k*:#: {  
  kick $chan $2 Bye $lines(kicked.txt)
  write kicked.txt $2 was kicked from #
}

$lines(kicked.txt) will make the bot read all lines in kicked.txt. That means it will display all lines of kicked nicks. But you don't have to write a file (except if you want to have all kicked nicks loged) Now here is more simple script:
Code:
on 1001:TEXT:!k*:#:{
  inc %kicked
  kick $chan $nick %kicked
}

That "inc" will increase %kicked every time when the command !k is gived.

Re: kick counter.. #127204 10/08/05 09:58 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
$nick refers to the nickname typing !k.

Code:
On @1001:Text:!k &:#: {
  inc %kick
  kick $chan $2 Kick number %kick
}


-Andy

Re: kick counter.. #127205 10/08/05 11:20 AM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
All of the scripts you've been given so far will increase the kick count even if you don't end up kicking the person for some reason, I'd use something like this instead:

Code:
on me:*:kick:#:{ 
  write kick.txt $knick kicked by $iif(%nick,$v1,$me)
  unset %nick
}
on @1001:text:!k &:#:{
  set -u3 %nick $nick
  kick $chan $2 $calc($lines(kick.txt) + 1)
}


New username: hixxy
Re: kick counter.. #127206 11/08/05 09:58 AM
Joined: Apr 2005
Posts: 53
A
Abuser__ Offline
Babel fish
Offline
Babel fish
A
Joined: Apr 2005
Posts: 53
Quote:
$nick refers to the nickname typing !k.


I know..my little mistake grin

Re: kick counter.. #127207 15/08/05 07:50 AM
Joined: Jun 2005
Posts: 30
_
_DuDe_ Offline
Ameglian cow
Offline
Ameglian cow
_
Joined: Jun 2005
Posts: 30
Quote:
All of the scripts you've been given so far will increase the kick count even if you don't end up kicking the person for some reason, I'd use something like this instead:

Code:
on me:*:kick:#:{ 
  write kick.txt $knick kicked by $iif(%nick,$v1,$me)
  unset %nick
}
on @1001:text:!k &:#:{
  set -u3 %nick $nick
  kick $chan $2 $calc($lines(kick.txt) + 1)
}


When would you ever not kick the person.

I reccomend a) using an .ini file, and b) using these scripts
Code:

on *:join:#: { 
if ( $readini(kicks.ini, Users, $nick) == $null ) {
writeini kicks.ini Users $nick 0
}
if ( $readini(kicks.ini, Users, $nick) != $null ) {
var %kick = $readini(kicks.ini, Users, $nick)
notice $nick You have been kicked from this channel %kick times.
}
}

Code:
on @1001:text:!k *:#: {
var %quack = $readini(kicks.ini, Users, $knick)
var %moo = $readini(kicks.ini, Totals, moo)
writeini kicks.ini Totals moo $calc( %moo + 1 )
writeini kicks.ini Users $knick $calc( %quack + 1 )
var %kick = $readini(kicks.ini, Users, $knick)
var %kicks = $readini(kicks.ini, Totals, moo)
kick $chan $2 You have now been kicked out of here %kick times. Chan Kick Total : %kicks
}


** Note: This has not been tested, but I did triple check the code to make sure it looks right.