BlackList Using User List
Platform: mIRC
Published Aug 08, 2011
Updated Aug 15, 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:
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!
}
}
}