mIRC Home    About    Download    Register    News    Help

Print Thread
Help with nick change tracking and warning #253187 29/05/15 02:06 PM
Joined: May 2013
Posts: 140
R
raycomp Offline OP
Vogon poet
OP Offline
Vogon poet
R
Joined: May 2013
Posts: 140
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.

Re: Help with nick change tracking and warning [Re: raycomp] #253207 31/05/15 08:13 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: Help with nick change tracking and warning [Re: sparta] #253269 06/06/15 06:19 PM
Joined: May 2013
Posts: 140
R
raycomp Offline OP
Vogon poet
OP Offline
Vogon poet
R
Joined: May 2013
Posts: 140
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?

Re: Help with nick change tracking and warning [Re: raycomp] #253280 07/06/15 08:16 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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
        }
      }
    }
  }
}


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: Help with nick change tracking and warning [Re: sparta] #253281 07/06/15 10:14 AM
Joined: May 2013
Posts: 140
R
raycomp Offline OP
Vogon poet
OP Offline
Vogon poet
R
Joined: May 2013
Posts: 140
still no message I have changed $comchan to $chan

Last edited by raycomp; 07/06/15 11:26 AM.
Re: Help with nick change tracking and warning [Re: raycomp] #253283 07/06/15 12:28 PM
Joined: Jan 2004
Posts: 1,352
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,352
$chan is not valid in a nick event

Re: Help with nick change tracking and warning [Re: Loki12583] #253286 07/06/15 02:10 PM
Joined: May 2013
Posts: 140
R
raycomp Offline OP
Vogon poet
OP Offline
Vogon poet
R
Joined: May 2013
Posts: 140
mmmm ok thank you
will try to fix it

Re: Help with nick change tracking and warning [Re: raycomp] #253289 07/06/15 06:07 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }