extended bans

By cofvempire on Dec 10, 2010

just a little snippet with extended bans, prevent users to join ur channel if the come from another channel, silence ban, realname ban (with kick).

menu * {

$iif($me isop $chan,extended bans)
 .channelblock {
    var %channel $$?="what channelusers would u block?" 
    mode $chan +b ~c:  $+ %channel $+ 
  }
 .silence:silence $1
 .realname {
    var %name $$?="realname" 
    mode $chan +b ~r: $+ * $+ %name $+ * 
    kick $chan $1
  }
}
alias silence { 
  if $1 isop $chan { mode $chan -o $1 | mode $chan +b ~q:  $+ $1 $+ }
  elseif $1 isvoice chan { mode $chan -v $1 | mode $chan +b ~q:  $+ $1 $+ }
}

Comments

Sign in to comment.
cofvempire   -  Dec 10, 2010

edited (again :p)
i still make mistakes in my scripts (when they go public) lolz, tnx for the help :)

 Respond  
Jethro   -  Dec 10, 2010

You should make this available to ops only, and the elseif should be changed for the voiced:

menu * {
  $iif($me isop $chan,extended bans)
  .channelblock {
    var %channel $$?="what channelusers would u block?" 
    mode $chan +b ~c:  $+ %channel $+ 
  }
  .silence:silence $1
  .realname {
    var %name $$?="realname" 
    mode $chan +b ~r: $+ * $+ %name $+ * 
    kick $chan $1
  }
}
alias silence { 
  if $me isop $chan {
    if $1 isop $chan { mode $chan -o $1 | mode $chan +b ~q:  $+ $1 $+ }
    elseif $1 isvoice $chan { mode $chan -v $1 | mode $chan +b ~q:  $+ $1 $+ }
  }
}

Or you could simply use an else condition.

 Respond  
cofvempire   -  Dec 10, 2010

edited
now its to deop and devoice someone and then mute ;)

 Respond  
Cheiron   -  Dec 10, 2010

you need to set a demode on the users this is to be set on (silence one) so they are regular only.. ie no voice,halfop,op etc or it wont work.

~q quiet People matching these bans can join but are unable to speak, unless they have +v or higher. Ex: ~q:!@blah.blah.com
~c channel If the user is in this channel then (s)he is unable to join. A prefix can also be specified (+/%/@/&/~) which means that it will only match if the user has that rights or higher on the specified channel. Ex: +b ~c:#lamers, +e ~c:@#trusted
~r realname If the realname of a user matches this then (s)he is unable to join.
Ex: ~r:Stupid_bot_script
NOTE: an underscore ('') matches both a space (' ') and an underscore (''), so this ban would match 'Stupid bot script v1.4'.

 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.