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!
}
}
}
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.
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 ;)
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.
If you haven't gotten it fixed or figured out i will recode it for you to work