Auto Kill for Admin use

By anthalus on Nov 26, 2005

This is a simple autokill system for use by admins. Basically, when someone gets killed on a channel, it gives you the option to set an automatic kill every time they reenter. It sets their address as the check, instead of their nick. The SNOTICE part may need the $6 changed, depending on your server.

Updated

#autokill off

on *:SNOTICE:*Client exiting:* kill by *: {
  var %am.kill = //echo $?!="Add to Auto Kill?"
  if (!%am.kill) {
    return
  }
  else {
    am.killkeep $6
  }
}

on *:JOIN:#: {
 .signal -n _killcheck $nick
} 

on *:TEXT:_killcheck*:*: {
   .signal -n _killcheck $nick $2-
}

alias am.killkeep {
  var %nick = $address($1,13)
  .set %killlist $addtok(%killlist,%nick,44)
}

alias am.autokill {
  if (!$1) {
    var %nick = $$?="Nickname:"
  }
  if ($1) {
    var %nick = $1
  }
  var %reason = Auto Kill Requested
  am.killkeep %nick
  .kill %nick %reason
}

on *:SIGNAL:_killcheck: {
  if (!$2) {
    var %nickcheck = $address($1,13)
    if ( $istok(%killlist,%nickcheck,44) ) {
      .kill $1 [Auto Kill]
      goto end
    }
    else {
      return
    }
  }
  if ($2) {
    if ( $2 == Remove ) {
      var %nickremove = $address($1,13)
      if ( $istok(%killlist,%nickremove,44) ) {
        var %a = $matchtok(%killlist,%nickremove,0,44)
        while (%a) {
          $remtok(%killlist,%nickremove,%a,44)
          dec %a
        }
        goto end
      }
    }
    if ( $2 == List ) {
      if ( %killlist ) {
        echo $color(notify) -at [Auto Kill List] $sorttok(%killlist,44)
        goto end
      }
      else {
        echo $color(notify) -at [Auto Kill List Empty]
      }
    }
  }
  :end
}

#autokill end

menu * {
  -
  AutoKill ( $+ $group(#autokill) $+ ): {
    if ($group(#autokill) == off) { .enable #autokill }
    else { .disable #autokill }
    .echo $color(notify) -at [ Autokill ] $group(#autokill)
    }
  -
  Remove from List:.signal -n _killcheck $$?="Nick?" Remove
  - 
  Autokill List:.signal -n _killcheck List List
  -
}

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.