Merge branch '1.6.x'

Conflicts:
	modules/cyrusauth.cpp
	modules/keepnick.cpp
	modules/notes.cpp
This commit is contained in:
Alexey Sokolov
2015-10-30 14:56:28 +00:00
11 changed files with 32 additions and 34 deletions

View File

@@ -198,7 +198,7 @@ private:
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;
};

View File

@@ -22,8 +22,8 @@ using std::set;
class CClientNotifyMod : public CModule {
protected:
CString m_sMethod;
bool m_bNewOnly;
bool m_bOnDisconnect;
bool m_bNewOnly{};
bool m_bOnDisconnect{};
set<CString> m_sClientsSeen;

View File

@@ -21,9 +21,6 @@
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");
@@ -131,11 +128,11 @@ public:
}
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) {

View File

@@ -31,6 +31,13 @@ public:
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 = nullptr;
m_cbs[1].context = nullptr;
AddHelpCommand();
AddCommand("CreateUser", static_cast<CModCommand::ModCmdFunc>(&CSASLAuthMod::CreateUserCommand),
"[yes|no]");
@@ -77,13 +84,6 @@ public:
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 = nullptr;
m_cbs[1].context = nullptr;
return true;
}

View File

@@ -196,7 +196,7 @@ public:
private:
TCacheMap<CString, unsigned int> m_Cache;
unsigned int m_uiAllowedFailed;
unsigned int m_uiAllowedFailed{};
};
template<> void TModInfo<CFailToBanMod>(CModInfo& Info) {

View File

@@ -192,7 +192,7 @@ public:
private:
// If this is nullptr, we are turned off for some reason
CKeepNickTimer* m_pTimer;
CKeepNickTimer* m_pTimer = nullptr;
};
CKeepNickTimer::CKeepNickTimer(CKeepNickMod *pMod) : CTimer(pMod, 30, 0,

View File

@@ -47,7 +47,7 @@ protected:
class CRejoinMod : public CModule {
private:
unsigned int delay;
unsigned int delay = 10;
public:
MODCONSTRUCTOR(CRejoinMod) {

View File

@@ -19,7 +19,7 @@
using std::stringstream;
class CNotesMod : public CModule {
bool bShowNotesOnLogin;
bool m_bShowNotesOnLogin{};
void ListCommand(const CString &sLine) {
ListNotes();
@@ -85,14 +85,14 @@ public:
virtual ~CNotesMod() {}
bool OnLoad(const CString& sArgs, CString& sMessage) override {
bShowNotesOnLogin = !sArgs.Equals("-disableNotesOnLogin");
m_bShowNotesOnLogin = !sArgs.Equals("-disableNotesOnLogin");
return true;
}
CString GetWebMenuTitle() override { return "Notes"; }
void OnClientLogin() override {
if (bShowNotesOnLogin) {
if (m_bShowNotesOnLogin) {
ListNotes(true);
}
}

View File

@@ -372,11 +372,11 @@ public:
}
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) {
@@ -590,11 +590,11 @@ private:
/* 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;

View File

@@ -61,7 +61,7 @@ public:
}
private:
unsigned int m_uiIndex;
unsigned int m_uiIndex = 0;
};
class CSASLMod : public CModule {

View File

@@ -475,6 +475,7 @@ bool CIRCNetwork::ParseConfig(CConfig *pConfig, CString& sError, bool bUpgrade)
CUtils::PrintError(sError);
CZNC::DumpConfig(pSubConf);
delete pChan;
return false;
}