mIRC Home    About    Download    Register    News    Help

Print Thread
#224101 05/08/10 11:24 AM
Joined: Jul 2010
Posts: 23
B
botnoob Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Jul 2010
Posts: 23
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?

Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
See /help on JOIN
Code:
on me:*:JOIN:#channel: part $chan

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net
Joined: Jul 2010
Posts: 23
B
botnoob Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Jul 2010
Posts: 23
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.

Joined: Jul 2010
Posts: 23
B
botnoob Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Jul 2010
Posts: 23
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

Last edited by botnoob; 05/08/10 04:21 PM.
Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
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).

Last edited by 5618; 05/08/10 04:27 PM.
Joined: Jul 2010
Posts: 23
B
botnoob Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: Jul 2010
Posts: 23
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

Joined: Sep 2007
Posts: 202
F
Fjord artisan
Offline
Fjord artisan
F
Joined: Sep 2007
Posts: 202
you would be better of with Riamus' code as you would never join the channel that way


Link Copied to Clipboard