mIRC Home    About    Download    Register    News    Help

Print Thread
mass op/deop #146431 04/04/06 10:31 AM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
yeah yeah i know it isnt nice....
and i aint using it for some stupid things...

i gots this code:

Code:
 

masso {
  if (# == $null)  { .echo -a You must use this command in a channel window. | halt }
  if ($me !isop #) { .echo -a You're not a channel operator! | halt }
  if ($nick(#,0) == 1) { .echo -a You're alone in this channel! | halt }
  else {
    tokenize 32 $chr(42)
    if ($chr(42) isin $1) || ($chr(63) isin $1) {
      var %a = 0
      while (%a <= $nick($chan,0)) {
        inc %a
        if ($nick($chan,%a) !isop $chan) && ($1 iswm $nick($chan,%a)) { var %n = $nick($chan,%a) %n }
        if ($gettok(%n,0,32) == 6) { mode $chan +oooooo %n | unset %n }
      }
      if (%n) { mode $chan +oooooo %n }
    }
    elseif ($1) {
      mode $chan +oooooo $1-
    }
  }
}

 


thing is that it is limited by 6
but i want it to use $modespl so it is limited by network

anyone willing to re-make it (just in that part) ?
coz i dunno what should it do...
to set $modespl in variable or ???

Last edited by raZOR; 04/04/06 10:33 AM.

IceCapped
Re: mass op/deop #146432 04/04/06 11:29 AM
Joined: Feb 2005
Posts: 681
M
mIRCManiac Offline
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681

Re: mass op/deop #146433 04/04/06 11:46 AM
Joined: Oct 2005
Posts: 126
PhyxiuS Offline
Vogon poet
Offline
Vogon poet
Joined: Oct 2005
Posts: 126
...
Code:
mdeop {
  var %chan = $active
  if ($me isop %chan) { 
    set %i 1
    set %Var.Index 1
    set %Var.Num 5 
    :start
    set %Var.User $opnick(%chan,%i)
    if (%Var.User == $null) { 
      if ($me isop %chan) { raw -q mode %chan -ooooo %Var.Nick }
      unset %Var.Nick %i %Var.Index %Var.Num 
      halt 
    }
    if (%Var.User == $me) { inc %i 1 | goto start }
    if (%Var.User != $me) {
      set %Var.Nick %Var.User %Var.Nick
      if (%Var.Index == %Var.Num) { 
        if ( $me isop %chan ) { raw -q mode %chan -ooooo %Var.Nick }
        unset %Var.Nick
        set %Var.Index 1 
        inc %i 1 
        goto start
      }
      inc %Var.Index 1
    }  
    inc %i  1
    goto start
  }
}


If you mess with the best, u will die like the rest !
Re: mass op/deop #146434 04/04/06 11:56 AM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
@ mirc maniac
but i dont want to have to type /mdeop #chan something
me just wants plain alias for active chan :P

@ PhyxiuS

you dont use $modespl :P

Last edited by raZOR; 04/04/06 11:57 AM.

IceCapped
Re: mass op/deop #146435 04/04/06 12:08 PM
Joined: Feb 2005
Posts: 681
M
mIRCManiac Offline
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
Code:
alias mdeop { 
  if (# !ischan) echo -ac info * Must be typed from a channel window.
  elseif ($nick(#,0) == 1) echo -ac info * You're alone on $+(#,.)
  elseif ($me !isop #) echo -ac info * You're not opped on $+(#,.)
  elseif ($nick(#,0,o) == 1) echo -ac info * You're the only op on $+(#,.)
  else {
    [color:green]var %i = 1,%m[/color]
    while ($nick(#,%i,o)) {
      [color:red]var %n = $v1[/color]
      if ((%n != $me) && (!$istok($1-,%n,32))) {
        var %m = %m %n
        if ($numtok(%m,32) == $modespl) {
          .timer 1 0 mode # $+(-,$str(o,$v1)) %m
          var %m
        }
      }
      inc %i
    }
    if (%m) mode # $+(-,$str(o,$numtok($v1,32))) %m
  }
}


alias mdeop {
if (# !ischan) echo -ac info * Must be typed from a channel window.
elseif ($nick(#,0) == 1) echo -ac info * You're alone on $+(#,.)
elseif ($me !isop #) echo -ac info * You're not opped on $+(#,.)
elseif ($nick(#,0,o) == 1) echo -ac info * You're the only op on $+(#,.)
else {
var %i = 1,%m
while ($nick(#,%i,o)) {
var %n = $v1
if ((%n != $me) && (!$istok($1-,%n,32))) {
var %m = %m %n
if ($numtok(%m,32) == $modespl) {
.timer 1 0 mode # $+(-,$str(o,$v1)) %m
var %m
}
}
inc %i
}
if (%m) mode # $+(-,$str(o,$numtok($v1,32))) %m
}
}

Last edited by mIRCManiac; 04/04/06 12:20 PM.
Re: mass op/deop #146436 04/04/06 12:13 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
doesnt work smirk


IceCapped
Re: mass op/deop #146437 04/04/06 12:14 PM
Joined: Oct 2005
Posts: 126
PhyxiuS Offline
Vogon poet
Offline
Vogon poet
Joined: Oct 2005
Posts: 126
I also tested mIRCManiac's script. It aint working.
-
It's mIRCManiac's job to fix it.


If you mess with the best, u will die like the rest !
Re: mass op/deop #146438 04/04/06 12:15 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
Quote:
It's mIRCManiac's job to fix it.


a bit harsh.


IceCapped
Re: mass op/deop #146439 04/04/06 12:18 PM
Joined: Feb 2005
Posts: 681
M
mIRCManiac Offline
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
Yes I put %m in the wrong place

Change var %i = 1 to var %i = 1,%m

Change var %n = $v1,%m to var %n = $v1

Maybe that's why it didn't work, I tried it after the change and
it worked perfectly. Re-copy it from last post, it's been edited.

Re: mass op/deop #146440 04/04/06 12:24 PM
Joined: Oct 2005
Posts: 126
PhyxiuS Offline
Vogon poet
Offline
Vogon poet
Joined: Oct 2005
Posts: 126
Well, it aint my massdeop wink
-
and mIRCManiac is much better then me in fixing problems anyway wink


If you mess with the best, u will die like the rest !
Re: mass op/deop #146441 04/04/06 12:25 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
hey !
it works, so what to change for + mode (mass OP)?


IceCapped
Re: mass op/deop #146442 04/04/06 12:33 PM
Joined: Feb 2005
Posts: 681
M
mIRCManiac Offline
Fjord artisan
Offline
Fjord artisan
M
Joined: Feb 2005
Posts: 681
Code:
alias mop {
  if (# !ischan) echo -ac info * Must be typed from a channel window.
  elseif ($nick(#,0) == 1) echo -ac info * You're alone on $+(#,.)
  elseif ($me !isop #) echo -ac info * You're not opped on $+(#,.)
  elseif ($nick(#,0,o) == $nick(#,0)) echo -ac info * Everyone is already opped on $+(#,.)
  else {
    var %i = 1,%m
    while ($nick(#,%i)) {
      var %n = $v1
      if ((!$istok($1-,%n,32)) && (%n !isop #)) {
        var %m = %m %n
        if ($numtok(%m,32) == $modespl) {
          .timer 1 0 mode # $+(+,$str(o,$v1)) %m
          var %m
        }
      }
      inc %i
    }
    if (%m) mode # $+(+,$str(o,$numtok($v1,32))) %m
  }
}


alias mop {
if (# !ischan) echo -ac info * Must be typed from a channel window.
elseif ($nick(#,0) == 1) echo -ac info * You're alone on $+(#,.)
elseif ($me !isop #) echo -ac info * You're not opped on $+(#,.)
elseif ($nick(#,0,o) == $nick(#,0)) echo -ac info * Everyone is already opped on $+(#,.)
else {
var %i = 1,%m
while ($nick(#,%i)) {
var %n = $v1
if ((!$istok($1-,%n,32)) && (%n !isop #)) {
var %m = %m %n
if ($numtok(%m,32) == $modespl) {
.timer 1 0 mode # $+(+,$str(o,$v1)) %m
var %m
}
}
inc %i
}
if (%m) mode # $+(+,$str(o,$numtok($v1,32))) %m
}
}

Re: mass op/deop #146443 04/04/06 12:35 PM
Joined: Oct 2005
Posts: 126
PhyxiuS Offline
Vogon poet
Offline
Vogon poet
Joined: Oct 2005
Posts: 126
Nice work mIRCManiac wink


If you mess with the best, u will die like the rest !
Re: mass op/deop #146444 04/04/06 12:36 PM
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
nevermid :P

thank you mirc maniac !
you truely made it nice !

thank you

Last edited by raZOR; 04/04/06 12:57 PM.

IceCapped
Re: mass op/deop #146445 05/04/06 10:32 AM
Joined: Oct 2005
Posts: 126
PhyxiuS Offline
Vogon poet
Offline
Vogon poet
Joined: Oct 2005
Posts: 126
wink blush grin


If you mess with the best, u will die like the rest !