|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
When i join a channel my script perform a /who on that channel, how can i make it so it dont flood it self out when it join many channels at once ? the code i have looks like:
alias whoall-cline {
set %cline-comchan $comchan($me,0)
set %cline-count 0
:start
inc %cline-count 1
if ($comchan($me,%cline-count)) { who $comchan($me,%cline-count) }
if (%cline-count < %cline-comchan) { goto start }
}
any way i can slow that down a bit, but still perform a who on all channels i joined ? :tongue:
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: May 2004
Posts: 95
Babel fish
|
Babel fish
Joined: May 2004
Posts: 95 |
it depends a bit on the size of the channels you are in and the connection you are on. you may be able to use "WHO #chan1,#chan2,#chan3" etc. in 1 go, if supported by the irc server. if you need a script or some inspiration to script it, there is an "IAL update" snippet or mircscripts.org.
wiebe
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
that wasnt my question here, but thnx anyway..
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: May 2004
Posts: 95
Babel fish
|
Babel fish
Joined: May 2004
Posts: 95 |
you are doing "WHO #chan" for every channel, while this may not be needed. get all chans in a variable, and who them all at once. and may i suggest you use while instead of goto to loop. to slow things down, insert a timer command with increasing delay.
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
i dont know how to do that..  and i dont understand that snippet
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: May 2004
Posts: 95
Babel fish
|
Babel fish
Joined: May 2004
Posts: 95 |
a way to do all channels at once:
var %x = 1, %y
while ($comchan($me,%x)) {
var %y = $addtok(%y,$ifmatch,44) | inc %x
}
if (%y) { WHO %y }
another way, each channel seperate with 6 seconds delay in between:
var %x = 1, %y
while ($comchan($me,%x)) {
.timer 1 %y WHO $ifmatch
inc %y 6
inc %x
}
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
* /timer: invalid parameters
thats is what i get on that "timed who", and the line looks like: .timer 1 %y WHO $ifmatch
the first one it took 3 minutes befor a mesg came true, so that didnt work bether then my code, the only thing is that didnt flood off, but a bit to long time to wait for a message to get true :tongue:
Last edited by sparta; 14/10/04 09:28 PM.
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: May 2004
Posts: 95
Babel fish
|
Babel fish
Joined: May 2004
Posts: 95 |
sorry my mistake, make that line var %x = 1, %y = 0
im not sure what you mean about the 3 minute thing, the 1st way which does all channels at once should be almost instant.
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
OP
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
i testad to join 14 channels at the same time, then it took 3 minutes befor it sended anything to a nick in /msg..
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: May 2004
Posts: 95
Babel fish
|
Babel fish
Joined: May 2004
Posts: 95 |
that would be happen if you run it too much. a good thing to add i see now is "if ($ialchan(channel..).ial) { add it.. }"
|
|
|
|
|