mIRC Homepage
Posted By: oSaYaP Automatic NICK ban - 11/12/03 07:25 AM
I want to make a code that make this:
if a nick join on my channel (#example) if his nick contains the word "[censored]" lik[04:21] * Rep-Tilt is now known as ArMaNie "hi-[censored]" "lets-[censored]" "[censored]-you" my script bans him automaticaly, that´s the first thing i want to do, now i want not only ban the nick that contains "[censored]" instead of that i want to create a varialble like "%antinicks" and set that variable with a lot of prohibit words in nicks and the last thing i want to do is this:
if the nick exclude my ban with a "normal" nick and he change his nick on the channel like:
* Rep-Tilt is now known as [censored]-you <-- there my script shoulf ban him too if you can help my doing this i would thank you a lot
Thanks smile
Posted By: KingTomato Re: Automatic NICK ban - 11/12/03 07:31 AM
this should get you started:

Code:
on *:NICK: {
  ; Add Swears, seperated by commas
  var %swears = [censored],[censored],ass,bitch
  ; Kick Message here
  var %kickmsg = Please find a cleaner name
  ;
  var %c = 1
  while ($comchan($newnick, %c)) {
    var %chan = $ifmatch
    var %t = 1
    while ($gettok(%swears, %t, 44)) {
      var %swear = $ifmatch
      if ((%swear isin $newnick) &amp;&amp; ($me isop %chan)) {
        /mode %chan +b $newnick $address($newnick, 11)
        /kick %chan $newnick %kickmsg
      }
      /inc %t
    }
    /inc %c
  }
}[
Posted By: RockHound Re: Automatic NICK ban - 11/12/03 07:36 AM
try this to start
--------------------------
on ^*:JOIN:#:{
if (swear isin $nick) {
mode # +b $nick
kick # $nick reason
}
---------------------

as for second part, i would not make a huge list of vars i would us a txt file for the list.
Posted By: Talea Re: Automatic NICK ban - 11/12/03 12:29 PM
Here's a simple bad nick kicker that will work...

Code:
on @*:JOIN:#: {
if ( [censored] isin $nick ) || ([censored] isin $nick ) {
ban -u30 $chan $nick $+ *!*@*
kick $chan $nick Banned: Unacceptable nick
}
}

Replace the censored words with your bad nicks... this kick will only activate ONLY when you are opped. The ban time is 30 seconds and it only kicks on the nick not the address but you can change it to whatever you like.

If you have mirc 6.12 then change the coding as follows:
on @*:JOIN:#: {
if ( [censored] isin $nick ) || ([censored] isin $nick ) {
ban -ku30 $chan $nick $+ *!*@* Banned: Unacceptable nick
}
}


Posted By: theRat Re: Automatic NICK ban - 11/12/03 12:39 PM
Why wait people to join with bad nicks when you can just ban *<insert swearword here>*!*@*
Posted By: Talea Re: Automatic NICK ban - 12/12/03 12:14 PM
Some people are lazy and don't want to manually ban... smile

Or if there are *services* available aka dalnet - they can use those services to do all the work for 'em.
Posted By: KingTomato Re: Automatic NICK ban - 12/12/03 06:29 PM
That's true, which is why I did the nick event. This way they can't join the channel with a nice name, then switch it once they join. >:D
© mIRC Discussion Forums