• Home
  • Servers
  • Chat
  • Channels
  • Commands
  • Forum
  • FAQ
  • Software
  • Quotes
Topic Options
Rate This Topic
#26 - 08/01/06 01:34 AM IRCOP: server ban list and easy removal
usrbingeek Offline

WyldRyde Staff

Registered: 07/31/06
Posts: 646
Loc: Burlington, VT
Originally posted by Cascul

After running as an ircop on another network i found removing sglines, shuns, klines, etc... tedious and not easy to find.

So I wrote this script and thought that some other ircops could use it as its quite handy wink

PS. For all those regular users out there, dont bother with this script since it wont do anything for you.


Put this in your remotes:
Code:
menu status {
  Show All Server Bans: {
    stats G
    stats K
    stats s
  }
}


raw 223:*: {
  window -abkl @Bans glineP.mrc
  if ($2 == s) { %bType = [SHUN_] }
  if ($2 == G) { %bType = [GLINE] }
  if ($2 == Z) { %bType = [ZLINE] }
  if ($2 == K) { %bType = [KLINE] }

  aline @Bans 11 $+ %bType $+  4 $+ $3  $str($chr(95),$calc(40 - $len($3))) $+  - 8Left( $+ $int($calc( $4 / 60)) $+ min) $+ $str($chr(95),$calc(5 - $len($int($calc( $4 / 60))))) - 0,12 $+ $7- 0,4 $+ $6
  ;haltdef
}


now you need to add a file called glineP.mrc to your mirc directory. This code lets you remove the bans from a popup menu.

glineP.mrc:
Code:
Remove Ban: {
  if ($strip($1) == [GLINE]) {
    gline - $+ $strip($2)
  }
  elseif ($strip($1) == [ZLINE]) {
    zline - $+ $strip($2)
  }
  elseif ($strip($1) == [SHUN_]) {
    shun - $+ $strip($2)
  }
  elseif ($strip($1) == [KLINE]) {
    shun - $+ $strip($2)
  }

    var %selstate = false
    var %iNum = 0
    while %selstate == false {
      %iNum = %iNum + 1
      if ($line(@Bans,%iNum).state) {
        %selstate = true
        dline @Bans %iNum
      }
      if (%iNum > 75) { return }
    }  
}


That should be it. You should now have a color coded and much easier to read (and remove) list of all the server bans on the server.

Top
Sponsored Links
Sponsored Links
Member
*****

Registered: 27/08/04
Posts: 10136
Loc: Mountain View, CA
Top


Moderator:  Jeff, mandy, usrbingeek