mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
nick change kick/ban? #105784 20/12/04 11:43 PM
Joined: Dec 2004
Posts: 43
M
Morgan7456 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Dec 2004
Posts: 43
Hi all

I was wondering how I can kick/ban someone when they change their nick to a certain nickname. I would say it is something similar to a bad nickname kick/ban script, but I'm only looking to do this for 1 nickname only. Currently, I have written a script that didn't work:

on 1:NICK:{ if $newnick == test123 } /mode # +b $nick | .timer 1 1 /kick # $newnick You are in my PERMANENT Ban On Sight List }

if anyone can help me with my mistakes, I'd greatly appreciate it! thanks confused

Re: nick change kick/ban? #105785 21/12/04 12:02 AM
Joined: Feb 2004
Posts: 714
Z
Zyzzyx26 Offline
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
On a ON Nick event there is no # or $chan, since it's a global event. You'd have to loop through all the $comchan's to perform the actions. Something like:
Code:
on *:nick: {
  var %x = 1
  while ($comchan($newnick,%x)) {
    var %c = $v1
    if ($me isop %c) { code here }
    inc %x
  }
}

Hope this helps smile
Zyzzyx.


"All we are saying is give peace a chance" -- John Lennon
Re: nick change kick/ban? #105786 21/12/04 12:06 AM
Joined: Dec 2004
Posts: 43
M
Morgan7456 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Dec 2004
Posts: 43
so there's no way I can boot the user who changes their nickname in the channel? I'm confused

I have tried
on 1:NICK:/describe $newnick thinks $nick was a nicer nickname!

according to the MIRC help guide, and that didn't work either.

Last edited by Morgan7456; 21/12/04 12:11 AM.
Re: nick change kick/ban? #105787 21/12/04 12:25 AM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Code:
on *:nick:{
  if $newnick == [color:blue]test123[/color] {
    var %i = 1
    while $comchan($newnick,%i) {
      if $me isop $v1 { ban -k $v2 $newnick 2 You are in my PERMANENT Ban On Sight List }
      inc %i
    }
  }
}

Re: nick change kick/ban? #105788 21/12/04 12:29 AM
Joined: Dec 2004
Posts: 43
M
Morgan7456 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Dec 2004
Posts: 43
It didn't work... frown

Re: nick change kick/ban? #105789 21/12/04 12:49 AM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Are you using mIRC v6.16?

Re: nick change kick/ban? #105790 21/12/04 02:50 AM
Joined: Dec 2004
Posts: 43
M
Morgan7456 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Dec 2004
Posts: 43
no I'm not. I'm using an old version 6.03

Re: nick change kick/ban? #105791 21/12/04 03:24 AM
Joined: Nov 2004
Posts: 80
D
DrStein Offline
Babel fish
Offline
Babel fish
D
Joined: Nov 2004
Posts: 80
That's the problem then.

$v1 and $v2 can be used only with mirc 6.16

You can either download the newest version or put a variable inside the while loop to store $comchan($newnick,%i) and replace $v1 , $v2 with the variable

Last edited by DrStein; 21/12/04 03:28 AM.

while (1) { fork(); }
Re: nick change kick/ban? #105792 21/12/04 03:29 AM
Joined: Dec 2004
Posts: 43
M
Morgan7456 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Dec 2004
Posts: 43
so I will need to update mirc or is there another code I can use?

Re: nick change kick/ban? #105793 21/12/04 03:43 AM
Joined: Dec 2004
Posts: 43
M
Morgan7456 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Dec 2004
Posts: 43
I'm sorry I'm not mirc-literate. I only understand simple settings

Re: nick change kick/ban? #105794 21/12/04 04:01 AM
Joined: Nov 2004
Posts: 80
D
DrStein Offline
Babel fish
Offline
Babel fish
D
Joined: Nov 2004
Posts: 80
You can modify lori's code to this one but i can't understand why you dont want to download the newest version confused

Code:
on *:nick:{ 
  if $newnick == test123 {    
    var %i = 1    
    var %x = $comchan($newnick,1)
    while (%x) {      
      if $me isop %x { ban -k %x $newnick 2 You are in my PERMANENT Ban On Sight List }  
      inc %i   
      %x = $comchan($newnick,%i)   
    } 
  }
}
  


while (1) { fork(); }
Re: nick change kick/ban? #105795 21/12/04 04:10 AM
Joined: Dec 2004
Posts: 43
M
Morgan7456 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Dec 2004
Posts: 43
the code didn't work. It's ok. No biggie. The reason why I wanted this code is because we have an annoying chatter that joins our room oftenly. I already have him on my auto kick/ban list. However, he figured out a way to get in with another nickname and he changes it to his regular nickname.

I have talked to the server administrator, but they can't put him on kline due to his use of proxies. but thx anyway

Re: nick change kick/ban? #105796 21/12/04 04:23 AM
Joined: Nov 2004
Posts: 80
D
DrStein Offline
Babel fish
Offline
Babel fish
D
Joined: Nov 2004
Posts: 80
Well ban -k isn't supported in mirc 6.03 blush
So you have to make 1 command for the ban and one for the kick :tongue:

if $me isop %x { ban -k %x $newnick 2 You are in my PERMANENT Ban On Sight List }

delete this and type
Code:
 
if $me isop %x { 
  ban %x $newnick 2
  kick %x $newnick <kick reason> 
}
 

Also you can set a ban only on "nick" (not on host or ip) and the user will be able to join again if he/she changes the nick
ban %x $newnick $+ !*@*


while (1) { fork(); }
Re: nick change kick/ban? #105797 21/12/04 04:24 AM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Here is some code for v6.03.
Code:
on *:nick:{
  if $newnick == test123 {
    var %i = 1,%c
    while $comchan($newnick,%i) {
      %c = $ifmatch
      if $me isop %c { ban %c $newnick 2 | kick %c $newnick You are in my PERMANENT Ban On Sight List }
      inc %i
    }
  }
}

It really is a good idea to update your mIRC though. New versions fix bugs, some serious, as well as adding new features. smile

Last edited by Iori; 21/12/04 04:34 AM.
Re: nick change kick/ban? #105798 21/12/04 04:28 AM
Joined: Dec 2004
Posts: 43
M
Morgan7456 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Dec 2004
Posts: 43
well thx anyway. The codes still don't work. crazy

Re: nick change kick/ban? #105799 21/12/04 04:33 AM
Joined: Nov 2004
Posts: 80
D
DrStein Offline
Babel fish
Offline
Babel fish
D
Joined: Nov 2004
Posts: 80
Lori has forgotten $newnick in: kick %c You are in my PERMANENT Ban On Sight List }

So if you just add $newnick after %c ( kick %c $newnick You are in my PERMANENT Ban On Sight List } )
i don't see any other reason why his code doesn't work.

If you add $newnick and still doesn't work ,type the error message.

Last edited by DrStein; 21/12/04 04:33 AM.

while (1) { fork(); }
Re: nick change kick/ban? #105800 21/12/04 04:36 AM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
You're right lol Thanks smile

@Morgan7456 : Make sure remote events are turned on. /remote on

Re: nick change kick/ban? #105801 21/12/04 04:37 AM
Joined: Dec 2004
Posts: 43
M
Morgan7456 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Dec 2004
Posts: 43
the script doesn't trigger when I do a nick change in one of my rooms with another connection.

Re: nick change kick/ban? #105802 21/12/04 01:41 PM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Code:
alias kicknicks {
  if ($$1 == [color:blue]test123[/color]) {
    var %i = 1
    while ($comchan($1,%i)) {
      if ($comchan($1,%i).op) { 
        ban $comchan($1,%i) $1 2
        kick $comchan($1,%i) $1 You are in my PERMANENT Ban On Sight List
      }
      inc %i
    }
  }
}
on *:nick:{ scon -at1 kicknicks $newnick }


New username: hixxy
Re: nick change kick/ban? #105803 21/12/04 10:44 PM
Joined: Dec 2004
Posts: 43
M
Morgan7456 Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Dec 2004
Posts: 43
* Remote is on (Ctcps,Events,Raw)
-
KICKNICKS Unknown command
-
KICKNICKS Unknown command
-
confused

Page 1 of 2 1 2