mIRC Homepage
Posted By: Dave4989 deop all script - 03/04/06 11:12 PM
I was wondering if there was anyone who knew of a script that can deop everyone in channel without
/mode $chan -ooooo nick nick nick etc.
Posted By: RusselB Re: deop all script - 03/04/06 11:17 PM
Not possible on any network that I'm aware of.
Posted By: bwr30060 Re: deop all script - 03/04/06 11:58 PM
What about looping through every user in the channel and deopping them if they're an op?

Forgive me, I've been writing in VB too much lately and don't trust myself to write this correctly. The content in the code tags is NOT valid mIRC code, it's mostly pseudo-code.
Code:
x = 1
While (x <= $nick(#,0,o)) {
  mode # -o $nick(#,x,o)
inc x
}


I put the disclaimer because I'm not sure if it works, and it's been a long time since I've done mIRC scripting.
Posted By: mIRCManiac Re: deop all script - 04/04/06 12:08 AM
Code:
alias mdeop {
  if (!$1) echo -ac info * Syntax: /mdeop <#chan> <exempt nicks>
  elseif ($1 !ischan) echo -ac info * You're not on $+($1,.)
  elseif ($me !isop $1) echo -ac info * You're not opped on $+($1,.)
  else {
    var %i = 1
    while ($nick($1,%i,o)) {
      var %n = $v1
      if ((%n != $me) && (!$istok($2-,%n,32))) {
        var %m = %m %n
        if ($numtok(%m,32) == $modespl) {
          .timer 1 0 mode $1 $+(-,$str(o,$v1)) %m
          var %m
        }
      }
      inc %i
    }
    if (%m) mode $1 $+(-,$str(o,$numtok($v1,32))) %m
  }
}


alias mdeop {
if (!$1) echo -ac info * Syntax: /mdeop <#chan> <exempt nicks>
elseif ($1 !ischan) echo -ac info * You're not on $+($1,.)
elseif ($me !isop $1) echo -ac info * You're not opped on $+($1,.)
else {
var %i = 1
while ($nick($1,%i,o)) {
var %n = $v1
if ((%n != $me) && (!$istok($2-,%n,32))) {
var %m = %m %n
if ($numtok(%m,32) == $modespl) {
.timer 1 0 mode $1 $+(-,$str(o,$v1)) %m
var %m
}
}
inc %i
}
if (%m) mode $1 $+(-,$str(o,$numtok($v1,32))) %m
}
}
Posted By: RusselB Re: deop all script - 04/04/06 01:51 AM
I got the impression from the original post that the poster was looking for a way to do it without using /mode <channel> -o <nick> Since they state in the original that they don't want to use /mode -ooo <nick> <nick> <nick>

Although, I suppose that could mean that they just don't want to use the mutliple switch option that is available.
Posted By: genius_at_work Re: deop all script - 04/04/06 01:58 AM
Maybe they want to be able to take over a channel without triggering the server protections or alerting any IRCOps.

-genius_at_work
Posted By: mIRCManiac Re: deop all script - 04/04/06 03:30 AM
Quote:
without using /mode <channel> -o <nick>


Well really all he has to type is /mdeop <#chan>
If he wants to exempt some nicks he can add those.

Quote:
Maybe they want to be able to take over a channel without triggering the server protections or alerting any IRCOps.

-genius_at_work


Not my concern.

~ Edit ~

He should change this line (line 6)
var %i = 1

to this
var %i = 1,%m

in case there is a global variable named %m .. too late to edit.
Posted By: Skeletor Re: deop all script - 04/04/06 05:02 AM
Quote:
Maybe they want to be able to take over a channel without triggering the server protections or alerting any IRCOps.

-genius_at_work


Why is that a bad thing? confused
Posted By: Mentality Re: deop all script - 04/04/06 07:34 AM
Is that a serious question?

Taking over channels is lame/irritating, and therefore... a bad thing smile

Regards,
Posted By: oneline Re: deop all script - 04/04/06 09:18 AM
you mean a script to use chanserv or something to mass deop everyone instead of the normal /mode in a script?
© mIRC Discussion Forums