All pastes #404474 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-03-21 01:16 UTC
rendered paste body
dialog Shitlist {
  title "Shitlist"
  size -1 -1 201 195
  list 2, 3 2 195 160, size
  button "Remove", 3, 70 170 50 20, ok
  button "Close", 4, 135 170 50 20, cancel
  button "Add", 5, 5 170 50 20,
}

on *:dialog:shitlist:init:0:{ 
  var %; = 1 
  var %_ = $hget(shitlist,0).item 
  While (%; <= %_) { 
    did -a shitlist 2 $hget(shitlist,%;).item 
    inc %; 
  } 

} 
on *:dialog:shitlist:sclick:3: { 
  hdel shitlist $hfind(shitlist,$did(shitlist,2).seltext,1).item 
  echo -a 3* Removed $did(shitlist,2).seltext from your shitlist. | /mode #$?="What Channel?:" -b $did(shitlist,2).seltext
  echo -b 3* Closing Shitlist


}
on *:dialog:shitlist:sclick:5: {
  hadd shitlist $hfind(shitlist,$did(shitlist,2).seltext,1).item
  echo -b 3* Added $$1 to your shitlist.   | /mode #$?="What Channel?:" +b $did(shitlist,2).seltext



}

on @*:join:#:{ 
  if ($hget(shitlist,$address($nick,3)))  { 
    ban $chan $nick 3 | ban $chan $nick 3 | kick $chan $nick 14Come back when you can play nicely.  $+ $hget(settings,kicks) 


  } 

} 
menu channel {
  ChanOp 
  .ShitList 
  ..Add:hadd shitlist $address($$1,3) $$1 | echo -a 3* Added $$1 to your shitlist. 3 | var %x 1,%y | while ($chan(%x)) { %: = $ifmatch | if ($me isop %:) && ($1 ison %:) { kick %: $1  14  You have been ShitListed have a nice day. } | inc %x } 
  ..Remove:hdel shitlist $address($$1,3) $$1 | echo -a 3* Removed $$1 from your Shitlist. 
  ..List: dialog -m shitlist shitlist 

} 
on *:load:hmake shitlist 10 
on *:EXIT:{ hsave -o shitlist shitlist.txt } 
on *:START:{ hmake shitlist 10 | hload shitlist shitlist.txt }