Blacklist Script v1.0

By Myidentityisasecret on Jun 15, 2013

Hey!
This is a personal blacklist made by me :D
So, how does this work? It's quite simple.
Commands:
/blacklist add (Reason)
/blacklist del
/blacklist list

Adding someone to the blacklist will kick them and ban them from the channel.
If someone else unbans them, and they join again, they will automatically be rebanned making you the person in charge of the bans.
Please do not use unless you are the owner of the channel or have permission from the owner or else you may lose your access and when and if you do, don't come crying to me :P

Have fun! Thanks!

For help or questions, join #me on irc,rizon,net

  • Tanmay
; mIRC Blacklist Script Made By Tanmay
; For help or questions, join #me on irc.rizon.net
; Thanks and good luck.

alias blacklist {
  if ($1 == add) {
    if ($2 != $null) {
      if ($($+(%,blacklist,.,$2,.,$active),2) == $null) {
        if ($3 == $null) {
          echo -a $2 added to blacklist for $active $+ .
          kick $active $2 Blacklisted. No reason specified.
          mode # +bb $address($2, 2) $2
          set $+(%,banhost,.,$2) $address($2, 2)
          set $+(%,blacklist,.,$2,.,$active) No reason specified.
          var %old $(%blacklist)
          var %new $2 $+ $chr(32) $+ $(%old)
          set %blacklist $(%new)
        }
        else {
          echo -a $2 added to blacklist for $active $+ .
          kick $active $2 Blacklisted. Reason: $3-
          mode # +bb $2 $address($2, 2)
          set $+(%,blacklist,.,$2,.,$active) $3-
          var %old $(%blacklist)
          var %new $2 $+ $chr(32) $+ $(%old)
          set %blacklist $(%new)
        }
      }
      else {
        echo -a $2 is already on the blacklist.
      }
    }
    else {
      echo -a Usage: /blacklist <add/del> <person> (reason)
    }
  }
  if ($1 == del) {
    if ($2 != $null) {
      if ($($+(%,blacklist,.,$2,.,$active),2) != $null) {
        echo -a $2 removed from blacklist.
        mode # -bb $2 $($+(%,banhost,.,$2),2)
        unset $+(%,blacklist,.,$2,.,$active)
        unset $+(%,banhost,.,$2)
        var %banana $replace(%blacklist, $2, $chr(32))
        set %blacklist $(%banana)
      }
    }
    else {
      echo -a Usage: /blacklist <add/del> <person> (reason)
    }
  }
  if ($1 == list) {
    if (%blacklist != $null) {
      echo -a Blacklist: $(%blacklist)
    }
    else {
      echo -a The blacklist is empty.
    }
  }
}
on *:JOIN:#: {
  if ($($+(%,blacklist,.,$nick,.,$chan),2) != $null) {
    kick $chan $nick Blacklisted. Reason: $($+(%,blacklist,.,$nick,.,$chan),2)
    mode # +bb $nick $address($nick, 2)
  }
}

Comments

Sign in to comment.
Yawhatnever   -  Jun 15, 2013

Not bad!

Why do you use this? -

set %var $(%othervar)
;and
var %new $2 $+ $chr(32) $+ $(%old)

instead of

set %var %othervar
;and
var %new $2 %old
Myidentityisasecret  -  Jun 15, 2013

It's a global variable so that /blacklist list will work.
Also, I realize now that the $+ $chr(32) is not necessary xD

Yawhatnever  -  Jun 15, 2013

I mean using the $eval() around the variable is redundant, since it evaluates once (which it would have done without the $eval())

Myidentityisasecret  -  Jun 15, 2013

Ohh, I see what you mean now. Thanks for your input, I appreciate it :D

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.