mIRC Home    About    Download    Register    News    Help

Print Thread
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.

Joined: Feb 2003
Posts: 3,432
S
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,.) }
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?

Joined: Feb 2003
Posts: 3,432
S
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,.) }
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.
Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
$chan is not valid in a nick event

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

Joined: Feb 2003
Posts: 3,432
S
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,.) }

Link Copied to Clipboard