Bot !mass* commands for ops

By sailoreagle on Feb 13, 2004

Allows any op in a channel to massop / massdeop / massvoice / massdevoice any number of people, just typing a !command. (Can of course be edited so it'll only allow the botmaster to do the command, etc) Uses tokens, /tokenize and $modespl to perform the requested mode change on as many people as the server allows on the same line.

; sailoreagle <sailoreagle@illumichat.net>
; irc.illumichat.net #mirc
;
; Available commands: !massop !massdeop !massvoice !massdevoice
; Usage: !command Nick1 Nick2 Nick3 Nick4 Nick5 ...
;
; If you use this snippet in a script it would be nice if you gave me credit.
; Any questions or comments, email me or ask on the hawkee.com forums.
;
; Enjoy!

ON @*:TEXT:!mass*:#: {
  if ($nick isop $chan) {
    var %o = $numtok($2-,32)
    if ($1 == !massop) {
      if (%o <= $modespl) {
        mode $chan $+(+,$str(o,%o)) $2-
      }
      else {
        var %on = $2-
        while %o {
          tokenize 32 %on
          mode $chan $+(+,$str(o,$modespl)) $($+($,1-,$modespl),2)
          var %on = $deltok(%on,$+(1,-,$modespl),32)
          var %o = $numtok(%on,32)
        }
      }
    }
    elseif ($1 == !massdeop) {
      if (%o <= $modespl) {
        mode $chan $+(-,$str(o,%o)) $2-
      }
      else {
        var %on = $2-
        while %o {
          tokenize 32 %on
          mode $chan $+(-,$str(o,$modespl)) $($+($,1-,$modespl),2)
          var %on = $deltok(%on,$+(1,-,$modespl),32)
          var %o = $numtok(%on,32)
        }
      }
    }
    elseif ($1 == !massvoice) {
      if (%o <= $modespl) {
        mode $chan $+(+,$str(v,%o)) $2-
      }
      else {
        var %on = $2-
        while %o {
          tokenize 32 %on
          mode $chan $+(+,$str(v,$modespl)) $($+($,1-,$modespl),2)
          var %on = $deltok(%on,$+(1,-,$modespl),32)
          var %o = $numtok(%on,32)
        }
      }
    }
    elseif ($1 == !massdevoice) {
      if (%o <= $modespl) {
        mode $chan $+(-,$str(v,%o)) $2-
      }
      else {
        var %on = $2-
        while %o {
          tokenize 32 %on
          mode $chan $+(-,$str(v,$modespl)) $($+($,1-,$modespl),2)
          var %on = $deltok(%on,$+(1,-,$modespl),32)
          var %o = $numtok(%on,32)
        }
      }
    }
  }
}

Comments

Sign in to comment.
seaser   -  Aug 10, 2010

hello,
I just found this mass op/deop /voice/devoice script...
its really handy and works like a charm!
there is just one thing ...
"I've made an alias version of this for myself, that lets you mass[op/voice/devoice/deop] specified nicks, everybody except specified nicks, and everybody (except you yourself)..."

do you still have it, and would you share it with me? because thats what im looking for, could not find anything similar and Im new to mIRC scripting .. maybe you have a hint?
I'd love to hear from you,
peace, Seaser

 Respond  
|MELIORITE|   -  May 16, 2007

Why bother with kick or ban when you can already strip the channel of ops...

 Respond  
Tyler222   -  May 16, 2007

It\'s not bad...but of course if you could add kick and bann and all that on it it would be great...Welldone :)

 Respond  
err2   -  Jul 27, 2005

i dont think it wrks

 Respond  
DeathfireD   -  Mar 22, 2004

I rest my case Im just acting like you ;)

 Respond  
sailoreagle   -  Mar 18, 2004

You\'re also being a bit of a hypocrite... considering you yourself have posted a snippet with bot commands. :P

 Respond  
sailoreagle   -  Mar 18, 2004

Why not? Some people like having bots to control their channel. shrugs I\'ve made an alias version of this for myself, that lets you mass[op/voice/devoice/deop] specified nicks, everybody except specified nicks, and everybody (except you yourself)... but the definition of this section is, user-posted snippets that \"are meant to be used as examples for accomplishing small tasks using mIRC\". If you know how to script, you can use this and the helpfile to script your own alias / popup menu / whatever.

 Respond  
DeathfireD   -  Mar 17, 2004

why would you want a bot to do this why not just make it for a client so they can do it. Its kinda a wast to have.

 Respond  
UTUCS.com-Admin   -  Mar 16, 2004

I really like this script, great script! I don\'t even know how to do this. You sure are smarter than me when it comes to mIRC scripting!

 Respond  
sailoreagle   -  Mar 10, 2004

Mistake fixed. Disregard previous comment :)

 Respond  
sailoreagle   -  Feb 23, 2004

Ack - just found a small mistake here, a typo that got replicated four times when I copypasted the code of course... bah. In the MODE commands inside the if (%o <= $modespl) statements, the $3- should be $2-.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.