mIRC Home    About    Download    Register    News    Help

Print Thread
Alternatives to ison chan #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?

Re: Alternatives to ison chan [Re: firefox] #236167 08/02/12 05:49 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
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
Re: Alternatives to ison chan [Re: Riamus2] #236170 08/02/12 07:38 PM
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.
Re: Alternatives to ison chan [Re: firefox] #236171 08/02/12 08:42 PM
Joined: Jan 2004
Posts: 1,282
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,282
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 }
}

Re: Alternatives to ison chan [Re: Loki12583] #236185 09/02/12 10:49 AM
Joined: Sep 2007
Posts: 202
F
firefox Offline OP
Fjord artisan
OP Offline
Fjord artisan
F
Joined: Sep 2007
Posts: 202
thank you Loki12583