mIRC Home    About    Download    Register    News    Help

Topic Options
#224101 - 05/08/10 12:24 PM Auto Exit a room
botnoob Offline
Ameglian cow

Registered: 14/07/10
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?

Top
#224102 - 05/08/10 12:39 PM Re: Auto Exit a room [Re: botnoob]
5618 Offline
Hoopy frood

Registered: 18/06/07
Posts: 933
See /help on JOIN
Code:
on me:*:JOIN:#channel: part $chan

Top
#224110 - 05/08/10 02:27 PM Re: Auto Exit a room [Re: botnoob]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: NC, USA
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

Top
#224125 - 05/08/10 04:00 PM Re: Auto Exit a room [Re: Riamus2]
botnoob Offline
Ameglian cow

Registered: 14/07/10
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.

Top
#224126 - 05/08/10 05:15 PM Re: Auto Exit a room [Re: botnoob]
botnoob Offline
Ameglian cow

Registered: 14/07/10
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


Edited by botnoob (05/08/10 05:21 PM)

Top
#224128 - 05/08/10 05:25 PM Re: Auto Exit a room [Re: botnoob]
5618 Offline
Hoopy frood

Registered: 18/06/07
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).


Edited by 5618 (05/08/10 05:27 PM)

Top
#224130 - 05/08/10 05:35 PM Re: Auto Exit a room [Re: botnoob]
botnoob Offline
Ameglian cow

Registered: 14/07/10
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

Top
#224136 - 05/08/10 06:56 PM Re: Auto Exit a room [Re: botnoob]
firefox Offline
Fjord artisan

Registered: 11/09/07
Posts: 202
you would be better of with Riamus' code as you would never join the channel that way

Top