Blacklist

By DragonFlare on Apr 26, 2010

This is a Blacklist script i made when i was bored.
If you would like to change the Name of the ini File
Edit

 else { writeini -n Blacklist. $+ $chan $+ .ini Blacklisted $2 $2 | msg $chan $2 added to Blacklist. $+ $chan $+ .ini 

You will also need to edit the

 $readini 

Parts of the script.

Note. This script is for use on a bot or your own mIRC Client due to the Alias part of the script.

It has been tested the only thing i cant get working is

 else { if ($readini(Blacklist. $+ $chan $+ .ini, Blacklisted, $2-) == $null) {  msg $chan $2 is Not Blacklisted } 

Other than that everything works.

On *:Text:*:#:{
  Tokenize 32 $Strip($1-)
  if ($nick isop $chan) {
    if ($1 == !Blacklist) { if ($2- == $null) { msg $chan Please specify a nick to be blacklisted $nick $+ . }
      else { writeini -n Blacklist. $+ $chan $+ .ini Blacklisted $2 $2 | msg $chan $2 added to Blacklist. $+ $chan $+ .ini | mode $chan +b $address($2,1) | mode $chan +b $address($2,2) | mode $chan +b $address($2,3) | mode $chan +b $address($2,4) | mode $chan +b $address($2,5) | mode $chan +b $address($2,6) | mode $chan +b $address($2,7) | mode $chan +b $address($2,8) | mode $chan +b $address($2,9) | mode $chan +b $address($2,10) | kick $chan $2 Blacklisted! }
    }
    elseif ($1 == !Check) { if ($2- == $null) { msg $chan Please specify a nick to Check with the ini file $nick $+ . }
      else { if ($readini(Blacklist. $+ $chan $+ .ini, Blacklisted, $2-) == $null) {  msg $chan $2 is Not Blacklisted }
        else { if ($readini(Blacklist. $+ $chan $+ .ini, Blacklisted, $2-) == $2) { msg $chan $2 is Blacklisted $nick $+ . }
        } 
      }
    }
    else { Halt }
  }
}
On *:Join:#:{
  if ($readini(Blacklist. $+ $chan $+ .ini, Blacklisted, $nick) == $nick) { msg $chan $nick you are Blacklisted. | msg $chan Enforcing Blacklist. | mode $chan +b $address($nick,1) | mode $chan +b $address($nick,2) | mode $chan +b $address($nick,3) | mode $chan +b $address($nick,4) | mode $chan +b $address($nick,5) | mode $chan +b $address($nick,6) | mode $chan +b $address($nick,7) | mode $chan +b $address($nick,8) | mode $chan +b $address($nick,9) | mode $chan +b $address($nick,10) | kick $chan $readini(Blacklist. $+ $chan $+ .ini, Blacklisted, $nick) Blacklisted! }
}
Alias Blacklist {
  writeini -n Blacklist. $+ $chan $+ .ini Blacklisted $1 $1
  msg $chan $1 added to Blacklist. $+ $chan $+ .ini
  msg $chan Added By mIRC Client.
  mode $chan +b $address($1,2)
  kick $chan $1 Blacklisted.
}

Comments

Sign in to comment.
ExternalIRC   -  Aug 08, 2011

Dragon_Flare Helped fix it but i still need a delete trigger for it

 Respond  
Jethro   -  Aug 08, 2011

ExternalIRC, I posted a black list snippet using mIRC's user list here at: http://www.hawkee.com/snippet/8889/

 Respond  
ExternalIRC   -  Aug 08, 2011

How would i script it to go to the userslist?

 Respond  
Sorasyn   -  Apr 28, 2010

nice :P

 Respond  
PuNkTuReD   -  Apr 28, 2010

also, using inis sometimes doesnt work when using a channel name in the filename.
illegal characters and such.

 Respond  
Bielie   -  Apr 28, 2010

I suggest using hashtables indeed. Its quiker unless you have a lot of information to store. Small chance though since its only text.

 Respond  
Jethro   -  Apr 28, 2010

Hash tables items and data are stored on your PC RAM. Your system can access the RAM much faster than you hard drive (depending on your hard drive speed), thus making the hash tables the superior, quickest method to store info.

Don't get me wrong though...INI file is good for some situations, but there are situations where you need to consider the suitability and efficiency of what you're after when scripting. In other words, you need to think outside the box, not to stick with one aim for scripting and overlook the rest.

 Respond  
DragonFlare   -  Apr 28, 2010

Jethro_ [quote] Why not just use the user list? [/quote]
I dont know i got bored and wanted to script.
WorldDMT [quote] ini file isn't a good idea for blacklist codes else halt is useless and have to be removed orelse that will stop another code works [/quote] I always use ini files for stuff like this.
It really dont matter if it's in an ini file or a hash table.
Ini files read the HD every time it is triggered a hash table on the other hand stores them as variables then execute them when triggered via the mirc client itself i agree that it would be a better choice to use a hash table it's just the way i scripted it people are open to edit it and change it for hash tables.

 Respond  
Jethro   -  Apr 26, 2010

Why not just use the user list?

 Respond  
WorldDMT   -  Apr 26, 2010

ini file isn't a good idea for blacklist codes

else halt is useless and have to be removed orelse that will stop another code works

 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.