Startup failure when simple_away is loaded after awaynick #517

Closed
opened 2026-10-05 04:26:48 +02:00 by adam · 4 comments
Owner

ZNC 1.6.0 fails to start when the config file loads awaynick and then simple_away later on because the module is already loaded. Looks identical to the second report here: https://github.com/znc/znc/pull/663#issuecomment-57011375

awaynick automatically loads simple_away instead in 1.6.0. I'd expect it to either not automatically load a different module than requested (just have it do nothing) or ignore the second simple_away load because the first wasn't user-requested.

My two cents are that loading an altogether different module than requested is overzealous. Either ignore the LoadModule or fail outright, this feels like a half-baked compromise to make the awaynick removal easier to swallow, especially when it breaks otherwise-good configs. (This wasn't my config and I have no love for awaynick, kill it with fire.)

ZNC 1.6.0 fails to start when the config file loads awaynick and then simple_away later on because the module is already loaded. Looks identical to the second report here: https://github.com/znc/znc/pull/663#issuecomment-57011375 awaynick automatically loads simple_away instead in 1.6.0. I'd expect it to either not automatically load a different module than requested (just have it do nothing) or ignore the second simple_away load because the first wasn't user-requested. My two cents are that loading an altogether different module than requested is overzealous. Either ignore the LoadModule or fail outright, this feels like a half-baked compromise to make the awaynick removal easier to swallow, especially when it breaks otherwise-good configs. (This wasn't my config and I have no love for awaynick, kill it with fire.) <!-- github-sync-id:71443216 -->
adam closed this issue 2026-10-05 04:26:48 +02:00
Author
Owner

Hm, this case was especially handled...
Please paste the relevant parts of config, e.g. what is in User, what is in Network

Hm, this case was especially handled... Please paste the relevant parts of config, e.g. what is in User, what is in Network <!-- github-comment-id:96955255 -->
Author
Owner

Ignoring LoadModule isn't very good, because user could compile awaynick.so and put to the right place manually, as an external module. In such case ZNC shouldn't prevent user from loading it.

Ignoring LoadModule isn't very good, because user could compile awaynick.so and put to the right place manually, as an external module. In such case ZNC shouldn't prevent user from loading it. <!-- github-comment-id:96955602 -->
Author
Owner

I can reproduce the problem with a combination of user-level LoadModule=simple_away and network-level LoadModule=awaynick.

[ ** ] Loading user [jpnurmi]
[ ** ] Loading network [freenode]
[ .. ] Loading network module [awaynick]...
[ !! ] Module [awaynick] aborted: retired module - see http://wiki.znc.in/awaynick
[ .. ] Loading network module [simple_away] instead...
[ >> ] [./modules/simple_away.so]
[ .. ] Adding server [irc.freenode.net 6667]...
[ >> ] ok
[ .. ] Loading user module [chansaver]...
[ >> ] ok
[ .. ] Loading user module [controlpanel]...
[ >> ] ok
[ .. ] Loading user module [simple_away]...
[ ** ] NOTICE: Module [simple_away] is a network module, loading module for all networks in user.
[ !! ] Module [simple_away] already loaded.
[ ** ] Module [simple_away] already loaded.
[ ** ] Unrecoverable config error.
I can reproduce the problem with a combination of user-level LoadModule=simple_away and network-level LoadModule=awaynick. ``` [ ** ] Loading user [jpnurmi] [ ** ] Loading network [freenode] [ .. ] Loading network module [awaynick]... [ !! ] Module [awaynick] aborted: retired module - see http://wiki.znc.in/awaynick [ .. ] Loading network module [simple_away] instead... [ >> ] [./modules/simple_away.so] [ .. ] Adding server [irc.freenode.net 6667]... [ >> ] ok [ .. ] Loading user module [chansaver]... [ >> ] ok [ .. ] Loading user module [controlpanel]... [ >> ] ok [ .. ] Loading user module [simple_away]... [ ** ] NOTICE: Module [simple_away] is a network module, loading module for all networks in user. [ !! ] Module [simple_away] already loaded. [ ** ] Module [simple_away] already loaded. [ ** ] Unrecoverable config error. ``` <!-- github-comment-id:96962303 -->
Author
Owner

Looks like it can still fail under certain circumstances: http://paste.thezomg.com/18344/14408714/ (running latest from git).

Looks like it can still fail under certain circumstances: http://paste.thezomg.com/18344/14408714/ (running latest from git). <!-- github-comment-id:136021124 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#517