diff --git a/Buffer.h b/Buffer.h index 95aea6dd..175baccc 100644 --- a/Buffer.h +++ b/Buffer.h @@ -17,7 +17,7 @@ using std::vector; class CBufLine { public: CBufLine(const CString& sPre, const CString& sPost, bool bIncNick); - virtual ~CBufLine(); + ~CBufLine(); void GetLine(const CString& sTarget, CString& sRet) const; const CString& GetPre() const { return m_sPre; } @@ -38,7 +38,7 @@ protected: class CBuffer : private vector { public: CBuffer(unsigned int uLineCount = 100); - virtual ~CBuffer(); + ~CBuffer(); int AddLine(const CString& sPre, const CString& sPost, bool bIncNick = true); /// Same as AddLine, but if there is already a line with sPre it is replaced. diff --git a/Chan.h b/Chan.h index 24fa2a85..fe5c6358 100644 --- a/Chan.h +++ b/Chan.h @@ -51,7 +51,7 @@ public: } EModes; CChan(const CString& sName, CUser* pUser, bool bInConfig); - virtual ~CChan(); + ~CChan(); void Reset(); bool WriteConfig(CFile& File); diff --git a/Client.h b/Client.h index 4729ef85..c6bdf213 100644 --- a/Client.h +++ b/Client.h @@ -39,9 +39,9 @@ public: virtual void AcceptLogin(CUser& User) = 0; virtual void RefuseLogin(const CString& sReason) = 0; - virtual const CString& GetUsername() const { return m_sUsername; } - virtual const CString& GetPassword() const { return m_sPassword; } - virtual const CString& GetRemoteIP() const { return m_sRemoteIP; } + const CString& GetUsername() const { return m_sUsername; } + const CString& GetPassword() const { return m_sPassword; } + const CString& GetRemoteIP() const { return m_sRemoteIP; } private: CString m_sUsername; diff --git a/FileUtils.h b/FileUtils.h index 9b8c9a34..c8c57386 100644 --- a/FileUtils.h +++ b/FileUtils.h @@ -24,7 +24,7 @@ public: CFile(); CFile(const CString& sLongName); CFile(int iFD, const CString& sLongName); - virtual ~CFile(); + ~CFile(); enum EOptions { F_Read = O_RDONLY, @@ -147,11 +147,11 @@ public: m_eSortAttr = CFile::FA_Name; } - virtual ~CDir() { + ~CDir() { CleanUp(); } - virtual void CleanUp() { + void CleanUp() { for (unsigned int a = 0; a < size(); a++) { delete (*this)[a]; } diff --git a/MD5.h b/MD5.h index 8319ed4c..a44c1396 100644 --- a/MD5.h +++ b/MD5.h @@ -30,7 +30,7 @@ public: CMD5(); CMD5(const string& sText); CMD5(const char* szText, uint32 nTextLen); - virtual ~CMD5(); + ~CMD5(); operator string() const { diff --git a/Modules.h b/Modules.h index 7f591898..f2203e7d 100644 --- a/Modules.h +++ b/Modules.h @@ -171,7 +171,7 @@ public: m_sName = sName; m_sPath = sPath; } - virtual ~CModInfo() {} + ~CModInfo() {} bool operator < (const CModInfo& Info) const { return (GetName() < Info.GetName()); @@ -369,68 +369,68 @@ private: class CModules : public vector { public: CModules(); - virtual ~CModules(); + ~CModules(); void SetUser(CUser* pUser) { m_pUser = pUser; } void SetClient(CClient* pClient) { m_pClient = pClient; } void UnloadAll(); - virtual bool OnBoot(); // Return false to abort - virtual bool OnPreRehash(); - virtual bool OnPostRehash(); - virtual bool OnIRCDisconnected(); - virtual bool OnIRCConnected(); - virtual bool OnIRCRegistration(CString& sPass, CString& sNick, CString& sIdent, CString& sRealName); - virtual bool OnBroadcast(CString& sMessage); + bool OnBoot(); // Return false to abort + bool OnPreRehash(); + bool OnPostRehash(); + bool OnIRCDisconnected(); + bool OnIRCConnected(); + bool OnIRCRegistration(CString& sPass, CString& sNick, CString& sIdent, CString& sRealName); + bool OnBroadcast(CString& sMessage); - virtual bool OnDCCUserSend(const CNick& RemoteNick, unsigned long uLongIP, unsigned short uPort, const CString& sFile, unsigned long uFileSize); + bool OnDCCUserSend(const CNick& RemoteNick, unsigned long uLongIP, unsigned short uPort, const CString& sFile, unsigned long uFileSize); - virtual bool OnChanPermission(const CNick& OpNick, const CNick& Nick, CChan& Channel, unsigned char uMode, bool bAdded, bool bNoChange); - virtual bool OnOp(const CNick& OpNick, const CNick& Nick, CChan& Channel, bool bNoChange); - virtual bool OnDeop(const CNick& OpNick, const CNick& Nick, CChan& Channel, bool bNoChange); - virtual bool OnVoice(const CNick& OpNick, const CNick& Nick, CChan& Channel, bool bNoChange); - virtual bool OnDevoice(const CNick& OpNick, const CNick& Nick, CChan& Channel, bool bNoChange); - virtual bool OnRawMode(const CNick& OpNick, CChan& Channel, const CString& sModes, const CString& sArgs); - virtual bool OnMode(const CNick& OpNick, CChan& Channel, char uMode, const CString& sArg, bool bAdded, bool bNoChange); + bool OnChanPermission(const CNick& OpNick, const CNick& Nick, CChan& Channel, unsigned char uMode, bool bAdded, bool bNoChange); + bool OnOp(const CNick& OpNick, const CNick& Nick, CChan& Channel, bool bNoChange); + bool OnDeop(const CNick& OpNick, const CNick& Nick, CChan& Channel, bool bNoChange); + bool OnVoice(const CNick& OpNick, const CNick& Nick, CChan& Channel, bool bNoChange); + bool OnDevoice(const CNick& OpNick, const CNick& Nick, CChan& Channel, bool bNoChange); + bool OnRawMode(const CNick& OpNick, CChan& Channel, const CString& sModes, const CString& sArgs); + bool OnMode(const CNick& OpNick, CChan& Channel, char uMode, const CString& sArg, bool bAdded, bool bNoChange); - virtual bool OnRaw(CString& sLine); + bool OnRaw(CString& sLine); - virtual bool OnStatusCommand(CString& sCommand); - virtual bool OnModCommand(const CString& sCommand); - virtual bool OnModNotice(const CString& sMessage); - virtual bool OnModCTCP(const CString& sMessage); + bool OnStatusCommand(CString& sCommand); + bool OnModCommand(const CString& sCommand); + bool OnModNotice(const CString& sMessage); + bool OnModCTCP(const CString& sMessage); - virtual bool OnQuit(const CNick& Nick, const CString& sMessage, const vector& vChans); - virtual bool OnNick(const CNick& Nick, const CString& sNewNick, const vector& vChans); - virtual bool OnKick(const CNick& Nick, const CString& sOpNick, CChan& Channel, const CString& sMessage); - virtual bool OnJoin(const CNick& Nick, CChan& Channel); - virtual bool OnPart(const CNick& Nick, CChan& Channel); + bool OnQuit(const CNick& Nick, const CString& sMessage, const vector& vChans); + bool OnNick(const CNick& Nick, const CString& sNewNick, const vector& vChans); + bool OnKick(const CNick& Nick, const CString& sOpNick, CChan& Channel, const CString& sMessage); + bool OnJoin(const CNick& Nick, CChan& Channel); + bool OnPart(const CNick& Nick, CChan& Channel); - virtual bool OnClientLogin(); - virtual bool OnClientDisconnect(); - virtual bool OnUserRaw(CString& sLine); - virtual bool OnUserCTCPReply(CString& sTarget, CString& sMessage); - virtual bool OnUserCTCP(CString& sTarget, CString& sMessage); - virtual bool OnUserAction(CString& sTarget, CString& sMessage); - virtual bool OnUserMsg(CString& sTarget, CString& sMessage); - virtual bool OnUserNotice(CString& sTarget, CString& sMessage); - virtual bool OnUserJoin(CString& sChannel, CString& sKey); - virtual bool OnUserPart(CString& sChannel, CString& sMessage); - virtual bool OnUserTopic(CString& sChannel, CString& sTopic); - virtual bool OnUserTopicRequest(CString& sChannel); + bool OnClientLogin(); + bool OnClientDisconnect(); + bool OnUserRaw(CString& sLine); + bool OnUserCTCPReply(CString& sTarget, CString& sMessage); + bool OnUserCTCP(CString& sTarget, CString& sMessage); + bool OnUserAction(CString& sTarget, CString& sMessage); + bool OnUserMsg(CString& sTarget, CString& sMessage); + bool OnUserNotice(CString& sTarget, CString& sMessage); + bool OnUserJoin(CString& sChannel, CString& sKey); + bool OnUserPart(CString& sChannel, CString& sMessage); + bool OnUserTopic(CString& sChannel, CString& sTopic); + bool OnUserTopicRequest(CString& sChannel); - virtual bool OnCTCPReply(CNick& Nick, CString& sMessage); - virtual bool OnPrivCTCP(CNick& Nick, CString& sMessage); - virtual bool OnChanCTCP(CNick& Nick, CChan& Channel, CString& sMessage); - virtual bool OnPrivAction(CNick& Nick, CString& sMessage); - virtual bool OnChanAction(CNick& Nick, CChan& Channel, CString& sMessage); - virtual bool OnPrivMsg(CNick& Nick, CString& sMessage); - virtual bool OnChanMsg(CNick& Nick, CChan& Channel, CString& sMessage); - virtual bool OnPrivNotice(CNick& Nick, CString& sMessage); - virtual bool OnChanNotice(CNick& Nick, CChan& Channel, CString& sMessage); - virtual bool OnTopic(CNick& Nick, CChan& Channel, CString& sTopic); - virtual bool OnTimerAutoJoin(CChan& Channel); + bool OnCTCPReply(CNick& Nick, CString& sMessage); + bool OnPrivCTCP(CNick& Nick, CString& sMessage); + bool OnChanCTCP(CNick& Nick, CChan& Channel, CString& sMessage); + bool OnPrivAction(CNick& Nick, CString& sMessage); + bool OnChanAction(CNick& Nick, CChan& Channel, CString& sMessage); + bool OnPrivMsg(CNick& Nick, CString& sMessage); + bool OnChanMsg(CNick& Nick, CChan& Channel, CString& sMessage); + bool OnPrivNotice(CNick& Nick, CString& sMessage); + bool OnChanNotice(CNick& Nick, CChan& Channel, CString& sMessage); + bool OnTopic(CNick& Nick, CChan& Channel, CString& sTopic); + bool OnTimerAutoJoin(CChan& Channel); CModule* FindModule(const CString& sModule) const; bool LoadModule(const CString& sModule, const CString& sArgs, CUser* pUser, CString& sRetMsg, bool bFake = false); @@ -463,13 +463,13 @@ private: class CGlobalModules : public CModules { public: CGlobalModules() : CModules() {} - virtual ~CGlobalModules() {} + ~CGlobalModules() {} - virtual bool OnConfigLine(const CString& sName, const CString& sValue, CUser* pUser, CChan* pChan); - virtual bool OnDeleteUser(CUser& User); - virtual void OnClientConnect(CClient* pClient, const CString& sHost, unsigned short uPort); - virtual bool OnLoginAttempt(CSmartPtr Auth); - virtual void OnFailedLogin(const CString& sUsername, const CString& sRemoteIP); + bool OnConfigLine(const CString& sName, const CString& sValue, CUser* pUser, CChan* pChan); + bool OnDeleteUser(CUser& User); + void OnClientConnect(CClient* pClient, const CString& sHost, unsigned short uPort); + bool OnLoginAttempt(CSmartPtr Auth); + void OnFailedLogin(const CString& sUsername, const CString& sRemoteIP); private: }; diff --git a/Nick.h b/Nick.h index 48e81538..b4d62c09 100644 --- a/Nick.h +++ b/Nick.h @@ -26,7 +26,7 @@ class CNick public: CNick(); CNick(const CString& sNick); - virtual ~CNick(); + ~CNick(); void Reset(); void Parse(const CString& sNickMask); diff --git a/Server.h b/Server.h index 839a440a..ceb26add 100644 --- a/Server.h +++ b/Server.h @@ -14,7 +14,7 @@ class CServer { public: CServer(const CString& sName, unsigned short uPort = 6667, const CString& sPass = "", bool bSSL = false); - virtual ~CServer(); + ~CServer(); const CString& GetName() const; unsigned short GetPort() const; diff --git a/Template.h b/Template.h index 2fb3247a..46a694fe 100644 --- a/Template.h +++ b/Template.h @@ -27,7 +27,7 @@ public: m_eEscapeTo = CString::EASCII; } - virtual ~CTemplateOptions() {} + ~CTemplateOptions() {} void Parse(const CString& sLine); @@ -50,7 +50,7 @@ public: m_pvRows = pRows; } - virtual ~CTemplateLoopContext() {} + ~CTemplateLoopContext() {} // Setters void SetName(const CString& s) { m_sName = s; } @@ -86,7 +86,7 @@ public: CTemplate() : MCString(), m_spOptions(new CTemplateOptions) {} CTemplate(const CString& sFileName) : MCString(), m_sFileName(sFileName), m_spOptions(new CTemplateOptions) {} CTemplate(const CSmartPtr& Options) : MCString(), m_spOptions(Options) {} - virtual ~CTemplate(); + ~CTemplate(); bool SetFile(const CString& sFileName); bool Print(ostream& oOut = cout); diff --git a/User.h b/User.h index 3b575829..da6d7006 100644 --- a/User.h +++ b/User.h @@ -32,7 +32,7 @@ class CServer; class CUser { public: CUser(const CString& sUserName); - virtual ~CUser(); + ~CUser(); bool PrintLine(CFile& File, const CString& sName, const CString& sValue); bool WriteConfig(CFile& File); diff --git a/Utils.h b/Utils.h index 63164bcf..d834b1e0 100644 --- a/Utils.h +++ b/Utils.h @@ -41,7 +41,7 @@ static const char g_HexDigits[] = "0123456789abcdef"; class CUtils { public: CUtils(); - virtual ~CUtils(); + ~CUtils(); static CString GetIP(unsigned long addr); static unsigned long GetLongIP(const CString& sIP); diff --git a/ZNCString.h b/ZNCString.h index b209f890..8b553de7 100644 --- a/ZNCString.h +++ b/ZNCString.h @@ -77,7 +77,7 @@ public: CString(const char* c) : string(c) {} CString(const char* c, size_t l) : string(c, l) {} CString(const string& s) : string(s) {} - virtual ~CString() {} + ~CString() {} inline unsigned char* strnchr(const unsigned char* src, unsigned char c, unsigned int iMaxBytes, unsigned char* pFill = NULL, unsigned int* piCount = NULL) const; int CaseCmp(const CString& s, unsigned long uLen = CString::npos) const; diff --git a/znc.h b/znc.h index 32e14955..ba12b8bb 100644 --- a/znc.h +++ b/znc.h @@ -27,7 +27,7 @@ public: CSockManager() : TSocketManager() {} virtual ~CSockManager() {} - virtual bool ListenHost(u_short iPort, const CString& sSockName, const CString& sBindHost, int isSSL = false, int iMaxConns = SOMAXCONN, Csock *pcSock = NULL, u_int iTimeout = 0, bool bIsIPv6 = false) { + bool ListenHost(u_short iPort, const CString& sSockName, const CString& sBindHost, int isSSL = false, int iMaxConns = SOMAXCONN, Csock *pcSock = NULL, u_int iTimeout = 0, bool bIsIPv6 = false) { CSListener L(iPort, sBindHost); L.SetSockName(sSockName); @@ -44,11 +44,11 @@ public: return Listen(L, pcSock); } - virtual bool ListenAll(u_short iPort, const CString& sSockName, int isSSL = false, int iMaxConns = SOMAXCONN, Csock *pcSock = NULL, u_int iTimeout = 0, bool bIsIPv6 = false) { + bool ListenAll(u_short iPort, const CString& sSockName, int isSSL = false, int iMaxConns = SOMAXCONN, Csock *pcSock = NULL, u_int iTimeout = 0, bool bIsIPv6 = false) { return ListenHost(iPort, sSockName, "", isSSL, iMaxConns, pcSock, iTimeout, bIsIPv6); } - virtual u_short ListenRand(const CString& sSockName, const CString& sBindHost, int isSSL = false, int iMaxConns = SOMAXCONN, Csock *pcSock = NULL, u_int iTimeout = 0, bool bIsIPv6 = false) { + u_short ListenRand(const CString& sSockName, const CString& sBindHost, int isSSL = false, int iMaxConns = SOMAXCONN, Csock *pcSock = NULL, u_int iTimeout = 0, bool bIsIPv6 = false) { unsigned short uPort = 0; CSListener L(0, sBindHost); @@ -68,11 +68,11 @@ public: return uPort; } - virtual u_short ListenAllRand(const CString& sSockName, int isSSL = false, int iMaxConns = SOMAXCONN, Csock *pcSock = NULL, u_int iTimeout = 0, bool bIsIPv6 = false) { + u_short ListenAllRand(const CString& sSockName, int isSSL = false, int iMaxConns = SOMAXCONN, Csock *pcSock = NULL, u_int iTimeout = 0, bool bIsIPv6 = false) { return(ListenRand(sSockName, "", isSSL, iMaxConns, pcSock, iTimeout, bIsIPv6)); } - virtual bool Connect(const CString& sHostname, u_short iPort , const CString& sSockName, int iTimeout = 60, bool isSSL = false, const CString& sBindHost = "", Csock *pcSock = NULL) { + bool Connect(const CString& sHostname, u_short iPort , const CString& sSockName, int iTimeout = 60, bool isSSL = false, const CString& sBindHost = "", Csock *pcSock = NULL) { CSConnection C(sHostname, iPort, iTimeout); C.SetSockName(sSockName); @@ -90,7 +90,7 @@ class CConnectUserTimer; class CZNC { public: CZNC(); - virtual ~CZNC(); + ~CZNC(); void DeleteUsers(); int Loop(); @@ -223,7 +223,7 @@ protected: class CRealListener : public Csock { public: CRealListener() : Csock() {} - ~CRealListener() {} + virtual ~CRealListener() {} virtual bool ConnectionFrom(const CString& sHost, unsigned short uPort) { DEBUG_ONLY(cout << GetSockName() << " == ConnectionFrom(" << sHost << ", " << uPort << ")" << endl); @@ -258,7 +258,7 @@ public: m_pListener = NULL; } - virtual ~CListener() { + ~CListener() { if (m_pListener) CZNC::Get().GetManager().DelSockByAddr(m_pListener); }