mIRC Homepage

Help with nick change tracking and warning

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.
Posted By: sparta

Re: Help with nick change tracking and warning - 31/05/15 08:13 AM

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.
Posted By: raycomp

Re: Help with nick change tracking and warning - 06/06/15 06:19 PM

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?
Posted By: sparta

Re: Help with nick change tracking and warning - 07/06/15 08:16 AM

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
        }
      }
    }
  }
}
Posted By: raycomp

Re: Help with nick change tracking and warning - 07/06/15 10:14 AM

still no message I have changed $comchan to $chan
Posted By: Loki12583

Re: Help with nick change tracking and warning - 07/06/15 12:28 PM

$chan is not valid in a nick event
Posted By: raycomp

Re: Help with nick change tracking and warning - 07/06/15 02:10 PM

mmmm ok thank you
will try to fix it
Posted By: sparta

Re: Help with nick change tracking and warning - 07/06/15 06:07 PM

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.
© 2022 mIRC Discussion Forums