Add a static network ID #874

Open
opened 2026-10-05 04:49:48 +02:00 by adam · 3 comments
Owner

Currently modules identify the network by its name. But the name can change which causing issues with modules if they have stored network identifiers somewhere else.

An ideal network field would be a static ID that never changes (unless somebody that knows what they're doing does so in the config file). Perhaps an incrementing int for each network created globally so that an individual network can be identified by this single int.

Currently modules identify the network by its name. But the name can change which causing issues with modules if they have stored network identifiers somewhere else. An ideal network field would be a static ID that never changes (unless somebody that knows what they're doing does so in the config file). Perhaps an incrementing int for each network created globally so that an individual network can be identified by this single int. <!-- github-sync-id:365226265 -->
Author
Owner

...why do you rename your networks? Why isn't "inform modules when a network is renamed" a better solution?

...why do you rename your networks? Why isn't "inform modules when a network is renamed" a better solution? <!-- github-comment-id:425743833 -->
Author
Owner

I don't personally rename networks but the option exists, so some people will.

As for informing of modules when a network name changes, this would work if the edge case of "a module being unloaded > network name changes > module loaded" wasn't possible. A static ID would work in every case and no need for any extra logic.

I don't personally rename networks but the option exists, so some people will. As for informing of modules when a network name changes, this would work if the edge case of "a module being unloaded > network name changes > module loaded" wasn't possible. A static ID would work in every case and no need for any extra logic. <!-- github-comment-id:425746286 -->
Author
Owner

The simplest (and therefore recommended and default) type of module is a network module; and network module doesn't care about renaming networks - as far as such module is concerned, there is only 1 network.

If some module does the thing you described... so be it. ZNC can't protect module developers from shooting themselves' foot.

The simplest (and therefore recommended and default) type of module is a network module; and network module doesn't care about renaming networks - as far as such module is concerned, there is only 1 network. If some module does the thing you described... so be it. ZNC can't protect module developers from shooting themselves' foot. <!-- github-comment-id:425747016 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#874