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.
}
ExternalIRC, I posted a black list snippet using mIRC's user list here at: http://www.hawkee.com/snippet/8889/
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.
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.