mIRC Home    About    Download    Register    News    Help

Print Thread
#150369 02/06/06 04:09 AM
Joined: Oct 2005
Posts: 98
S
Babel fish
OP Offline
Babel fish
S
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.

#150370 02/06/06 06:14 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Code:
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
#150371 02/06/06 06:19 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Here's a slight variation of KingTomato's script
Code:
 on @*:KICK:#: /inc -u10 $+(%,kick.,$nick)
on @*:JOIN:#: {
  if $($+(%,kick.,$nick),2) {
    /ban -ku10 $nick Autorejoin on kick is not nice
  }
} 

#150372 02/06/06 01:45 PM
Joined: Oct 2005
Posts: 98
S
Babel fish
OP Offline
Babel fish
S
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?

#150373 02/06/06 03:11 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Code:
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? grin


-KingTomato
#150374 02/06/06 03:18 PM
Joined: Dec 2005
Posts: 58
S
Babel fish
Offline
Babel fish
S
Joined: Dec 2005
Posts: 58
Has Already Posted Sry ,p

Last edited by SCNDRL; 02/06/06 03:19 PM.
#150375 02/06/06 03:27 PM
Joined: Oct 2005
Posts: 98
S
Babel fish
OP Offline
Babel fish
S
Joined: Oct 2005
Posts: 98
KingTomato, I tried it, but still doesnt do anything after he rejoins.

#150376 02/06/06 03:49 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
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:

Code:
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
#150377 03/06/06 06:29 AM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Just an alternative - should be nickname independant.

Code:
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.
}

#150378 03/06/06 05:19 PM
Joined: Oct 2005
Posts: 98
S
Babel fish
OP Offline
Babel fish
S
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.
#150379 03/06/06 05:21 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
He's missing a channel parameter in the /ban command.

#150380 03/06/06 06:12 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Code:
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
#150381 03/06/06 06:34 PM
Joined: Oct 2005
Posts: 98
S
Babel fish
OP Offline
Babel fish
S
Joined: Oct 2005
Posts: 98
That did the trick, it works perfectly.
Thanks for your help and your quick replies.

#150382 03/06/06 06:35 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
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
Code:
  on @*:KICK:#: /inc -u10 $+(%,kick.,$knick)
on @*:JOIN:#: {
  if $($+(%,kick.,$nick),2) {
    /ban -ku10 $chan $nick Autorejoin on kick is not nice
  }
}  


Link Copied to Clipboard