BlackList Using User List

By Jethro on Aug 08, 2011

I saw someone ask about a black list snippet utilizing mIRC's inbuilt user list. What I've rummaged though the snippet section, I found lots of black list script based upon VAR, INI, TXT and HASH. I thought I'd give it a shot with my approach. The commands are self-explanatory. They are:

!blacklist <NickHere>
!delete <NickHere>
!check

The commands are reserved for ops or above to access only.

- Code updated with checks to make sure the search aims for the targeted location. Big thanks to jaytea.
- Added a check for the ban to make sure it exists before removing it.

on @blacklist:join:#: ban -k # $nick 2 You're being put on my black list!
on $@*:text:/^!(blacklist|check|delete)( |$)/iS:#:{
  if ($nick isop #) {
    var %1 = $regml(1), %2 = $strip($2)
    if (%1 == blacklist) {
      if ($ulist($address(%2,2),1)) {
        .notice $nick The user $2 has already been added!
        return
      }
      .guser -a blacklist %2 2 
      .notice $nick The user %2 has been added to the black list!
    }
    elseif (%1 == check) {
      if ($ulist(*,blacklist,0)) {
        var %^ = tokenize 32
        while ($ulist(*,blacklist,$0)) { %^ $1- $v1 } | %^ $2-
        scon -r .notice $nick Users(s) in my black list: $!ial( $* ).nick
        return
      }
      .notice $nick There's no user on my black list yet!
    }
    else {
      var %b = 1
      while ($ulist(*,blacklist,%b)) {
        if ($v1 == $ulist($address(%2,2),1)) {
          .ruser blacklist %2 2
          .notice $nick The user %2 has been removed from my black list!
          $iif($address(%2,2) isban #,ban -r # %2 2)
          return
        }
        inc %b
      }
      .notice $nick %2 is either removed or not found! 
    }
  }
}

Comments

Sign in to comment.
RIcko   -  May 15, 2013

It's not kicking/banning after adding a user

antisec  -  Jan 11, 2016

If you haven't gotten it fixed or figured out i will recode it for you to work

Sign in to comment

mike_12212012   -  Jul 14, 2012

Script seems to not work with mIRC 7.22. I get no response from !blacklist !check nor !delete. Did not alter code, just added it to my bots commands.

If it matters I use bot on Justin.tv

 Respond  
ExternalIRC   -  Aug 19, 2011

It was a mistake on my part i tried adding new brackets

 Respond  
Jethro   -  Aug 19, 2011

ExternalIRC, mind if you share your findings?

 Respond  
ExternalIRC   -  Aug 19, 2011

I got it figured out

 Respond  
Jethro   -  Aug 15, 2011

It's working fine for me. Some of the users who have tried it are happy campers.

 Respond  
ExternalIRC   -  Aug 15, 2011

I did 2 times and it still did it

 Respond  
Jethro   -  Aug 15, 2011

I don't get that error. Which error number is that? Make sure you have copied and pasted the code as is correctly.

 Respond  
ExternalIRC   -  Aug 15, 2011

:{ Unknown command <--- I got that when i added a nick to the blacklist why?

 Respond  
Jethro   -  Aug 10, 2011

Spoof, shіt list and blacklist are interchangeable and play the same role pretty much.

 Respond  
Spoof   -  Aug 10, 2011

Isn't a Black list the same as a Sh|t list script, just renamed. I mean they do the same thing and enforce the same modes.

 Respond  
Jethro   -  Aug 10, 2011

I seriously think Hawkee should ditch the rating system and retain the like poll instead. Some people drop your rating out of spite without a reason why. :P I know it's flawed, and it's been used as a personal, abusive weapon to degrade our effort of a work that you and I've submitted in the hope to benefit the public.

 Respond  
napa182   -  Aug 09, 2011

Nice work Jethro_ 8/10 +Like

 Respond  
Jethro   -  Aug 09, 2011

Thanks jaytea for your helpful advice. I have updated the snippet as per your reminder.

Thanks, Veritas.

 Respond  
Veritas   -  Aug 09, 2011

Wauw, very nice snippet Jethro, keep up the good work O
9/10 + like

 Respond  
jaytea   -  Aug 09, 2011

you should use $ulist()'s level parameter when referring to the script's userlist entries otherwise those who use the script will run into problems if they use the userlist for anything else, ie. $ulist(

, blacklist, 1)
to see if an entry matching or matched by
has been blacklisted, and *$ulist(, blacklist, N)** to return the Nth blacklisted address.

$ulist().info and /guser's [info] parm could also be quite a useful extension. if your intention is to demonstrate mIRC's userlist feature, you may as well use all the suitable functions ;)

 Respond  
Jethro   -  Aug 08, 2011

Thanks for your kind words, but as we know it: there will always be smarter or smartest people out there. lol

 Respond  
PyThOn   -  Aug 08, 2011

Keep up the good work btw Lmao Smartest guy i know on Hawkee so far D;

 Respond  
Jethro   -  Aug 08, 2011

Yes, you have to at least have an op (@) status to command the snippet. It has to be this way, otherwise the regular users can command it and add innocent people to the black list. :P

 Respond  
PyThOn   -  Aug 08, 2011

Nvm lmao i got it very nice script :)
Would you know how to make a Mirc blocker to avoid users from connecting to a chatspace Server?

 Respond  
Jethro   -  Aug 08, 2011

And they don't stand a chance if they change their nicknames attempting to join in, because this snippet detects theirs hosts upon entry and then compares them to the ones added in the black list. I've seen many blacklist related scripts that detect merely nicknames, which they can easily bypass by changing them and come back.

Thanks for the likes and rating. They're much obliged, folks.

 Respond  
PyThOn   -  Aug 08, 2011

ooo ok

 Respond  
Wade   -  Aug 08, 2011

it kick bans them on joining a channel your in.

 Respond  
PyThOn   -  Aug 08, 2011

So if i put this in my remotes and add someone to the blacklist. What exactly wil hapen from the time i add them to he list.

 Respond  
Jordyk19   -  Aug 08, 2011

Very nice!

 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.