|
alias -l _buser { .guser blacklist $1 3 } alias -l _rbuser { .ruser blacklist $1 3 } alias -l _luser { dialog -m _blacklist _blacklist } alias -l _blist { did -r _blacklist 11 var %_btotal = $ulist(*,blacklist,0) , %_b = 0 while (%_b < %_btotal) { inc %_b did -a _blacklist 11 $ulist(*,blacklist,%_b) } } menu nicklist { - Blacklist .Add User { _buser $$1 } .Remove User { _rbuser $$1 } .- .Organize { _luser } } menu channel,status,menubar { - Blacklist { _luser } } dialog _blacklist { title "Blacklist Organizer" size -1 -1 150 110 option dbu text "Enter host to be added/removed:" , 10 , 10 5 95 10 , left combo 11 , 10 15 95 85 , extsel sort autohs autovs edit "" , 12 , 10 95 95 10 , read autohs button "&Add" , 20 , 115 35 30 20 , default button "&Remove" , 30 , 115 60 30 20 , default button "&Ok" , 40 , 115 85 30 20 , ok } on *:dialog:_blacklist:init:*: { _blist } on *:dialog:_blacklist:sclick:*: { if ($did == 20) { if ($did(11).text != $null && $level($did(11).text) != blacklist) { var %_badd = $did(11).text .auser blacklist %_badd _blist did -o $dname 12 1 Added %_badd to blacklist... } elseif ($level($did(11).text) == blacklist) { did -o $dname 12 1 Address already exists... } } if ($did == 30) { if ($did(11).text != $null && $level($did(11).text) == blacklist) { var %_brem = $did(11).text .ruser blacklist %_brem _blist did -o $dname 12 1 Removed %_brem from blacklist... } elseif ($level($did(11).text) != blacklist) { did -o $dname 12 1 Address doesn't exist... } } } on @blacklist:join:#: { mode # -o $nick kick # $nick $nick Have Been Blacklisted! ban $chan $nick 3 }
|
|