mIRC Homepage
Posted By: raycomp Help with nick change tracking and warning - 29/05/15 02:06 PM
I have some users in my channel that makes a nuisance of them selves by continuously changing nicks.
Does any one know or can help with script to track this and warn the user after say the 5th nick change during the period he/she is on line. Maybe reset/delete when he/she then quits.

I do not have a clue if this is possible let alone how to go about it if it is. Any help, suggestions or pointers will be appreciated.
A simple code i used a long time ago, maybe you can do something with it.
Code:
on *:nick: {
  if (%nflood.status == 1) && ($me isop $chan) {
    proc1
    inc $+(-u,%nf.time) $+(%,nick,flood,.,$address($newnick,2)) 
    if ($($+(%,nick,flood,.,$address($newnick,2)),2) >= %nf.amount) {
      var %i = 0
      while (%i < $comchan($newnick,0)) { 
        inc %i
        if ($me isop $comchan($newnick,%i)) {
         echo -at ->> Trigger
        }
      }
    }
  }
}

How to set it up.

/set %nflood.status 1 < 1 = on , 0 = off.
/set %nf.time 10 < During how long time.
/set %nf.amount 3 < How many nick changes during the time set.
Thank you I got it to work to allow max 4 nick changes in time period and then disallow a fifth one.

I need to then send nick a message like :

msg # $nick you had some fun now. Wait 2 minutes before you can change your nick again

I have tried some places but cant get it to work. Any help how/where?
Untested, I also removed a error in the other code. Removed -> proc1
Code:
on *:nick: {
  if (%nflood.status == 1) && ($me isop $chan) {
    inc $+(-u,%nf.time) $+(%,nick,flood,.,$address($newnick,2)) 
    if ($($+(%,nick,flood,.,$address($newnick,2)),2) >= %nf.amount) {
      var %i = 0
      while (%i < $comchan($newnick,0)) { 
        inc %i
        if ($me isop $comchan($newnick,%i)) {
          msg $comchan($newnick,%i) $newnick you had some fun now. Wait 2 minutes before you can change your nick again
        }
      }
    }
  }
}
still no message I have changed $comchan to $chan
$chan is not valid in a nick event
mmmm ok thank you
will try to fix it
Did test it here, working for me. Do you have op in the channel? If not, remove the lines:
Code:
if (%nflood.status == 1) && ($me isop $chan)
Remove
&& ($me isop $chan) {

and also this one
if ($me isop $comchan($newnick,%i)) {

You also need to remove 1 } at the end of the code.
© mIRC Discussion Forums