Mass/Channel Modes

By Urza on Sep 12, 2005

Couple of simple popups for easily setting modes.

channel popup includes a bunch of more common channel modes, and an option to voice/devoice all users

nicklist popup allows you to kick/ban/op/deop selected users all at once

; Nicklist menu - perferm selected mode on all selcted nicks
menu nicklist {
  -
  $iif($me isvoice $active || $me isreg $active,$style(2)) Mass Modes
  .Ban (no kick):MassSelected ban # NICK 2
  .Unban:MassSelected ban -r # NICK 2
  .Kick
  ..Message:MassSelected kick # NICK $$?="Reason?"
  ..No Message:MassSelected kick # NICK No reason stated
  .Kick Ban:
  ..Message:MassSelected ban -k # NICK 2 $$?="Reason"
  ..No Message:MassSelected ban -k # NICK 2 No reason stated
  .Op:mode # + $+ $str(o,$0) $replace($snicks,$chr(44),$chr(32))
  .Deop:mode # - $+ $str(o,$0) $replace($snicks,$chr(44),$chr(32))
  .Halfop:mode # + $+ $str(h,$0) $replace($snicks,$chr(44),$chr(32))
  .DeHalfop:mode # - $+ $str(h,$0) $replace($snicks,$chr(44),$chr(32))
  .Voice:mode # + $+ $str(v,$0) $replace($snicks,$chr(44),$chr(32))
  .Devoice:mode # - $+ $str(v,$0) $replace($snicks,$chr(44),$chr(32))
  -
}

alias MassSelected {
  var %i = 1
  while (%i <= $numtok($snicks,44)) { 
    $replace($1-,NICK,$gettok($snicks,%i,44))
    inc %i
  }
}

menu channel {
  -
  $iif($me isvoice $active || $me isreg $active,$style(2)) set Channel Modes
  .Secret (+s)
  ..$iif(s isincs $gettok($chan($chan).mode,1,32),$style(1)) on:/mode # +s
  ..$iif(s !isincs $gettok($chan($chan).mode,1,32),$style(1)) off:/mode # -s
  .Invite Only (+i)
  ..$iif(i isincs $gettok($chan($chan).mode,1,32),$style(1)) on:/mode # +i
  ..$iif(i !isincs $gettok($chan($chan).mode,1,32),$style(1)) off:/mode # -i
  .Only registered users may join (+R)
  ..$iif(R isincs $gettok($chan($chan).mode,1,32),$style(1)) on:/mode # +R
  ..$iif(R !isincs $gettok($chan($chan).mode,1,32),$style(1)) off:/mode # -R
  .Password protected (+k)
  ..$iif(k isincs $gettok($chan($chan).mode,1,32),$style(1)) on:/mode # +k $$?="Enter a password"
  ..$iif(k !isincs $gettok($chan($chan).mode,1,32),$style(1)) off:/mode # -k $$="Enter current Password"
  .User Limit (+l)
  ..$iif(k isincs $gettok($chan($chan).mode,1,32),$style(1)) on:/mode # +k $$?="Enter user Limit"
  ..$iif(k !isincs $gettok($chan($chan).mode,1,32),$style(1)) off:/mode # -k
  .Moderated (+m)
  ..$iif(m isincs $gettok( $chan($chan).mode,1,32),$style(1)) on:/mode # +m
  ..$iif(m !isincs $gettok( $chan($chan).mode,1,32),$style(1)) off:/mode # -m
  .Only registered users may talk (+N)
  ..$iif(N isincs $gettok($chan($chan).mode,1,32),$style(1)) on:/mode # +N
  ..$iif(N !isincs $gettok($chan($chan).mode,1,32),$style(1)) off:/mode # -N
  .Strip Colours (+S)
  ..$iif(S isincs $gettok($chan($chan).mode,1,32),$style(1)) on:/mode # +S
  ..$iif(S !isincs $gettok($chan($chan).mode,1,32),$style(1)) off:/mode # -S
  .No Nick Changes (+N)
  ..$iif(N isincs $gettok($chan($chan).mode,1,32),$style(1)) on:/mode # +N
  ..$iif(N !isincs $gettok($chan($chan).mode,1,32),$style(1)) off:/mode # -N
  .Filter Badwords (+B)
  ..$iif(B isincs $gettok($chan($chan).mode,1,32),$style(1)) on:/mode # +B
  ..$iif(B !isincs $gettok($chan($chan).mode,1,32),$style(1)) off:/mode # -B
  .Block Channel CTCP's (+C)
  ..$iif(C isincs $gettok($chan($chan).mode,1,32),$style(1)) on:/mode # +C
  ..$iif(C !isincs $gettok($chan($chan).mode,1,32),$style(1)) off:/mode # -C
  .Block Channel Notices (+T)
  ..$iif(T isincs $gettok($chan($chan).mode,1,32),$style(1)) on:/mode # +T
  ..$iif(T !isincs $gettok($chan($chan).mode,1,32),$style(1)) off:/mode # -T
   $iif($me isvoice $active || $me isreg $active,$style(2)) Mass User modes
  .Voice all (+v): MassVoice #
  .Devoice all (-v): MassDevoice #
} 

alias MassVoice {
  var %i = 1
  while (%i <= $nick($chan,0,r)) { 
    mode $1 +v $nick($chan,%i,r)
    inc %i
  }
}
alias MassDevoice {
  var %i = 1
  while (%i <= $nick($chan,0,v)) { 
    mode $1 -v $nick($chan,%i,v)
    inc %i
  }
}

Comments

Sign in to comment.
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.