|
Joined: Oct 2005
Posts: 98
Babel fish
|
OP
Babel fish
Joined: Oct 2005
Posts: 98 |
I was looking for a script that will do something like this:
User gets kicked for some reason User autorejoins The script then kicks and bans the user for like 10 seconds with a reason saying "Autorejoin on kick is not nice"
How would this look like? I hope what I wrote made sense.
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
on @*:KICK:#: /inc -u10 %kick. [ $+ [ $nick ] ]
on @*:JOIN:#: {
if (%kick. [ $+ [ $nick ] ]) {
/ban -u10 $nick 2
/kick $chan $nick Autorejoin on kick is not nice
}
}
I guess?
-KingTomato
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Here's a slight variation of KingTomato's script on @*:KICK:#: /inc -u10 $+(%,kick.,$nick)
on @*:JOIN:#: {
if $($+(%,kick.,$nick),2) {
/ban -ku10 $nick Autorejoin on kick is not nice
}
}
|
|
|
|
Joined: Oct 2005
Posts: 98
Babel fish
|
OP
Babel fish
Joined: Oct 2005
Posts: 98 |
I tried both, but nothing happens, I made a friend turn on autojoin on kick, but when I kick he rejoins and that's it, any thoughts?
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
on @*:KICK:#: /inc -u10 %kick. [ $+ [ $knick ] ]
on @*:JOIN:#: {
if (%kick. [ $+ [ $nick ] ]) {
/ban -u10 $nick 2
/kick $chan $nick Autorejoin on kick is not nice
}
}
I feel foolish. ;p $knick instead,heh. Does it show how long it's been since I've made a 'revenge/protection' script?
-KingTomato
|
|
|
|
Joined: Dec 2005
Posts: 58
Babel fish
|
Babel fish
Joined: Dec 2005
Posts: 58 |
Has Already Posted Sry ,p
Last edited by SCNDRL; 02/06/06 03:19 PM.
|
|
|
|
Joined: Oct 2005
Posts: 98
Babel fish
|
OP
Babel fish
Joined: Oct 2005
Posts: 98 |
KingTomato, I tried it, but still doesnt do anything after he rejoins.
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
You are doing it to a friend, and not yourself--correct? Also, they are rejoining with the same name? That's all I can think of that would interfere. Do you have other channel modes that @ being an operator, that perhaps mIRC doesn't acknowledge you're an operator? Also, this is a little more fail-safe:
on @*:KICK:#: /set -u10 %kick. [ $+ [ $knick ] ] $chan
on @*:JOIN:#: {
/msg $chan %kick. [ $+ [ $nick ] ]
if (%kick. [ $+ [ $nick ] ] == $chan) {
/ban -u10 $nick 2
/kick $chan $nick Autorejoin on kick is not nice
}
}
'Tested it on my setup, and it works.
Last edited by KingTomato; 02/06/06 03:50 PM.
-KingTomato
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
Just an alternative - should be nickname independant. on @*:kick:#:{
if ($knick != $me) inc -u3 $+(%,kick.,$cid,$chan,$wildsite)
}
on @*:join:#:{
if ($eval($+(%,kick.,$cid,$chan,$wildsite),2)) ban -k $chan $nick 2 Autorejoin on kick isn't nice.
}
|
|
|
|
Joined: Oct 2005
Posts: 98
Babel fish
|
OP
Babel fish
Joined: Oct 2005
Posts: 98 |
KingTomato, And I am @ and no other settings in the channel, and yes im doing it to a friend and not myself, and the name is the same upon rejoining, but I get this error in my status window * /ban: invalid parameters (line 9, rejoinkick.mrc)
and this
* /msg: insufficient parameters (line 5, rejoinkick.mrc)
And when the user rejoins, the my client says this: [19:13:05] <@starpossen> #starpossen
Last edited by starpossen; 03/06/06 05:20 PM.
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
He's missing a channel parameter in the /ban command.
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
on @*:KICK:#: /set -u10 %kick. [ $+ [ $knick ] ] $chan
on @*:JOIN:#: {
;/msg $chan %kick. [ $+ [ $nick ] ]
if (%kick. [ $+ [ $nick ] ] == $chan) {
/ban -u10 $chan $nick 2
/kick $chan $nick Autorejoin on kick is not nice
}
}
Thanks hixxy. Wow, can't believe I did that, must have been a late night for me. ;p I also don't usually use /ban though, I'm a /mode type person--I'll use that as my scapegoat. ;p
-KingTomato
|
|
|
|
Joined: Oct 2005
Posts: 98
Babel fish
|
OP
Babel fish
Joined: Oct 2005
Posts: 98 |
That did the trick, it works perfectly. Thanks for your help and your quick replies.
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
I know you've had other replies since I posted mine and you replied with the fact that it didn't work. I see why, and below is the corrected version of the code I gave earlier on @*:KICK:#: /inc -u10 $+(%,kick.,$knick)
on @*:JOIN:#: {
if $($+(%,kick.,$nick),2) {
/ban -ku10 $chan $nick Autorejoin on kick is not nice
}
}
|
|
|
|
|