Silencing Script

By BackoffJackson on Mar 22, 2007

This is a silencing script. It is meant to delete an OPs access and give it back at the end of the silencing. It also retrieves the ial of the user if you don't have it. A ~q: ban is a silience ban on the network I am currently using the script. One slight bug. If the user changes their nick while banned, it will unban them, but it would not give that nick its access back due to needing your current nick to be re-added to the access list and be re-oped. Which I haven't quite gotten around to yet... So remember, if they change their nick while banned, be sure to give them their access back! Lv's= 3 is voice, 4 is halfop, 5 are ops, 10 are protected(sops). The standard levels on the network I am using. IRC.Caelestia.net. (xOP systems: off)

alias charge {
  if (!$ial($$1)) { whois $$1 | .timer 1 1 charge $$1- | return }
  ambiance $chan :God summons a hoard of angels to charge $$1, therefore resulting in a loss of speaking privileges for $$2 minute(s).
  var %ad $gettok($address($$1,0),1,64)
  if ($left($nick($chan,$$1).pnick,1) == &) { mode $chan -aohv $$1 $$1 $$1 $$1 | cs ACCESS # DEL $$1 | mode # +b ~q: $+ %ad | set % [ $+ [ $address($$1,2) ] $+ charge ] 1 }
  elseif ($left($nick($chan,$$1).pnick,1) == @) { mode $chan -ohv $$1 $$1 $$1 | cs ACCESS # DEL $$1 | mode # +b ~q: $+ %ad | set % [ $+ [ $address($$1,2) ] $+ charge ] 2 }
  elseif ($left($nick($chan,$$1).pnick,1) == %) { mode $chan -hv $$1 $$1 $$1 | cs ACCESS # DEL $$1 | mode # +b ~q: $+ %ad | set % [ $+ [ $address($$1,2) ] $+ charge ] 3 }
  elseif ($left($nick($chan,$$1).pnick,1) == +) { mode $chan -v $$1 | cs ACCESS # DEL $$1 | mode # +b ~q: $+ %ad | set % [ $+ [ $address($$1,2) ] $+ charge ] 4 }
  else mode # +b ~q: $+ $address($$1,2)
.timer 1 $calc($$2 * 60) charge.timer $$1 $$2 %ad } 
alias charge.timer {
  mode # -b ~q: $+ $$3
  if ($(% $+ $address($$1,2) $+ charge) == 1) { mode # +a $$1 | cs ACCESS # ADD $$1 10 | unset % [ $+ [ $address($$1,2) ] $+ charge ] }
  elseif ($(% $+ $address($$1,2) $+ charge) == 2) { mode # +o $$1 | cs ACCESS # ADD $$1 5 | unset % [ $+ [ $address($$1,2) ] $+ charge ] }
  elseif ($(% $+ $address($$1,2) $+ charge) == 3) { mode # +h $$1 | cs ACCESS # ADD $$1 4 | unset % [ $+ [ $address($$1,2) ] $+ charge ] }
  elseif ($(% $+ $address($$1,2) $+ charge) == 4) { mode # +v $$1 | cs ACCESS # ADD $$1 3 | unset % [ $+ [ $address($$1,2) ] $+ charge ] }
ambiance $chan : $$1 awakens. It would do you well to not bring on the wrath of God once more... }

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.