From cc20744683481a69ac94e211243bdaf4bc0d9ee8 Mon Sep 17 00:00:00 2001 From: psychon Date: Tue, 8 Jan 2008 19:48:45 +0000 Subject: [PATCH] Small cleanup to calling of OnBoot() for user modules There is no reason to call it indirectly and this should also decrease the binary size a little. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@919 726aef4b-f618-498e-8847-2d620e286838 --- User.cpp | 8 -------- User.h | 1 - znc.cpp | 4 ++-- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/User.cpp b/User.cpp index e2a4bdbe..cc33e720 100644 --- a/User.cpp +++ b/User.cpp @@ -96,14 +96,6 @@ void CUser::DelClients() { m_vClients.clear(); } -bool CUser::OnBoot() { -#ifdef _MODULES - return GetModules().OnBoot(); -#else - return true; -#endif -} - void CUser::IRCConnected(CIRCSock* pIRCSock) { for (unsigned int a = 0; a < m_vClients.size(); a++) { m_vClients[a]->IRCConnected(pIRCSock); diff --git a/User.h b/User.h index 69565188..bad94ef9 100644 --- a/User.h +++ b/User.h @@ -78,7 +78,6 @@ public: void ClearMotdBuffer() { m_MotdBuffer.Clear(); } void ClearQueryBuffer() { m_QueryBuffer.Clear(); } // !Buffers - bool OnBoot(); bool PutIRC(const CString& sLine); bool PutUser(const CString& sLine, CClient* pClient = NULL, CClient* pSkipClient = NULL); diff --git a/znc.cpp b/znc.cpp index eb327584..2c89f9c9 100644 --- a/znc.cpp +++ b/znc.cpp @@ -72,13 +72,13 @@ bool CZNC::OnBoot() { if (!GetModules().OnBoot()) { return false; } -#endif for (map::iterator it = m_msUsers.begin(); it != m_msUsers.end(); it++) { - if (!it->second->OnBoot()) { + if (!it->second->GetModules().OnBoot()) { return false; } } +#endif return true; }