|
Joined: Oct 2006
Posts: 342
Fjord artisan
|
OP
Fjord artisan
Joined: Oct 2006
Posts: 342 |
how to get all the nicks that i kicked and when i press f2 il get i have kicked nicks : nick , nick , nick , nick
|
|
|
|
Joined: Jan 2006
Posts: 61
Babel fish
|
Babel fish
Joined: Jan 2006
Posts: 61 |
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
*
The practice do the Master...
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
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
|
|
|
|
Joined: Oct 2006
Posts: 342
Fjord artisan
|
OP
Fjord artisan
Joined: Oct 2006
Posts: 342 |
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
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.
|
|
|
|
Joined: Oct 2006
Posts: 342
Fjord artisan
|
OP
Fjord artisan
Joined: Oct 2006
Posts: 342 |
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.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
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.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
I missed the fact that he only wanted the kicks that he did. Here's a re-write on me:*:kick:#:{
set $+(%,kick.,$chan) $addtok($($+(%,kick.,$chan),2),$knick,32)
}
alias F4 {
$iif($chan,echo $chan $iif($($+(%,kick.,$chan),2),$v1,None))
}
|
|
|
|
Joined: Oct 2006
Posts: 342
Fjord artisan
|
OP
Fjord artisan
Joined: Oct 2006
Posts: 342 |
ok Thanks working perfectly. 
|
|
|
|
Joined: Jan 2006
Posts: 61
Babel fish
|
Babel fish
Joined: Jan 2006
Posts: 61 |
Riamus2 you rigth, i dont even think about it =)!
Thats all
*
The practice do the Master...
|
|
|
|
Joined: Apr 2004
Posts: 218
Fjord artisan
|
Fjord artisan
Joined: Apr 2004
Posts: 218 |
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.
Live to Dream & Dream for Life
|
|
|
|
|