They are not used before OnLoad anyway, but Coverity will be happier.
LOG_TO_SYSLOG = 1 << 1,
LOG_TO_BOTH = LOG_TO_FILE | LOG_TO_SYSLOG
};
- LogMode m_eLogMode;
+ LogMode m_eLogMode = LOG_TO_FILE;
CString m_sLogFile;
};
class CClientNotifyMod : public CModule {
protected:
CString m_sMethod;
- bool m_bNewOnly;
- bool m_bOnDisconnect;
+ bool m_bNewOnly{};
+ bool m_bOnDisconnect{};
set<CString> m_sClientsSeen;
class CCtcpFloodMod : public CModule {
public:
MODCONSTRUCTOR(CCtcpFloodMod) {
- m_tLastCTCP = 0;
- m_iNumCTCP = 0;
-
AddHelpCommand();
AddCommand("Secs", static_cast<CModCommand::ModCmdFunc>(&CCtcpFloodMod::OnSecsCommand), "<limit>", "Set seconds limit");
AddCommand("Lines", static_cast<CModCommand::ModCmdFunc>(&CCtcpFloodMod::OnLinesCommand), "<limit>", "Set lines limit");
}
private:
- time_t m_tLastCTCP;
- unsigned int m_iNumCTCP;
+ time_t m_tLastCTCP = 0;
+ unsigned int m_iNumCTCP = 0;
- time_t m_iThresholdSecs;
- unsigned int m_iThresholdMsgs;
+ time_t m_iThresholdSecs{};
+ unsigned int m_iThresholdMsgs{};
};
template<> void TModInfo<CCtcpFloodMod>(CModInfo& Info) {
MODCONSTRUCTOR(CSASLAuthMod) {
m_Cache.SetTTL(60000/*ms*/);
+ m_cbs[0].id = SASL_CB_GETOPT;
+ m_cbs[0].proc = reinterpret_cast<int(*)()>(CSASLAuthMod::getopt);
+ m_cbs[0].context = this;
+ m_cbs[1].id = SASL_CB_LIST_END;
+ m_cbs[1].proc = NULL;
+ m_cbs[1].context = NULL;
+
AddHelpCommand();
AddCommand("CreateUser", static_cast<CModCommand::ModCmdFunc>(&CSASLAuthMod::CreateUserCommand),
"[yes|no]");
return false;
}
- m_cbs[0].id = SASL_CB_GETOPT;
- m_cbs[0].proc = reinterpret_cast<int(*)()>(CSASLAuthMod::getopt);
- m_cbs[0].context = this;
- m_cbs[1].id = SASL_CB_LIST_END;
- m_cbs[1].proc = NULL;
- m_cbs[1].context = NULL;
-
return true;
}
private:
TCacheMap<CString, unsigned int> m_Cache;
- unsigned int m_uiAllowedFailed;
+ unsigned int m_uiAllowedFailed{};
};
template<> void TModInfo<CFailToBanMod>(CModInfo& Info) {
private:
// If this is NULL, we are turned off for some reason
- CKeepNickTimer* m_pTimer;
+ CKeepNickTimer* m_pTimer = nullptr;
};
CKeepNickTimer::CKeepNickTimer(CKeepNickMod *pMod) : CTimer(pMod, 30, 0,
class CRejoinMod : public CModule {
private:
- unsigned int delay;
+ unsigned int delay = 10;
public:
MODCONSTRUCTOR(CRejoinMod) {
using std::stringstream;
class CNotesMod : public CModule {
- bool bShowNotesOnLogin;
+ bool m_bShowNotesOnLogin{};
void ListCommand(const CString &sLine) {
ListNotes();
virtual ~CNotesMod() {}
virtual bool OnLoad(const CString& sArgs, CString& sMessage) override {
- bShowNotesOnLogin = !sArgs.Equals("-disableNotesOnLogin");
+ m_bShowNotesOnLogin = !sArgs.Equals("-disableNotesOnLogin");
return true;
}
virtual CString GetWebMenuTitle() override { return "Notes"; }
virtual void OnClientLogin() override {
- if (bShowNotesOnLogin) {
+ if (m_bShowNotesOnLogin) {
ListNotes(true);
}
}
}
private:
- bool m_bCloaked;
- bool m_bAuthed;
- bool m_bRequestedWhoami;
- bool m_bRequestedChallenge;
- bool m_bCatchResponse;
+ bool m_bCloaked{};
+ bool m_bAuthed{};
+ bool m_bRequestedWhoami{};
+ bool m_bRequestedChallenge{};
+ bool m_bCatchResponse{};
MCString m_msChanModes;
void PutQ(const CString& sMessage) {
/* Settings */
CString m_sUsername;
CString m_sPassword;
- bool m_bUseCloakedHost;
- bool m_bUseChallenge;
- bool m_bRequestPerms;
- bool m_bJoinOnInvite;
- bool m_bJoinAfterCloaked;
+ bool m_bUseCloakedHost{};
+ bool m_bUseChallenge{};
+ bool m_bRequestPerms{};
+ bool m_bJoinOnInvite{};
+ bool m_bJoinAfterCloaked{};
void SetUsername(const CString& sUsername) {
m_sUsername = sUsername;
}
private:
- unsigned int m_uiIndex;
+ unsigned int m_uiIndex = 0;
};
class CSASLMod : public CModule {