mIRC Home    About    Download    Register    News    Help

Topic Options
#253187 - 29/05/15 03:06 PM Help with nick change tracking and warning
raycomp Offline
Vogon poet

Registered: 04/05/13
Posts: 109
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.

Top
#253207 - 31/05/15 09:13 AM Re: Help with nick change tracking and warning [Re: raycomp]
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
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,.) }

Top
#253269 - 06/06/15 07:19 PM Re: Help with nick change tracking and warning [Re: sparta]
raycomp Offline
Vogon poet

Registered: 04/05/13
Posts: 109
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?

Top
#253280 - 07/06/15 09:16 AM Re: Help with nick change tracking and warning [Re: raycomp]
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
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,.) }

Top
#253281 - 07/06/15 11:14 AM Re: Help with nick change tracking and warning [Re: sparta]
raycomp Offline
Vogon poet

Registered: 04/05/13
Posts: 109
still no message I have changed $comchan to $chan


Edited by raycomp (07/06/15 12:26 PM)

Top
#253283 - 07/06/15 01:28 PM Re: Help with nick change tracking and warning [Re: raycomp]
Loki12583 Offline
Hoopy frood

Registered: 22/01/04
Posts: 1271
$chan is not valid in a nick event

Top
#253286 - 07/06/15 03:10 PM Re: Help with nick change tracking and warning [Re: Loki12583]
raycomp Offline
Vogon poet

Registered: 04/05/13
Posts: 109
mmmm ok thank you
will try to fix it

Top
#253289 - 07/06/15 07:07 PM Re: Help with nick change tracking and warning [Re: raycomp]
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
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,.) }

Top