Mass Channel Modes

By GoldFish on Aug 29, 2011

What this script does is set modes + or -vhoaq on everyone on the channel. The trigger is /mass [+-] [vhoaq], eg /mass +v or /mass -o. Enjoy!

alias mass {
  if ($regex($1,/^([/+-][vhoaq])$/S) && !$2) {
    var %a 1
    while (%a <= $nick(#,0)) {
      set -l %b %b $nick(#,%a)
      inc %a
    }
    mode # $left($1,1) $+ $str($mid($1,2,1),$nick(#,0)) %b
  }
}

Comments

Sign in to comment.
GoldFish   -  Aug 30, 2011

Oh, I see what you mean Jethro. I tested this in small channels (less than 12 people) so I didn't know it was an issue. Thanks!

 Respond  
napa182   -  Aug 30, 2011

gnaljfdsa9 sad lil spammer go get a life an stop spamming on peoples snippets

 Respond  
Jethro   -  Aug 29, 2011

Since I have mIRC with me at the moment, I'll show you what I meant:

alias mass {
  if ($regex($1,/^([+-])([vhoaq])$/S)) { 
    var %1 = $regml(1), %2 = $regml(2), %- = $nick(#,0) 
    while (%-) {
      var %m = %m $iif($nick(#,%-) != $me,$v1)
      if ($numtok(%m,32) == $modespl) {
        mode # $+(%1,$str(%2,$v1))
      }
      dec %-
    }
    if (%m) mode # $+(%1,$str(%2,$numtok(%m,32))) %m
  }
}

This is for demonstration purposes only.

 Respond  
Jethro   -  Aug 29, 2011

Just a friendly advice: take advantage of $modespl identifier.

 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.