This is my Black list its really really simple i made it for my gf but modifyed the code for all users so it didnt have her name all over it lol so yeah i hope it helps someone it works on a text file called shitlist.txt leave comments / suggestions
Dialog Blist {
Title "Blacklist"
Size -1 -1 81 66
option dbu
Button "Add",1, 1 1 79 12
Button "Del",2, 1 14 79 12
Button "View",3, 1 26 79 12
Button "Done",4, 1 38 79 12
Text "Blacklist By Death Pwn all that fuck with u",5, 1 50 80 12
}
Menu Channel {
.Shitlist { dialog -m Blist Blist }
}
on *:Dialog:Blist:Sclick:4: {
Dialog -x $Dname $Dname
}
on *:Dialog:Blist:Sclick:3: {
run shitlist.txt
}
on *:Dialog:Blist:Sclick:2: {
Write -d Shitlist.txt $$?="Nick To Delete"
}
on *:Dialog:Blist:Sclick:1: {
Write Shitlist.txt $$?="Who To Add"
}
on *:join:#: {
set %shitlisted $nick
if ($nick == $read(shitlist.txt,r,%shitlisted)) {
mode $chan +b $address($nick,4)
kick $chan $nick Pwned By $me
}
Master-Of-Death,
That's not really the correct way to create
an identifier. You simply made a command and
stuck a '$' on the front of it. Typically an
identifier returns a result as does $me.
alias add .auser -a blist $address($1,2)
alias del .ruser $address($1,2)
on @blist:JOIN:#:ban -k # $nick 2 Pwned By $me
You have a point, hmm this may be better...
alias add {
.auser -a Shoot $address($2,3)
}
alias del {
.ruser $address($2,3)
}
on @*:JOIN:#:{ $check
if (%check == yes) { $kill($nick)
}
}
alias check { .set %check $iif($nick iswm $user($address($nick,3),yes,no)
}
alias kill {
raw -q kick # $nick Blacklist
.mode # +b $address($nick,3)
}
I think this works but it needs abit more testing, just getting used to using aliases as identifiers.
Master-Of-Death,
With /ignore you can set an exclude. If the control
tab of address book and notify supported user levels
it would sorta complete user level support. Right now
besides whatever you want to script you can use user
levels in Nick Colors and DCC trusted.
Try to set an ignore on user level enemy
Try to set an exclude on user level friend
How about Notify on user level friend
Menu Channel {
.Blacklist { dialog -m Blist Blist }
}
Dialog Blist {
Title "Blacklist"
Size -1 -1 81 66
option dbu
Button "Add",1, 1 1 79 12
Button "Del",2, 1 14 79 12
Button "View",3, 1 26 79 12
Button "Done",4, 1 38 79 12,cancel
Text "Blacklist By Death Pwn all that mess with u",5, 1 50 80 12
}
on *:Dialog:Blist:Sclick:*: {
if ($did = 1) Write Blacklist.txt $$?="Who To Add"
if ($did = 2) Write -d Blacklist.txt $$?="Nick To Delete"
if ($did = 3) run Blacklist.txt
}
on @*:join:#: {
if $read(blacklist.txt,w,$nick) {
ban -k # $nick 4 Pwned By $me
}
}
However, I agree with Master-Of-Death about
using user levels for this because then it's
easier to use the list for other things like
coloring the nicks in the nicklist if you find
yourself in a channel where you dont have ops
and blocking events etc. (Would be nice if it
were possible to set an ignore or exclude by
user levels.)
@Ghost-writer
A hash table would be pointless. You'd have to make the table, then load the file, add/delete nicks and such and then save. It'd require more time to process the hash table code than the code as it is. Besides, live hash tables cannot be viewed easily without saving to a file. Although, using addresses would be a tad better.
@Master-Of-Death
Looks like you need to read up on aliases before you attempt this on your own.
@D34th
I'll rate it when I get the time, but nice usage of a dialog, as those are always a pain to do layouts by hand. I say 8/10.
@Master-Of-Death
He made this a dialog so that it's easy to use. It takes two seconds to code an alias like that. Also you would use ".auser -a shoot $1" "/add Master-Of-Death". Also ".ruser $2" instead of adding it to a whole new list.
@D34th
It's a good script. You should really look up the persons address to keep them out but if they always use the same nick there's no problem.