; Blacklist Script - rCreative 01.07.2011 on *:start: { blacklist.loadhash return 1 } on *:exit: { hsave blacklist blacklist.hash } on *:load: { blacklist.loadhash echo -sag BlackList Script has been loaded succsessfuly by rCreative. return 1 } on !@*:join:#: { if ($hget(blacklist,$wildsite)) blacklist.ban # $nick $v1 return 1 } alias blacklist.loadhash { if (!$hget(blacklist)) { hmake blacklist 100 if ($exists(blacklist.hash)) hload blacklist blacklist.hash } return 1 } alias blacklist.edit { if ($1 == add) && (*!*@*.* iswm $2) { hadd blacklist $2 $iif($3,$3-,None) blacklist.fullscan -s return 1 } elseif ($1 == delete) && (*!*@*.* iswm $2) { if ($hfind(blacklist,$2,0)) { hdel blacklist $v1 | return 1 } return 0 } if (!$isid) { echo -cag info /BLACKLIST.EDIT - insufficient/wrong parameters } return 0 } alias blacklist.fullscan { blacklist.loadhash var %x = 1,%found = 0 while ($chan(%x)) { var %y = 1,%channel = $v1 if ($me isop %channel) { while ($nick(%channel,%y)) { if ($hget(blacklist,$address($v1,2))) { blacklist.ban %channel $nick(%channel,%y) $v1 | inc %found } | inc %y } } inc %x } if (!$isid) && ($1 != -s) echo -catg info  $+ $chan(0) $+  channel(s) scanned,  $+ %found $+  user(s) banned. } alias -l blacklist.ban { if ((!$2) || ($2 !ison $1) || ($1 !ischan)) && (!$isid) { echo -cag info /BLACKLIST.BAN <#channel> | return 0 } ban -k $1 $2 2 You're found in my blacklist for reason: $3- return 1 } alias -l blacklist.dialog.loadinformation { did -ra blacklist.dialog 3 $hget(blacklist,$gettok($did(blacklist.dialog,1).seltext,2,32)) } alias blacklist.dialog { dialog -m blacklist.dialog blacklist.dialog | return 1 } menu * { Blacklist dialog: blacklist.dialog } menu nicklist { Add $1 to your blacklist: $iif($hget(blacklist,$address($1,2)),echo -cag info This user is already in your blacklist.,/BLACKLIST.edit add $address($1,2) $?="Please enter a blacklist reason for the user $1 below:") Remove $1 from your blacklist: $iif($hget(blacklist,$address($1,2)),/BLACKLIST.edit delete $address($1,2),echo -cag info This user is not in your blacklist.) } menu channel { Scan for blacklist: BLACKLIST.fullscan } dialog blacklist.dialog { title "-> Blacklist manager" size -1 -1 264 55 option dbu text "Blacklist Reason:", 2, 1 46 41 8 edit "", 3, 44 45 220 10 button "Add", 4, 227 1 37 12 button "Remove", 5, 227 16 37 12 button "Refresh", 6, 227 31 37 12 list 1, 0 1 226 43, size } on *:dialog:blacklist.dialog:init:0: { did -b $dname 3 var %x = 1 while ($hget(blacklist,%x).item) { did -a $dname 1 %x $+ ) $v1 | did -e $dname 3 | inc %x } did -c $dname 1 1 blacklist.dialog.loadinformation return 1 } on *:dialog:blacklist.dialog:sclick:*: { if ($did == 1) { blacklist.dialog.loadinformation } elseif ($did == 4) { var %address = $?="Please enter the address of the blacklisted user with this format: *!*@*.*" if (*!*@*.* !iswm %address) { noop $input(Error: This address not in this format: *!*@*.*.,ho,Error) | return 0 } if ($hget(blacklist,%address)) { noop $input(Error: This address is already in the blacklist.,ho,Error) | return 0 } BLACKLIST.edit add %address $?="Please enter a blacklist reason for the user below:" noop $input(The address $qt(%address) has been added to the blacklist.,io,Done!) did -r $dname 1 var %x = 1 while ($hget(blacklist,%x).item) { did -a $dname 1 %x $+ ) $v1 | did -e $dname 3 | inc %x } did -c $dname 1 1 blacklist.dialog.loadinformation return 1 } elseif ($did == 5) { did -b $dname 3 hdel blacklist $gettok($did(blacklist.dialog,1).seltext,2,32)) did -r $dname 1 var %x = 1 while ($hget(blacklist,%x).item) { did -a $dname 1 %x $+ ) $v1 | did -e $dname 3 | inc %x } did -c $dname 1 1 blacklist.dialog.loadinformation return 1 } elseif ($did == 6) { blacklist.dialog.loadinformation } return 1 } on *:dialog:blacklist.dialog:edit:3: { hadd blacklist $gettok($did(blacklist.dialog,1).seltext,2,32)) $did($dname,3) return 1 }