mIRC Home    About    Download    Register    News    Help

Print Thread
who command #100616 14/10/04 04:42 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
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:
Code:
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,.) }
Re: who command #100617 14/10/04 06:33 PM
Joined: May 2004
Posts: 95
W
wiebe Offline
Babel fish
Offline
Babel fish
W
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

Re: who command #100618 14/10/04 06:51 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
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,.) }
Re: who command #100619 14/10/04 07:05 PM
Joined: May 2004
Posts: 95
W
wiebe Offline
Babel fish
Offline
Babel fish
W
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.

Re: who command #100620 14/10/04 08:30 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
i dont know how to do that.. smirk and i dont understand that snippet


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: who command #100621 14/10/04 08:49 PM
Joined: May 2004
Posts: 95
W
wiebe Offline
Babel fish
Offline
Babel fish
W
Joined: May 2004
Posts: 95
a way to do all channels at once:
Code:
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:
Code:
var %x = 1, %y
while ($comchan($me,%x)) {
  .timer 1 %y WHO $ifmatch
  inc %y 6
  inc %x
}

Re: who command #100622 14/10/04 09:19 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
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,.) }
Re: who command #100623 14/10/04 10:11 PM
Joined: May 2004
Posts: 95
W
wiebe Offline
Babel fish
Offline
Babel fish
W
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.

Re: who command #100624 14/10/04 10:22 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
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,.) }
Re: who command #100625 15/10/04 08:56 AM
Joined: May 2004
Posts: 95
W
wiebe Offline
Babel fish
Offline
Babel fish
W
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.. }"