mIRC Homepage

Keep channels open not working with ZNC detach

Posted By: eahm

Keep channels open not working with ZNC detach - 23/12/21 04:11 AM

After detaching a channel it closes it too, other clients keep the channel open, not sure it's a bug or a feature, if there is a way to fix this it would be great.

Thanks.
Posted By: Khaled

Re: Keep channels open not working with ZNC detach - 23/12/21 08:54 AM

I have little experience with ZNC, however, if a channel is being closed this presumably means that mIRC is receiving a PART message. Is that the case? Can you enable debugging with "/debug on" and post the raw log for this event?
Posted By: Epic

Re: Keep channels open not working with ZNC detach - 23/12/21 01:10 PM

It is not entirely clear how you want, when leaving the channel window remained open, if server command "/PART #channel" performs leaving, and mIRC automatically closes the channel window.

Maybe you mean when the command "/KICK #channel nick" was executed on your nickname?

Try to examine in your account ZNC the settings and parameters of the modules that are connected to your ZNC. Perhaps it is they who influence this no standard behavior.


If your question is not related to the work of the ZNC, then I can assume that you would like to receive a special switch for the command "/LEAVE -switch #channel", so that your nick was leaving the channel, but the channel window staying open (did not closes) for reading logs. Another variant is if in settings the options or menu for this will appear a special item.

It is possible there may also be some other options for solving this problem.
Posted By: eahm

Re: Keep channels open not working with ZNC detach - 23/12/21 07:37 PM

@Khaled

Code
-> irc.server.com PRIVMSG *status :detach #dstdfgfdg
<- @time=2021-12-23T19:32:05.219Z :eahm!ident@host PART #dstdfgfdg
<- :*status!znc@znc.in PRIVMSG eahm :There was 1 channel matching [#dstdfgfdg]
<- :*status!znc@znc.in PRIVMSG eahm :Detached 1 channel


I see now even the other client has PART but it keeps the channel open after the detach, only the userlist disappears but the chats stay there.

@Epic, no it doesn't and shouldn't close the chan tab if you have "Keep Channels Open" checked.
Posted By: Khaled

Re: Keep channels open not working with ZNC detach - 23/12/21 10:23 PM

Quote
@Epic, no it doesn't and shouldn't close the chan tab if you have "Keep Channels Open" checked.

Yes, it should... the "Keep Channels Open" feature was added long ago to keep channels open if you were kicked from a channel or disconnected from a server, not if you chose to /part a channel.

However, it looks like ZNC is using this method to "detach" a client, ie. a non-user-initiated PART.

The question is whether changing the "Keep Channels Open" feature to keep channel windows open even if you /part a channel would annoy users who have this feature enabled. It certainly would annoy me :-]
Posted By: eahm

Re: Keep channels open not working with ZNC detach - 24/12/21 03:07 AM

Ohh I see, I checked the other client's settings and it has "Keep channels open when part" and "Keep channels open when kicked", two separate options.

Your call, thanks for checking.
Posted By: Khaled

Re: Keep channels open not working with ZNC detach - 24/12/21 10:02 AM

One option might be: if a PART is received, mIRC can check if it sent a corresponding /part. If it didn't, it can assume that it was not user-initiated and keep the window open. But that's assuming that a server will never send a PART message in other contexts. It would also require mIRC to count and match all sent /parts to incoming PART messages, which would require the server to send a PART, or identifiable, related error messages, for every /part that mIRC sends. This sounds somewhat unreliable, depending on how a particular ircd has implemented this.

The other option would be to add a "Keep channels open after /part" option, just to cater for ZNC, which seems somewhat excessive.

It's a shame that there isn't a way for mIRC to know that this is a ZNC message to detach a channel window. I notice in your log that your mIRC sends a "-> irc.server.com PRIVMSG *status :detach #dstdfgfdg"... is this something that you initiated?
Posted By: Epic

Re: Keep channels open not working with ZNC detach - 24/12/21 10:40 AM

In such a case, it would be better if this were implemented through a separate additional option "Keep channels open when part", so that users have a choice.
And this should be disabled by default, so as not to call users nervous irritation ... [Linked Image from i.ibb.co]

An example of how this might look:

    [Linked Image from i.ibb.co]

Also it might be nice if it can be done via a command with a switch so that mIRC knows for sure that the user initiated it himself.

But this shouldn't work if the user wants to close the open channel window via the right-click popup menu.

I'm not sure if it would be a good idea to create something special for a separate service, in which parameters may change over time or another BNC service may be used.


I use "ZNC v1.8.1". Here is my log received in the "/debug @debug" window:
Code
-> irc.epicnet.ru JOIN #testing
<- @time=2021-12-24T12:13:37.556Z :Epic!epicnet@0.0.0.0 JOIN :#testing
-> irc.epicnet.ru WHO #testing
<- @time=2021-12-24T12:13:37.557Z :irc.epicnet.ru 315 Epic #testing :End of /WHO list.
-> irc.epicnet.ru PART #testing
<- @time=2021-12-24T12:13:48.146Z :Epic!epicnet@0.0.0.0 PART #testing :part

Commands used: "/JOIN #testing" ➔ "/WHO #testing" ➔ "/PART #testing".
Posted By: Loki12583

Re: Keep channels open not working with ZNC detach - 24/12/21 02:21 PM

It would annoy me as well. When I detach channels and I want them to close. I also have the 'keep channels open' setting enabled.
Posted By: eahm

Re: Keep channels open not working with ZNC detach - 24/12/21 05:43 PM

Yes, the detach has to be sent manually, it's something the user initiates.

I kind of like to keep the channel open on PART as well so I can make the final choice to close the tab manually, detach keeps the channel open in the ZNC but you don't see it in the list so it's not a technical PART, it's usually an "important" chan that you want to keep and way want to take a look at the chats or links even if you click detach too quickly. Anyway, I'd keep them all open on PART even just not from the ZNC, an extra option to check would be great.
Posted By: eahm

Re: Keep channels open not working with ZNC detach - 08/01/22 07:30 PM

New beta works perfectly, thank you.
© 2022 mIRC Discussion Forums