Good mass mode

By FRISH on Aug 08, 2007

Basically this is 1 code to set everyone in the channel any mode ya want. I know theres a few mass modes but i feel this is the best ;p

Just put this into your remotes section (alt+R)

To use just type "++" or "--" "themode"
these are examples:
++v --> this voices everyone in the channel
--v --> this devoices everyone in the channel
++h --> this halfops everyone in the channel
--h --> this dehalfops everyone in the channel
++b --> this bans everyone in the channel
etc...

Updates
Made it so it wont do the mode on you eg/ ++b, or --v, also when ya were like op and did --o and you were the only one deopped it will just deop everyone else ;p
This will now work no matter how many people are in the channel

Remember that you can only have one "on :INPUT::{" in a script to if ya want to use another "on :INPUT::{" code ya need to join them.

on *:INPUT:*:{
  if ($left($strip($1,burc),2) == ++ || $left($strip($1,burc),2) == --) && ($mid($strip($1,burc),3,1) isin $nickmode || $mid($strip($1,burc),3,1) isin $chanmodes) {
    say $1-
    var %n $nick(#,0)
    var %mode $left($strip($1,burc),1) $+ $str($mid($strip($1,burc),3,1),$modespl)
    :massmode
    var %x $modespl
    unset %names
    while (%n) && (%x) { 
      var %names $addtok(%names,$nick(#,%n),32) 
      dec %n
      dec %x
    } 
    mode # %mode $replace(%names,$me,)
    if (%n) { goto massmode }
    haltdef
  }
}

Comments

Sign in to comment.
Gummo   -  Sep 17, 2007
$strip($1,burc)

You don\'t need burc when you\'re stripping all of them.

$strip($1)
 Respond  
FRISH   -  Sep 14, 2007

now works no matter how many people are in the channel and if you use colour/bold/underline codes ;)

 Respond  
Anti   -  Aug 10, 2007

i got alot of input scripts they arent loaded.. so yeah..

 Respond  
FRISH   -  Aug 09, 2007

glad ya could use something in my snippet to improve yours nice work, ill stick to mine i understand mine xD.

 Respond  
Lindrian   -  Aug 09, 2007

My own mass mode script, modified to do what urs does.

on *:input:*: {
  if ( $nick($active,$me,oh) ) && ($active ischan) && ($1) {
    if $regex( $1,/^[+-]?[ohveI]$/ ) {
      var %a = 1,%b = $nick($chan,0), %c, %d = $left($1,1), %e = $right($1,1), %f = $iif($regex($right($1,1),/^[ovh]$/),yes,no)
      while ( %a <= %b ) {
        %c = %c $iif(%f == yes,$nick($chan,%a),$address($nick($chan,%a),2))
        if ( $numtok(%c,32) == $modespl ) {
          mode $active $+(%d,$str(%e,%a)) $remove(%c,$iif(%f == yes,$me,$address($me,2)))
          var %c = \"\"
        }
        inc %a
      }
    }
  }
  if ( %c ) { mode $active $+(%d,$str(%e,$numtok(%c,32))) $remove(%c,$iif(%f == yes,$me,$address($me,2))) }
}
 Respond  
Olliegod   -  Aug 09, 2007

This does not check the servers $modespl. If the number of people in the channel is greater than the $modespl your code will, in essence, fail.

 Respond  
Anti   -  Aug 08, 2007

ROFL i got the case of the double inputs it doubles ++h ++h * OhGoody sets mode: +h ..

something wrong theres

 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.