Alias Blacklist

By Demothense on Dec 27, 2008

k it is what it is
+blk Nickname
to blacklist
-blk
to take them off
.list will tell you who is on it
it may have a few bugs if so feel free to point them out

on *:input:#:{
  if ($1 == +blk) { /write blacklist.txt $2 | set %nick $2 | set %rp $address($2,4) | /write blacklist.txt %rp | echo 14 $2 Has been added to your blacklist. | kick $chan $2 }
  if ($1 == -blk) { /write -ds %rp blacklist.txt | /write -ds $2 blacklist.txt | echo 14 $2 Has been removed from your blacklist | unset %nick | unset %rp }
  if ($1 == .list) { 
    var %count = 0
    var %i = 1
    while (%i <= $lines(blacklist.txt)) {
      //echo   - $+ $read(blacklist.txt, %i)       
      inc %i
      inc %count
    }
    if (%count == 0) {
      echo    None.  
    }
  }
}
on *:JOIN:#:{ 
  if ($read(blacklist.txt,w,$nick)) || ($read(blacklist.txt,w,$address($nick,4))) {
    ban $chan %rp | kick $chan $nick 10 Shitlist: %nick , IP: %rp | unset %t
    else halt {
    }
  }
}

Comments

Sign in to comment.
Cmd   -  Mar 20, 2009

İ`m Turk :) code converter turkish language

on *:input:#:{
  if ($1 == +b) { /write karaliste.txt $2 | set %nick $2 | set %rp $address($2,4) | /write karaliste.txt %rp | echo -t @KaraListe 14 $2 Nickli şahıs listeye eklendi. | kick $chan $2 }
  if ($1 == -b) { /write -ds %rp blacklist.txt | /write -ds $2 blacklist.txt | echo -t @KaraListe 14 $2 Nickli şahıs listeden silindi | unset %nick | unset %rp }
  if ($1 == .liste) { 
    var %count = 0
    var %i = 1
    while (%i <= $lines(karaliste.txt)) {
      //echo -t @BLackList : $+ $read(karaliste.txt, %i)       
      inc %i
      inc %count
    }
    if (%count == 0) {
      echo    None.  
    }
  }
}
on @*:JOIN:#:{ 
  if ($read(karaliste.txt,w,$nick)) || ($read(karaliste.txt,w,$address($nick,4))) {
    ban $chan %rp | kick $chan $nick 10 KaraListe: %nick , IP: %rp | unset %t
    else halt {
    }
  }
}

menu @KaraListe {
  Ekranı Temizle:clear
  Ekranı Kapat:window -c @KaraListe
}

on *:start:{ window -en @KaraListe }

Nice work snipp thank you man.
Channel write : +b $nick added karaliste.txt show @KaraListe diyalog.

 Respond  
azteca4life   -  Dec 31, 2008

when i try to view the blacklist doesnt work

 Respond  
Demothense   -  Dec 29, 2008

Yes i got it to work I'm gonna try and make it so certain rooms are halted

 Respond  
[DX]   -  Dec 29, 2008

Obviously you make some mistake in typo.

 Respond  
Demothense   -  Dec 29, 2008

okay :(
I did what you said [dx] and I got a

  • /write: insufficient parameters (line 3, blacklist.zs)
    so I put the original code in it and now it does teh same thing
    it will add not take away
    ;(
 Respond  
[DX]   -  Dec 27, 2008

When you set %rp variable for one address, it's repleaced with other address on other setting.
And no need for it.

set %rp $address($2,4) | /write blacklist.txt %rp

Can be done as

write blacklist.txt $address($2,4)
 Respond  
mkbln7   -  Dec 27, 2008

Awesome script!

 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.