mIRC Home    About    Download    Register    News    Help

Print Thread
#236165 08/02/12 04:30 PM
Joined: Sep 2007
Posts: 202
F
firefox Offline OP
Fjord artisan
OP Offline
Fjord artisan
F
Joined: Sep 2007
Posts: 202
I am using ZNC with mirc

On a certain network when the znc gets disconnected it tries rejoining a channel once it has reconnected and opens up a window for it in mirc but the channel needs invite so it gives me error: [16:28:33] #chan unable to join channel (invite only)

what event is used with this error - I tried on notice and on snotice but it didn't work

Also as long as the znc has a window open in mirc - ($me ison #chan) is true even if I am not actually in the channel

I have a timer so if ($me !ison#chan) { do_invite_command ) but as the bouncer has a window open this never triggers - any suggestions?

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
The event for that error is RAW 473.


Invision Support
#Invision on irc.irchighway.net
Joined: Sep 2007
Posts: 202
F
firefox Offline OP
Fjord artisan
OP Offline
Fjord artisan
F
Joined: Sep 2007
Posts: 202
ok so I would do something like this?

Code:
raw 473:*channame*invite*only*:{ do_invite_command }

Last edited by firefox; 08/02/12 07:39 PM.
Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
473 has a defined format, so including generic text in the event header is redundant. You could put a specific channel in the header if you want, or leave it as a wildcard and inside the event check that $2 is a channel you have a defined invite command for. Since you know these channels are invite only, maybe you even want to ignore the message using haltdef.

Code:
raw 473:*#chan1*:invite_cmd_1

raw 473:*:{
  if ($2 == #chan1) { invite_cmd_1 }
  elseif ($2 == #chan2) { invite_cmd_2 }
}

Joined: Sep 2007
Posts: 202
F
firefox Offline OP
Fjord artisan
OP Offline
Fjord artisan
F
Joined: Sep 2007
Posts: 202
thank you Loki12583


Link Copied to Clipboard