mIRC Homepage
Posted By: firefox Alternatives to ison chan - 08/02/12 04:30 PM
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?
Posted By: Riamus2 Re: Alternatives to ison chan - 08/02/12 05:49 PM
The event for that error is RAW 473.
Posted By: firefox Re: Alternatives to ison chan - 08/02/12 07:38 PM
ok so I would do something like this?

Code:
raw 473:*channame*invite*only*:{ do_invite_command }
Posted By: Loki12583 Re: Alternatives to ison chan - 08/02/12 08:42 PM
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 }
}
Posted By: firefox Re: Alternatives to ison chan - 09/02/12 10:49 AM
thank you Loki12583
© mIRC Discussion Forums