Well i was bored hope you enjoy it :)
on @*:JOIN:#: { if ($read(blacklist.txt, s, $address($nick,2))) { /set %blackl $calc(%blackl + 1) | mode $chan -o+b $nick $address($nick,2) | kick $chan $nick Blacklisted (- $+ %blackl $+ -) [ $+ $gettok($read(blacklist.txt,$readn),3-,32) $+ ] } } alias blackconf if $dialog(blacklist) == $null dialog -m blacklist blacklist
dialog blacklist {
title "Blacklist"
icon $scriptdir $+ black.ico,0
size -1 -1 400 350
button "&Close", 1, 20 270 70 20,ok
list 2, 10 20 380 255, vsbar
box Nick $chr(124) Address $chr(124) Reason, 3, 5 5 390 260
text "You can remove a lammer by duble clicking his info", 8, 110 270 370 45
text "Blacklist 1.05 by Bakura a.k.a DMX", 9, 110 300 370 45
text "Lamer(s) kicked", 11, 80 316 370 45
edit - $+ %blackl $+ -, 10, 15 315 60 20,read center
}
alias blacksetup if $dialog(blacklist) == $null dialog -m blacklist blacklist
on *:dialog:blacklist:dclick:2:{ /set %blackrivi $did(2).sel | /set %blackteksti $gettok($did(2).seltext,2,32) | did -d blacklist 2 $did(2).sel 1 | echo -a $timestamp $+ %blackteksti $+ is now removed from Blacklist | write -dl $+ %blackrivi blacklist.txt }
on *:dialog:blacklist:init:*:{
var %i = 1
while (%i <= $lines(blacklist.txt)) {
did -a blacklist 2 $gettok($read(blacklist.txt,%i),2,32) $chr(124) $gettok($read(blacklist.txt,%i),1,32) $chr(124) $gettok($read(blacklist.txt,$readn),3,32)
inc %i
}
}
menu nicklist {
$iif($$1 = $me,$style(2)) &-Blacklist-
.Add $$1:{ if (!$read(blacklist.txt, s, $$1)) { $iif(%blackl,inc %blackl,set %blackl 1) | write blacklist.txt $address($$1,2) $$1 $?="Reason?" | echo -a $timestamp $address($$1,2) is now on blacklist! (- $+ %blackl $+ -) | mode $chan -o+b $$1 $address($$1,2) | kick $chan $$1 Blacklisted (- $+ %blackl $+ -) } | else { $timestamp echo -a $$1 is allready on BlackList } }
.Blacklist manager:blacksetup
}
menu channel {
Blacklist
.Blacklist manager:blacksetup
}
I just tested the code, and i agree, you need to explain in description, i didnt know i was supposd to right click a nick
few errors:
giving blank reasons screws up
u didnt check for op
*duznt put address in dialog
again, i highly suggest using a hash table or ini, because with a txt, you can add the same nick twice, which isnt needed
also, it would be nice if you update the dialog when you add ppl