mIRC Home    About    Download    Register    News    Help

Print Thread
#48214 09/09/03 11:27 AM
Joined: Sep 2003
Posts: 93
T
Talea Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Sep 2003
Posts: 93
With the new mode -k that can be used - I wish to update my autokickers however this kick counter does not work:

[Kick Counter]
alias kick {
if ( %kick.number == $null ) {
set %kick.number 1
}
kick $1- $+ %kick.number
inc %kick.number
}

I know why but I don't know how to proceed to create a new one with the new mode -k for mirc 6.1...

Suggestions?

Thanks

#48215 09/09/03 12:10 PM
Joined: Dec 2002
Posts: 397
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Dec 2002
Posts: 397
here is a better little script that would count other ppls kicks too

Code:
alias k {
if (!%kick.#) { set %kick.# 1 }
else {
inc %kick.# 1 
notice $1 you are kicked user %kick.#
}
on *:kick:*: {
if (!%kick.#) { set %kick.# 1 }
else {
inc %kick.# 1 
notice $1 you are kicked user %kick.#
}


untested and im sleepy if you dont like it change what you want :tongue:


Need amazing web design for low price: http://www.matrixn3t.net
#48216 09/09/03 01:00 PM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
No need for the if statements, just /inc away... Also -- your code would count each user that you kick twice and users other ppl kick once.

Also -- what is this mode -k? Using -k on a channel sets a key. I think you are referring to using /ban -k. In that case, you have two options:

1. rewrite your alias to inc a counter when you do a /ban
2. use the on kick event

Code:
on *:KICK:#: {
  [color:green]; if you wanna count all kicks and not just your own, remove this line[/color]
  if ($nick != $me) halt
  [color:green]; increment the counter (channel specific!)[/color]
  inc %kickcount. [ $+ [ $chan ] ]
  [color:green]; harass the user[/color]
  [color:green]; remove the blue word if you removed the other line[/color]
  .notice $knick You are person number %kickcount. [ $+ [ $chan ] ] I have [color:blue]seen[/color] kicked from $chan !
}


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#48217 09/09/03 02:10 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Quote:

No need for the if statements.

..and what is that?
An if statement?
A figment of my imagination?
An hallucination?

#48218 09/09/03 02:16 PM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
There is a HUGE difference between ATMA's and mine. Mine checks who does the kicking. ATMA's checks if a variable exists, if not it creates it, else it increments it. You can just increment it no matter what. If the variable does not exist and you increment it, it will be incremented as if it had the value 0. Mine is necessary if you wanna count only your own kicks (unless you use the ME prefix), his is completely obsolete.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#48219 09/09/03 02:23 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Yes, I know how they both work, just thought I'd ask. No worried dude. smile
I don't think ATMA's would work anyway, would it?
Didn't think you could use
on *:KICK:*: {
What does that * represent?
I thought you could only use
on *:KICK:#: {

#48220 09/09/03 06:08 PM
Joined: Sep 2003
Posts: 93
T
Talea Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Sep 2003
Posts: 93
Thanks for all the posts, I think I can create the new kick counter now - I prefer not to .notice each user they have been kicked - they will see it in the status window (for the reason etc) smile

#48221 09/09/03 06:26 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Quote:

they will see it in the status window (for the reason etc)

Not necessarily, not if you have an on KICK event that goes a little like.
Code:
on ^1:KICK:#: {
  haltdef
}

I don't see why anyone would want to do that though, unless if they do do that, add echo -s You was kicked from $chan just above the haltdef.

#48222 09/09/03 08:22 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
You can also do similar to the /ban alias you had.
Code:
alias kick {
  inc %kick.number
  !kick $iif(#* !iswm $1,$$chan) $1- %kick.number
}
alias ban {
  if -*k* iswm $1 { inc %kick.number | !ban $1- %kick.number }
  else { !ban $1- }
}
I mofified the /kick alias slightly smile

#48223 10/09/03 11:30 AM
Joined: Sep 2003
Posts: 93
T
Talea Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Sep 2003
Posts: 93
Thanks for the little update... I've pretty well had set up a new kick counter however the coding in yours is a tad smaller - the smaller the code (that works) the better. smile


Link Copied to Clipboard