|
Joined: Dec 2004
Posts: 43
Ameglian cow
|
OP
Ameglian cow
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
|
|
|
|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
Hoopy frood
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: on *:nick: {
var %x = 1
while ($comchan($newnick,%x)) {
var %c = $v1
if ($me isop %c) { code here }
inc %x
}
} Hope this helps Zyzzyx.
"All we are saying is give peace a chance" -- John Lennon
|
|
|
|
Joined: Dec 2004
Posts: 43
Ameglian cow
|
OP
Ameglian cow
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.
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
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
}
}
}
|
|
|
|
Joined: Dec 2004
Posts: 43
Ameglian cow
|
OP
Ameglian cow
Joined: Dec 2004
Posts: 43 |
It didn't work...
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
Are you using mIRC v6.16?
|
|
|
|
Joined: Dec 2004
Posts: 43
Ameglian cow
|
OP
Ameglian cow
Joined: Dec 2004
Posts: 43 |
no I'm not. I'm using an old version 6.03
|
|
|
|
Joined: Nov 2004
Posts: 80
Babel fish
|
Babel fish
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(); }
|
|
|
|
Joined: Dec 2004
Posts: 43
Ameglian cow
|
OP
Ameglian cow
Joined: Dec 2004
Posts: 43 |
so I will need to update mirc or is there another code I can use?
|
|
|
|
Joined: Dec 2004
Posts: 43
Ameglian cow
|
OP
Ameglian cow
Joined: Dec 2004
Posts: 43 |
I'm sorry I'm not mirc-literate. I only understand simple settings
|
|
|
|
Joined: Nov 2004
Posts: 80
Babel fish
|
Babel fish
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
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(); }
|
|
|
|
Joined: Dec 2004
Posts: 43
Ameglian cow
|
OP
Ameglian cow
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
|
|
|
|
Joined: Nov 2004
Posts: 80
Babel fish
|
Babel fish
Joined: Nov 2004
Posts: 80 |
Well ban -k isn't supported in mirc 6.03 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
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(); }
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
Here is some code for v6.03. 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.
Last edited by Iori; 21/12/04 04:34 AM.
|
|
|
|
Joined: Dec 2004
Posts: 43
Ameglian cow
|
OP
Ameglian cow
Joined: Dec 2004
Posts: 43 |
well thx anyway. The codes still don't work.
|
|
|
|
Joined: Nov 2004
Posts: 80
Babel fish
|
Babel fish
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(); }
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
You're right lol Thanks @Morgan7456 : Make sure remote events are turned on. /remote on
|
|
|
|
Joined: Dec 2004
Posts: 43
Ameglian cow
|
OP
Ameglian cow
Joined: Dec 2004
Posts: 43 |
the script doesn't trigger when I do a nick change in one of my rooms with another connection.
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
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
|
|
|
|
Joined: Dec 2004
Posts: 43
Ameglian cow
|
OP
Ameglian cow
Joined: Dec 2004
Posts: 43 |
* Remote is on (Ctcps,Events,Raw) - KICKNICKS Unknown command - KICKNICKS Unknown command -
|
|
|
|
|