mIRC Home    About    Download    Register    News    Help

Print Thread
#164285 09/11/06 11:43 PM
L
learn3r
learn3r
L
how to get all the nicks that i kicked
and when i press f2
il get i have kicked nicks : nick , nick , nick , nick

#164286 09/11/06 11:51 PM
C
Crash_N_Burn
Crash_N_Burn
C
The same way you do for count how many kicks you have done you could do for set a var with the nick you kick, and then these nick is writed in a *.txt with all the nick you been kicked.
To view all the nicks all you need to do is creat a alias called F2 { ... }, and all you need is read the .txt file line by line using while command!

Thats all

*

#164287 09/11/06 11:54 PM
Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
or you could just store the nicks in a variable when the kick command is issued, then have the variable echoed when F2 is pressed

#164288 10/11/06 12:21 AM
L
learn3r
learn3r
L
Can i get a code pls?

#164289 10/11/06 01:07 AM
Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
Code:
 on *:kick:#:{
set $+(%,kick.,$chan) $addtok($($+(%,kick.,$chan),2),$knick,32)
}
alias F4 {
$iif($chan,echo $chan $($+(%,kick.,$chan),2))
}
 

Note, if there are a lot of different kicks, you might get an error indicating that the variable length is too long.

#164290 10/11/06 02:54 AM
L
learn3r
learn3r
L
How bout when it has to nicks set..?
and will echo Kicked: None


on ^*:kick:#:{
if ($nick == $me) && ($knick != $me) { set $+(%,kick.,$chan) $addtok($($+(%,kick.,$chan),2),$knick,32) }
}

Last edited by learn3r; 10/11/06 03:35 AM.
#164291 10/11/06 03:22 AM
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
RusselB, you're also including kicks by other people in that.

Crash N Burn, if you do it the way you suggested, there is no need for a variable because you can easily write it directly to the file. Also, the /play command would output the text file without needing a while loop.

Perhaps the best way, so you don't run into the variable length problem would be to use binvars.

#164292 10/11/06 03:55 AM
Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
I missed the fact that he only wanted the kicks that he did.
Here's a re-write
Code:
  on me:*:kick:#:{
set $+(%,kick.,$chan) $addtok($($+(%,kick.,$chan),2),$knick,32)
}
alias F4 {
$iif($chan,echo $chan $iif($($+(%,kick.,$chan),2),$v1,None))
} 

#164293 10/11/06 05:18 AM
L
learn3r
learn3r
L
ok Thanks working perfectly. grin

#164294 10/11/06 03:34 PM
C
Crash_N_Burn
Crash_N_Burn
C
Riamus2 you rigth, i dont even think about it =)!

Thats all

*

#164295 11/11/06 12:02 PM
Joined: Apr 2004
Posts: 217
P
Fjord artisan
Offline
Fjord artisan
P
Joined: Apr 2004
Posts: 217
Something a little different from what you want but..

You could also in your alias (I think you're using the F2 { }) use something such as.

F2 { unset %knicks | doit $* }
doit {
set %knicks %knicks $1
kick $chan $1 "You're kicked! Mwahaha!"

; Remove this line, testing purposes only.
.echo -a :: %knicks
}

With this variation it will set the nicknames into the variable before it actually kicks them. So if you do not successfully kick them by whatever means the nickname will still appear in the %knicks variable.
(There may be a chance of the script halting do to errors aswell.)

%knicks will only return all the nicknames once the looping thru the nicknames is complete. If you echo the variable half-way thru the variable will only contain half the nicknames selected.


Link Copied to Clipboard