mIRC Home    About    Download    Register    News    Help

Print Thread
#35208 09/07/03 08:44 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
alias mo {
var %i 0
var %nicks
:next
inc %i 1
if ($nick($chan,%i) == $me) {
inc %i
}
if ($nick isop $chan) {
goto next
}
if ($nick($chan,%i) == $null) && ($len(%nicks) != $null) {
mode # +oooooo %nicks | halt
}
if (%i >= 6) {
mode # +oooooo %nicks
%nicks = ""
}
%nicks = %nicks $nick($chan,%i)
goto next
}

this is a command to mass op,it works but its extremely slow, anyone know why frown ?
p.s its not my internet


new username: tidy_trax
#35209 09/07/03 09:12 PM
Joined: Mar 2003
Posts: 54
J
Babel fish
Offline
Babel fish
J
Joined: Mar 2003
Posts: 54
Use the search feature. There's a few mass op snippets available already that'll work faster than this.

(Hint: A while loop would be more ideal for this situation.)

#35210 09/07/03 09:14 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
i tried while loops many times but decided goto loops are faster.
also i can easily make a fast mass using $snicks but i want 1 with a loop so people on my user levels can use it.


new username: tidy_trax
#35211 09/07/03 09:20 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Then you decided wrong because goto loops are not faster.

#35212 09/07/03 09:31 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
alias mo {
var %i 1
while (%i <= $nick($chan,0)) {
if ($nick($chan,%i) !isop $chan) {
mode # +o $nick($chan,%i)
}
inc %i
}
}
that goes slower than my goto loop and i dont see how that while loop could be any faster


new username: tidy_trax
#35213 09/07/03 09:42 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Umm are you for real? Who said anything about changing all of the code in the loop in order to make it a while loop? And also why does your original code use $nick? I don't recalled $nick being defined within an alias...

#35214 09/07/03 10:55 PM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
This code by blue-elf makes mass op/voice faster.

#35215 09/07/03 11:40 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
massmodes:

Code:
; usage: /massmode &lt;chan&gt; &lt;+/-|mode&gt;
/massmode {
  var %chan = $$1, %nick = 1, %nicks
  while ($nick(%chan, %nick)) {
    var %nicks = $addtok(%nicks, $ifmatch, 32)
    if ($numtok(%nicks, 32) == $modespl) || (%nick == $nick(%chan, 0)) {
      /mode %chan $+($left($$2, 1),$str($right($$2, 1),$modespl)) %nicks
      /unset %nicks
    }
    /inc %nick
  }
}


Less alggy. Uses as many mode changes as the server can handle, and limits itself. If the server accepts 3 mode changes at a tiome but 5 ppl need to be set, does it in 2 commands.


-KingTomato
#35216 10/07/03 06:53 AM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
thats the 1 i said i can make but dont want.


new username: tidy_trax
#35217 10/07/03 06:54 AM
Joined: May 2003
Posts: 2,265
P
pheonix Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
thanx smile


new username: tidy_trax

Link Copied to Clipboard