Blacklist System

Platform:  mIRC
Published  Mar 16, 2008
Updated  Mar 16, 2008
Copy/paste in a new remote .
Once you load the script open the dialog to set it up.
turn on the power, and set what ban mask you want it to work with.

You Must Be An OP On The Channel You Are Trying To Add The Nick On For It To Work.

then add the channels you want it to work on. after thats done you can enter nicks either from the dialog it's self or from rightclicking the menubar or channel, or you can right click the nick you want to black list as well. For removing the nicks. Remove the nicks either in the dialog or right click the menubar or channel.


enjoy......

im still wotking all the bugs out so i will be updating as needed.
and yes i know i made it a bit long for a blacklister, but eh idc....

just a pic of the dialog...
dialog bl2 {
title "BlackList System"
size -1 -1 161 171
option dbu
box "Power", 1, 1 0 94 17
radio "Blacklister On", 2, 3 7 43 9, flat
radio "Blacklister Off", 3, 49 7 44 9, flat
box "Date/Time", 4, 96 0 64 17
text "Mar/30/08 12:30:23 PM", 5, 100 7 58 8
box "add/rem Channels ", 6, 1 17 54 28
edit "", 7, 3 25 50 9, autohs
button "add", 8, 3 35 25 9, flat
button "rem", 9, 28 35 25 9, flat
box "add/rem Nick's", 10, 1 45 54 28
edit "", 11, 3 53 50 9, autohs
button "add", 12, 3 63 25 9, flat
button "rem", 13, 28 63 25 9, flat
box "Blacklisted Nick's", 14, 56 17 52 56
list 15, 57 25 50 46, size vsbar
box "Channel List", 16, 108 17 52 56
list 17, 109 25 50 46, size vsbar
box "Set Bmask", 18, 126 73 34 20
edit "", 19, 144 81 13 9, center
button "set", 20, 128 81 15 9, flat
box "Reason Being Used", 21, 1 73 124 20
edit "", 22, 3 81 120 9, read autohs
box "add/rem Blacklist Reason's", 23, 1 93 159 29
edit "", 24, 3 102 154 9, autohs
button "add", 25, 3 112 77 9, flat
button "rem", 26, 80 112 77 9, flat
box "Blacklist Reason List", 27, 1 122 159 48
list 28, 3 131 154 37, size vsbar
}
on *:load: {
echo 12 -a You Have Just Loaded Napa182's Blacklist System
echo 12 -a A Script0rs Inc. Production
echo -a 14,1(14,115,10,10,1 XǮt0X׻ 0,115,114,1)
}
alias bl2 { dialog $iif($dialog(bl2),-v,-md) bl2 bl2 }
alias bl2datetime { did -ra bl2 5 $time(mmm/dd/yy h:nn:ss tt) }
alias blacklisted {
var %a = $gettok(%blchan,1-,44), %b = $numtok(%a,44), %c = 1
while (%c <= %b) {
if ($did(11).text ison $gettok(%a,%c,44)) && ($me isop $gettok(%a,%c,44)) {
ban -k $gettok(%a,%c,44) $did(11).text %blbmask Blacklisted :Reason: $iif(%blreasonsel == $null,Just Because,%blreasonsel)
}
inc %c
}
}
menu nicklist {
-
. $iif($istok(%bluser,$1,44) != $false,$style(2)) Add ( $+ $$1 $+ ) To Blacklist:{
if ($me !isop #) { noop $input(You Are NOT an op in the active channel,uho,ERROR!) }
elseif (!%blpower) || (!%blbmask) { noop $input(Please Enter A Ban Mask. Or Turn On The Power.,uho,ERROR!) | bl2 | did -a bl2 11 $$1 }
elseif (%blpower) && (%blbmask) {
if ($input(Are You Sure You Want To Add ( $+ $$1 $+ ) To The Blacklist,uqy,O_O) == $true) {
.auser blacklisted $address($$1,%blbmask)
set %bluser $addtok(%bluser,$1,44)
noop $input(( $+ $$1 $+ ) Has Been Added To The Blacklist. ( $+ $$1 $+ ) Will Now Be Kicked,uwo,Attention)
var %a = $gettok(%blchan,1-,44), %b = $numtok(%a,44), %c = 1
while (%c <= %b) {
if ($$1 ison $gettok(%a,%c,44)) && ($me isop $gettok(%a,%c,44)) {
ban -k $gettok(%a,%c,44) $$1 %blbmask Blacklisted :Reason: $iif(%blreasonsel == $null,Just Because,%blreasonsel)
}
inc %c
}
}
else { halt }
}
}
-
}
menu menubar,channel {
-
.Blacklist System
..Open Blacklist System:{ bl2 }
.. $iif(%bluser == $null,$style(2)) Remove Nick From Blacklist:{
var %rem $$?="Enter Nick To Remove From Blacklist"
if (!$istok(%bluser,%rem,44)) { noop $input(( $+ %rem $+ ) Is Not In The Blacklist,uho,Error) }
else {
if ($input(Are You Sure You Want To Remove ( $+ %rem $+ ) From The Blacklist,uqy,O_O) == $true) {
.ruser blacklisted $address(%rem,2)
set %bluser $remtok(%bluser,%rem,1,44)
noop $input(( $+ %rem $+ ) Has Been Removed From The Blacklist,uwo,Attention)
}
else { halt }
}
}
..Add Nick To Blacklist:{
if ($me !isop #) { noop $input(You Are NOT an op in the active channel,uho,ERROR!) }
elseif (!%blpower) || (!%blbmask) { noop $input(Please Enter A Ban Mask. Or Turn On The Power.,uho,ERROR!) | bl2 }
elseif (%blpower) && (%blbmask) {
var %add $$?="Enter Nick To Add To Blacklist"
if ($istok(%bluser,%add,44)) { noop $input(( $+ %add $+ ) Is Already In The Blacklist,uho,Error) }
else {
if ($input(Are You Sure You Want To Add ( $+ %add $+ ) To The Blacklist,uqy,O_O) == $true) {
.auser blacklisted $address(%add,%blbmask)
set %bluser $addtok(%bluser,%add,44)
noop $input(( $+ %add $+ ) Has Been Added To The Blacklist. ( $+ %add $+ ) Will Now Be Kicked,uwo,Attention)
var %a = $gettok(%blchan,1-,44), %b = $numtok(%a,44), %c = 1
while (%c <= %b) {
if (%add ison $gettok(%a,%c,44)) && ($me isop $gettok(%a,%c,44)) {
ban -k $gettok(%a,%c,44) %add %blbmask Blacklisted :Reason: $iif(%blreasonsel == $null,Just Because,%blreasonsel)
}
inc %c
}
}
else { halt }
}
}
}
-
}
on *:dialog:bl2:close:0:{ .timerbl2datetime off }
on *:dialog:bl2:init:0:{
did -a bl2 5 $time(mmm/dd/yy h:nn:ss tt)
if ($timer(bl2datetime)) { haltdef }
else { .timerbl2datetime 0 1 bl2datetime }
if (%blpower) { did -c bl2 2 | did -e bl2 8,12,19,20 }
if (!%blpower) { did -c bl2 3 | did -b bl2 8,12,19,20 }
if (%blbmask) { did -a bl2 19 %blbmask }
if (%blreasonsel) { did -a bl2 22 %blreasonsel }
var %x = 1
while (%x <= $lines(blreason.txt)) {
did -a bl2 28 $read(blreason.txt,%x)
inc %x
}
var %d = $gettok(%bluser,1-,44), %e = $numtok(%d,44), %f = 1
while (%f <= %e) {
did -a bl2 15 $gettok(%d,%f,44)
inc %f
}
var %a = $gettok(%blchan,1-,44), %b = $numtok(%a,44), %c = 1
while (%c <= %b) {
did -a bl2 17 $gettok(%a,%c,44)
inc %c
}
}
on *:dialog:bl2:sclick:*:{
if ($did == 2) { set %blpower on | did -e bl2 8,12,19,20 }
if ($did == 3) { unset %blpower | did -b bl2 8,12,19,20 }
if ($did == 20) {
if ($did(19).text isalpha) || ($regex($right($did(19).text,-1),/[0-9]/g)) {
noop $input(Please Enter A Number 0 - 9,uho,Error)
did -r bl2 19
}
else { set %blbmask $did(19).text }
}
if ($did == 8) {
if (!$did(7).text) {
noop $input(No Channel Was Entered,uho,ERROR!)
}
elseif ($left($did(7).text,1) != $chr(35)) {
noop $input(Please Enter Channel As Syntax: #channel,uho,Syntax Error!)
did -r bl2 7
}
elseif ($did(7).text) {
if ($istok(%blchan,$did(7).text,44)) {
noop $input(Channel Already Exists,uho,ERROR!)
did -r bl2 7
}
else {
set %blchan $addtok(%blchan,$did(7).text,44)
did -r bl2 7,17
var %a = $gettok(%blchan,1-,44), %b = $numtok(%a,44), %c = 1
while (%c <= %b) {
did -a bl2 17 $gettok(%a,%c,44)
inc %c
}
}
}
}
if ($did == 9) {
if (!$did(7).text) && (!$did(17).seltext) {
noop $input(No Channel Was Entered Or Selected,uho,ERROR!)
}
elseif ($left($did(7).text,1) != $chr(35)) && (!$did(17).seltext) {
noop $input(Please Enter Channel As Syntax: #channel,uho,Syntax Error!)
did -r bl2 7
}
elseif ($did(7).text) && (!$did(17).seltext) {
if ($did(7).text !isin $gettok(%blchan,1-,44)) {
noop $input(Channel Does Not Exists,uho,Error!)
did -r bl2 7
}
elseif ($did(7).text) && (!$did(17).seltext) {
if ($istok(%blchan,$did(7).text,44)) {
set %blchan $remtok(%blchan,$did(7).text,1,44)
did -r bl2 7,17
var %a = $gettok(%blchan,1-,44), %b = $numtok(%a,44), %c = 1
while (%c <= %b) {
did -a bl2 17 $gettok(%a,%c,44)
inc %c
}
}
}
}
elseif ($did(17).seltext) && (!$did(7).text) {
set %blchan $remtok(%blchan,$did(17).seltext,1,44)
did -r bl2 17
var %a = $gettok(%blchan,1-,44), %b = $numtok(%a,44), %c = 1
while (%c <= %b) {
did -a bl2 17 $gettok(%a,%c,44)
inc %c
}
}
}
if ($did == 12) {
if (!$did(11).text) {
noop $input(No Nick Was Entered,uho,ERROR!)
}
elseif ($did(11).text) {
if ($istok(%bluser,$did(11).text,44)) {
noop $input(Nick Already Exists,uwo,ERROR!)
did -r bl2 11
}
elseif ($me !isop $active) { noop $input(You Are NOT an op in the active channel,uho,ERROR!) }
elseif (!%blpower) || (!%blbmask) { noop $input(Please Enter A Ban Mask. Or Turn The Power On,uho,ERROR!) }
elseif (%blpower) && (%blbmask) {
.auser blacklisted $address($did(11).text,%blbmask)
set %bluser $addtok(%bluser,$did(11).text,44)
blacklisted
did -r bl2 11,15
var %d = $gettok(%bluser,1-,44), %e = $numtok(%d,44), %f = 1
while (%f <= %e) {
did -a bl2 15 $gettok(%d,%f,44)
inc %f
}
}
}
}
if ($did == 13) {
if (!$did(11).text) && (!$did(15).seltext) {
noop $input(No Nick Was Entered Or Selected,uho,ERROR!)
}
elseif ($did(11).text) && (!$did(15).seltext) {
if ($did(11).text !isin $gettok(%bluser,1-,44)) {
noop $input(Nick Does Not Exists,uho,Error!)
did -r bl2 11
}
elseif ($did(11).text) && (!$did(15).seltext) {
if ($istok(%bluser,$did(11).text,44)) {
.ruser blacklisted $address($did(11).text,%blbmask)
set %bluser $remtok(%buser,$did(11).text,44)
did -r bl2 11,15
var %d = $gettok(%bluser,1-,44), %e = $numtok(%d,44), %f = 1
while (%f <= %e) {
did -a bl2 15 $gettok(%d,%f,44)
inc %f
}
}
}
}
elseif ($did(15).seltext) && (!$did(11).text) {
.ruser blacklisted $address($did(15).seltext,%blbmask)
set %bluser $remtok(%bluser,$did(15).seltext,1,44)
did -r bl2 15
var %d = $gettok(%bluser,1-,44), %e = $numtok(%d,44), %f = 1
while (%f <= %e) {
did -a bl2 15 $gettok(%d,%f,44)
inc %f
}
}
}
if ($did == 25) {
if (!$did(24).text) {
noop $input(Error Please Enter A BlackList Reason,uho,Error!)
}
elseif ($did(24).text) {
var %ablmessage $read(blreason.txt,w,$did(24).text)
if (%ablmessage == $did(24).text) {
noop $input(BlackList Reason Already Exists,uho,Error!)
did -r bl2 24
}
else {
.write blreason.txt $did(24).text
did -r bl2 24,28
var %x = 1
while ( %x <= $lines(blreason.txt)) {
did -a bl2 28 $read(blreason.txt,%x)
inc %x
}
}
}
}
if ($did == 28) { did -ra bl2 22 $did(28).seltext | set %blreasonsel $did(28).seltext }
if ($did == 26) {
if (!$did(24).text) && (!$did(28).seltext) {
noop $input(No Blacklist Reason Was Entered Or Selected,uho,Error!)
}
elseif ($did(24).text) && (!$did(28).seltext) {
var %dblmessage $read(blreason.txt,w,$did(24).text)
if (%dblmessage != $did(24).text) {
noop $input(Blacklist Reason Does Not Exists,uho,Error!)
did -r bl2 24
}
elseif ($did(24).text) && (!$did(28).seltext) {
var %dblmessage $read(blreason.txt,w,$did(24).text)
if (%dblmessage == $did(24).text) {
write -dl [ $+ [ $readn ] ] blreason.txt
unset %blreasonsel
did -r bl2 22,24,28
var %x = 1
while ( %x <= $lines(blreason.txt)) {
did -a bl2 28 $read(blreason.txt,%x)
inc %x
}
}
}
}
elseif ($did(28).seltext) && (!$did(24).text) {
var %dblmessage $read(blreason.txt,w,$did(28).seltext)
if (%dblmessage == $did(28).seltext) {
write -dl [ $+ [ $readn ] ] blreason.txt
unset %blreasonsel
did -r bl2 22,28
var %x = 1
while ( %x <= $lines(blreason.txt)) {
did -a bl2 28 $read(blreason.txt,%x)
inc %x
}
}
}
}
}
on blacklisted:join:#:{
if (%blpower) && ($me isop #) {
if ($istok(%blchan,$chan,44)) {
ban -k # $nick %blbmask Blacklisted :Reason: $iif(%blreasonsel == $null,Just Because,%blreasonsel)
}
}
}

Comments

Sign in to comment.
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.