Bad Nick List

By StaticX__ on Aug 12, 2008

A Simple Bad Nick List. It bans all nicks that join in channel and you can check the channel if it has users with bad nicks.
You have to write some nick masks in a file called badnicks.txt like this:
ass
sex
fuck


To clear the bad nicks in channel simply type /checknicks.

on !*:JOIN:#:{
  var %x = 1
  while (%x <= $lines($mircdirbadnicks.txt)) {
    if ($read(badnicks.txt,%x) iswm $nick) {
      kick $chan $nick Unallowed nick. < $+ $read(badnicks.txt,%x) $+ >
      ban $chan $address($nick,3)
    }
    inc %x
  }
}

alias checknicks {
  var %x = 1
  while (%x <= $lines($mircdirbadnicks.txt)) {
    var %i = 1
    while (%i <= $nick($chan,%i)) {
      if ($read(badnicks.txt,%x) iswm $nick($chan,%i)) {
        kick $chan $nick($chan,%i) Unallowed nick. < $+ $read(badnicks.txt,%x) $+ >
        ban $chan $nick($chan,%i)
      }
      inc %i
    }
    inc %x
  }
}

on !*:NICK:{ checknicks }

Comments

Sign in to comment.
Soulkeeper   -  Aug 12, 2008

tokens or regex ftw. :/

 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.