"Closing tag "Network" which is not open" when multiple chan tags in one line #831

Closed
opened 2026-10-05 04:47:05 +02:00 by adam · 5 comments
Owner

Using ZNC 1.6.6 on Fedora I recently came across this issue: When creating a config with:

<Network freenode>
      Server     = irc.freenode.net 6667
      <Chan gcc></Chan>
</Network>

I get Error on line 55: Closing tag "Network" which is not open.
But if I get each Chan tag on different lines it works.

Using ZNC 1.6.6 on Fedora I recently came across this issue: When creating a config with: ``` <Network freenode> Server = irc.freenode.net 6667 <Chan gcc></Chan> </Network> ``` I get `Error on line 55: Closing tag "Network" which is not open.` But if I get each `Chan` tag on different lines it works. <!-- github-sync-id:319266059 -->
adam closed this issue 2026-10-05 04:47:05 +02:00
Author
Owner

Well, don't create config like that :) Why are you editing it manually anyway?

Well, don't create config like that :) Why are you editing it manually anyway? <!-- github-comment-id:385784163 -->
Author
Owner

From a quick look at the code: <Chan gcc></Chan> is parsed as a tag with tag Chan and value gcc></Chan. Changing/fixing that would make the code more complicated with little gain. Perhaps it should be a (fatal?) error if a tag or value contains >?

From a quick look at the code: `<Chan gcc></Chan>` is parsed as a tag with tag `Chan` and value `gcc></Chan`. Changing/fixing that would make the code more complicated with little gain. Perhaps it should be a (fatal?) error if a tag or value contains `>`? <!-- github-comment-id:385894971 -->
Author
Owner

How should I modify the configuration? http://wiki.znc.in/Configuration point this znc.conf as the configuration to be modified.
I'm I trying to ansible it. So should I version another file?

The only thing I wanted to point out is that the error message is really not obvious. Fixing it would be great but at least having a clearer message would help.

How should I modify the configuration? http://wiki.znc.in/Configuration point this znc.conf as the configuration to be modified. I'm I trying to ansible it. So should I version another file? The only thing I wanted to point out is that the error message is really not obvious. Fixing it would be great but at least having a clearer message would help. <!-- github-comment-id:386133034 -->
Author
Owner

Channel entries in the conf should appear as:

<Chan #help>
</Chan>

with the literal name of the channel (not just "gcc") and the closing tag on a separate line. This is because information about a specific channel is saved such as:

<Chan #help>
        Detached = true
        Key = test
</Chan>
Channel entries in the conf should appear as: ``` <Chan #help> </Chan> ``` with the literal name of the channel (not just "gcc") and the closing tag on a separate line. This is because information about a specific channel is saved such as: ``` <Chan #help> Detached = true Key = test </Chan> ``` <!-- github-comment-id:386143423 -->
Author
Owner

@Yayg http://wiki.znc.in/Configuration#Editing_config

In most cases you should NOT edit znc.conf directly. Use webadmin instead.

@Yayg http://wiki.znc.in/Configuration#Editing_config > In most cases you should NOT edit znc.conf directly. Use webadmin instead. <!-- github-comment-id:386163752 -->
adam changed title from "Closing tag "Network" which is not open" when multiple chan tags in one line to "Closing tag "Network" which is not open" when multiple chan tags in one line 2026-10-27 15:15:24 +01:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#831