Blacklist

By Noa Destiny on Nov 03, 2007

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 
}

Comments

Sign in to comment.
Reezy   -  Mar 08, 2009

It doesnt show the reason -_-, unless they join a room ur in and it blacklists them again... other than that, its koo

 Respond  
Reezy   -  Mar 08, 2009

the script is great, the description sucks, its not telling any1 what to do, i had to read the comments to find out what to do

 Respond  
guest598594   -  Dec 18, 2007

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

 Respond  
guest598594   -  Dec 18, 2007

i would use a hashtable or maybe an .ini rather than a txt

 Respond  
alanhogan   -  Dec 18, 2007

A bit more description would be great
thanks mate

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.