"break" as "macEXITER" broken for *MODULECALLs? #55

Closed
opened 2026-10-05 03:56:30 +02:00 by adam · 1 comment
Owner

Long term issue on my todo list which I never got around to look into:

We messed with the various *MODULECALL() macros so that they now don't consist any more of a single for()-loop. This means that "break" now might behave differently than it did previously. Someone should go through all places where *MODULECALL is used and check if "break" is used and if does The Right Thing (tm).

Symptoms in case "break" were used in the wrong way: "return HALT;" in a module wouldn't stop other modules from being called (e.g. user module HALTs, but network modules are still called?).

Long term issue on my todo list which I never got around to look into: We messed with the various *MODULECALL() macros so that they now don't consist any more of a single for()-loop. This means that "break" now might behave differently than it did previously. Someone should go through all places where *MODULECALL is used and check if "break" is used and if does The Right Thing (tm). Symptoms in case "break" were used in the wrong way: "return HALT;" in a module wouldn't stop other modules from being called (e.g. user module HALTs, but network modules are still called?). <!-- github-sync-id:3004024 -->
adam closed this issue 2026-10-05 03:56:30 +02:00
Author
Owner

Hooks which cause this issue

src/Chan.cpp:           NETWORKMODULECALL(OnChanBufferPlayLine(*this, *pUseClient, sLine), m_pNetwork->GetUser(), m_pNetwork, NULL, continue);
src/Client.cpp:         NETWORKMODULECALL(OnUserJoin(sChannel, sKey), m_pUser, m_pNetwork, this, continue);
src/Client.cpp:         NETWORKMODULECALL(OnUserPart(sChan, sMessage), m_pUser, m_pNetwork, this, continue);
src/IRCNetwork.cpp:     NETWORKMODULECALL(OnPrivBufferPlayLine(*pClient, sLine), m_pUser, this, NULL, continue);
src/znc.cpp:            USERMODULECALL(OnBroadcast(sMsg), a->second, NULL, continue);
### Hooks which cause this issue ``` src/Chan.cpp: NETWORKMODULECALL(OnChanBufferPlayLine(*this, *pUseClient, sLine), m_pNetwork->GetUser(), m_pNetwork, NULL, continue); src/Client.cpp: NETWORKMODULECALL(OnUserJoin(sChannel, sKey), m_pUser, m_pNetwork, this, continue); src/Client.cpp: NETWORKMODULECALL(OnUserPart(sChan, sMessage), m_pUser, m_pNetwork, this, continue); src/IRCNetwork.cpp: NETWORKMODULECALL(OnPrivBufferPlayLine(*pClient, sLine), m_pUser, this, NULL, continue); src/znc.cpp: USERMODULECALL(OnBroadcast(sMsg), a->second, NULL, continue); ``` <!-- github-comment-id:5760744 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#55