mIRC Homepage
Posted By: sparta who command - 14/10/04 04:42 PM
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:
Posted By: wiebe Re: who command - 14/10/04 06:33 PM
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
Posted By: sparta Re: who command - 14/10/04 06:51 PM
that wasnt my question here, but thnx anyway..
Posted By: wiebe Re: who command - 14/10/04 07:05 PM
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.
Posted By: sparta Re: who command - 14/10/04 08:30 PM
i dont know how to do that.. smirk and i dont understand that snippet
Posted By: wiebe Re: who command - 14/10/04 08:49 PM
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
}
Posted By: sparta Re: who command - 14/10/04 09:19 PM
* /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:
Posted By: wiebe Re: who command - 14/10/04 10:11 PM
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.
Posted By: sparta Re: who command - 14/10/04 10:22 PM
i testad to join 14 channels at the same time, then it took 3 minutes befor it sended anything to a nick in /msg..
Posted By: wiebe Re: who command - 15/10/04 08:56 AM
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.. }"
© mIRC Discussion Forums