mod.ccontrol/ccontrol.h:26 is #define LOGTOHD, with the comment "Undef this if you want to log to the database" — so both positions of the switch are meant to build. With LOGTOHD undefined, mod.ccontrol does not compile.
In ccontrol::glineChannelUsers(), mod.ccontrol/ccontrol.cc:4949-4971:
4949 opens if (showCGIpsInLogs && ...)
4951 opens for (list<string>::iterator sItr = ipList.begin(); ...)
4953 #ifndef LOGTOHD, 4958 #else, 4970 #endif
- the
for loop's closing brace is at 4969, inside the #else arm, and a second brace follows at 4971
With LOGTOHD defined the #else arm is compiled and the braces balance: 4969 closes the for, 4971 closes the if. With LOGTOHD undefined the #else arm is stripped along with the brace at 4969, so only 4971 remains — it closes the for, and both the if and the function body are left open. Compilation then fails with roughly two dozen errors, the first being
error: qualified-id in declaration before '(' token
at the next definition.
This is visible without compiling anything: because the braces read as unbalanced, subsequent file-scope definitions are indented as if nested — mod.ccontrol/ccontrol.cc:4976 reads void ccontrol::isNowAnOper(iClient * theUser) { with four leading spaces at file scope, and return success; at 4973 is indented eight.
Fix: move the closing brace out of the #else arm to after #endif, and drop the duplicate.
mod.ccontrol/ccontrol.h:26is#define LOGTOHD, with the comment "Undef this if you want to log to the database" — so both positions of the switch are meant to build. WithLOGTOHDundefined,mod.ccontroldoes not compile.In
ccontrol::glineChannelUsers(),mod.ccontrol/ccontrol.cc:4949-4971:4949opensif (showCGIpsInLogs && ...)4951opensfor (list<string>::iterator sItr = ipList.begin(); ...)4953#ifndef LOGTOHD,4958#else,4970#endifforloop's closing brace is at 4969, inside the#elsearm, and a second brace follows at4971With
LOGTOHDdefined the#elsearm is compiled and the braces balance: 4969 closes thefor, 4971 closes theif. WithLOGTOHDundefined the#elsearm is stripped along with the brace at 4969, so only 4971 remains — it closes thefor, and both theifand the function body are left open. Compilation then fails with roughly two dozen errors, the first beingat the next definition.
This is visible without compiling anything: because the braces read as unbalanced, subsequent file-scope definitions are indented as if nested —
mod.ccontrol/ccontrol.cc:4976readsvoid ccontrol::isNowAnOper(iClient * theUser) {with four leading spaces at file scope, andreturn success;at 4973 is indented eight.Fix: move the closing brace out of the
#elsearm to after#endif, and drop the duplicate.