mIRC Homepage
Posted By: botnoob Auto Exit a room - 05/08/10 11:24 AM
Just wondering if anybody knows if I could auto exit a room, for example I keep getting invited into a room that I wish not to be in, and I have auto accept invites.
Maybe there is a way to write a script to ignore the invite if it is to a specific room?
Posted By: 5618 Re: Auto Exit a room - 05/08/10 11:39 AM
See /help on JOIN
Code:
on me:*:JOIN:#channel: part $chan
Posted By: Riamus2 Re: Auto Exit a room - 05/08/10 01:27 PM
You can also turn off auto-join on invite and set up a script to handle that. /help on invite

Code:
on *:invite:#: {
  if ($chan != #badchan) { join $chan }
}


That would auto-join any channel you're invited to except #badchan. Note that this is for people using /invite to invite you. It won't work if the network is forcing you to join a channel. For that, you'd have to /part it on join as mentioned.
Posted By: botnoob Re: Auto Exit a room - 05/08/10 03:00 PM
thanks guys. laugh

damn people were driving me nuts. It was just 2 people inviting me to 1 channel. so much that i spammed the channel until i was kicked and a server op asked me what happened.
Posted By: botnoob Re: Auto Exit a room - 05/08/10 04:15 PM
i tried both codes but neither seem to work. :s

Riamus, yours was slightly wrong. it had join instead of part

on *:invite:#: {
if ($chan != #badchan) { part $chan }
}

But i did that and it doesn't work
Posted By: 5618 Re: Auto Exit a room - 05/08/10 04:25 PM
Did you change #channel in my script?

If so, what does this return in mIRC?
Code:
//echo -a $os $version $beta $md5($mircexe,2) $script(0) $dll(0) $com(0)


Edit:
And Riamus' code is correct, because he describes as situation where you disable auto-join. His script then checks if ($chan != #channel), meaning if (#invitedchannel ISNOT #channel).
Posted By: botnoob Re: Auto Exit a room - 05/08/10 04:35 PM
ok i got it sorted out. Thanks a lot.


Here is the final code:
on *:JOIN:#badchannel:/part #badchannel

I just have a feeling now that the guys will make an auto invite on exit lol
Posted By: firefox Re: Auto Exit a room - 05/08/10 05:56 PM
you would be better of with Riamus' code as you would never join the channel that way
© mIRC Discussion Forums