From e72c445694e1de04eb9769f0667a3baa2f3243d4 Mon Sep 17 00:00:00 2001 From: psychon Date: Mon, 7 Jan 2008 21:31:16 +0000 Subject: [PATCH] Clean up includes All the headers are now self-contained (g++ Header.h -o /dev/null). Some system headers where moved to the .cpp they are actually needed in, some of our own headers are includes less. (Especially MD5.h) Headers are sorted alphabetically while in e.g. FileUtils.cpp FileUtils.h is the first file included. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@915 726aef4b-f618-498e-8847-2d620e286838 --- Buffer.h | 1 + Chan.cpp | 5 ++--- Chan.h | 8 ++++---- Client.cpp | 7 +++---- Client.h | 2 +- DCCBounce.cpp | 1 + DCCBounce.h | 3 --- DCCSock.cpp | 1 + DCCSock.h | 7 ++++--- FileUtils.cpp | 7 ++----- FileUtils.h | 17 +++++------------ HTTPSock.h | 3 --- IRCSock.cpp | 6 +++--- IRCSock.h | 9 ++++----- MD5.cpp | 4 ++-- Modules.cpp | 12 +++++++----- Modules.h | 18 +++++++++--------- Nick.cpp | 4 ++-- Nick.h | 3 ++- Server.cpp | 1 - String.cpp | 5 ++++- String.h | 19 ++----------------- Template.cpp | 3 +-- Template.h | 3 +-- Timers.h | 5 ++++- User.cpp | 13 +++++-------- User.h | 22 +++++++++------------- Utils.cpp | 11 ++++------- Utils.h | 15 ++++++--------- main.cpp | 7 +------ main.h | 1 - modules/autoattach.cpp | 5 +---- modules/autoop.cpp | 5 +---- modules/away.cpp | 9 +-------- modules/awaynick.cpp | 6 +----- modules/chansaver.cpp | 7 ++----- modules/crypt.cpp | 6 +----- modules/email.cpp | 13 ++++--------- modules/imapauth.cpp | 7 ------- modules/kickrejoin.cpp | 3 +-- modules/modperl.cpp | 7 +------ modules/nickserv.cpp | 8 -------- modules/partyline.cpp | 6 ------ modules/perform.cpp | 8 -------- modules/raw.cpp | 4 ---- modules/sample.cpp | 5 +---- modules/saslauth.cpp | 3 +-- modules/savebuff.cpp | 9 ++------- modules/schat.cpp | 13 ++----------- modules/shell.cpp | 8 -------- modules/stickychan.cpp | 10 +--------- modules/watch.cpp | 9 ++------- modules/webadmin.cpp | 12 +++++------- znc.cpp | 14 +++----------- znc.h | 8 +++----- 55 files changed, 123 insertions(+), 285 deletions(-) diff --git a/Buffer.h b/Buffer.h index e22d9244..17304d04 100644 --- a/Buffer.h +++ b/Buffer.h @@ -11,6 +11,7 @@ #include "String.h" #include + using std::vector; class CBufLine { diff --git a/Chan.cpp b/Chan.cpp index 38c9c2bd..feb4624d 100644 --- a/Chan.cpp +++ b/Chan.cpp @@ -7,10 +7,9 @@ */ #include "Chan.h" -#include "znc.h" -#include "User.h" -#include "Utils.h" #include "IRCSock.h" +#include "User.h" +#include "znc.h" CChan::CChan(const CString& sName, CUser* pUser, bool bInConfig) { m_sName = sName.Token(0); diff --git a/Chan.h b/Chan.h index d2a44739..2246b9d7 100644 --- a/Chan.h +++ b/Chan.h @@ -9,20 +9,20 @@ #ifndef _CHAN_H #define _CHAN_H -#include "main.h" +#include "FileUtils.h" #include "Nick.h" #include "String.h" -#include "FileUtils.h" -#include "Client.h" -#include #include #include +#include + using std::vector; using std::map; using std::set; // Forward Declarations class CUser; +class CClient; // !Forward Declarations class CChan { diff --git a/Client.cpp b/Client.cpp index 3831a818..87ab28e1 100644 --- a/Client.cpp +++ b/Client.cpp @@ -6,14 +6,13 @@ * by the Free Software Foundation. */ -#include "main.h" #include "Client.h" -#include "znc.h" -#include "User.h" -#include "IRCSock.h" +#include "Chan.h" #include "DCCBounce.h" #include "DCCSock.h" +#include "IRCSock.h" #include "Server.h" +#include "User.h" CClient::~CClient() { if (!m_spAuth.IsNull()) { diff --git a/Client.h b/Client.h index 158e6745..04b8a0b7 100644 --- a/Client.h +++ b/Client.h @@ -9,6 +9,7 @@ #ifndef _CLIENT_H #define _CLIENT_H +#include "Utils.h" #include "main.h" // Forward Declarations @@ -18,7 +19,6 @@ class CIRCSock; class CClient; // !Forward Declarations - class CAuthBase { public: CAuthBase() {} diff --git a/DCCBounce.cpp b/DCCBounce.cpp index 730cc8b1..644211c9 100644 --- a/DCCBounce.cpp +++ b/DCCBounce.cpp @@ -7,6 +7,7 @@ */ #include "DCCBounce.h" +#include "User.h" void CDCCBounce::ReadLine(const CString& sData) { CString sLine = sData; diff --git a/DCCBounce.h b/DCCBounce.h index 42e7b76f..b949c315 100644 --- a/DCCBounce.h +++ b/DCCBounce.h @@ -9,9 +9,6 @@ #ifndef _DCCBOUNCE_H #define _DCCBOUNCE_H -#include "main.h" -#include "Utils.h" -#include "User.h" #include "znc.h" class CDCCBounce : public Csock { diff --git a/DCCSock.cpp b/DCCSock.cpp index 5a7ce838..d4088fe6 100644 --- a/DCCSock.cpp +++ b/DCCSock.cpp @@ -7,6 +7,7 @@ */ #include "DCCSock.h" +#include "User.h" void CDCCSock::ReadData(const char* data, int len) { if (!m_pFile) { diff --git a/DCCSock.h b/DCCSock.h index 40ab0c58..72b930ca 100644 --- a/DCCSock.h +++ b/DCCSock.h @@ -9,10 +9,11 @@ #ifndef _DCCSOCK_H #define _DCCSOCK_H -#include "main.h" -#include "Utils.h" #include "FileUtils.h" -#include "User.h" + +// Forward Declarations +class CUser; +// !Forward Declarations class CDCCSock : public Csock { public: diff --git a/FileUtils.cpp b/FileUtils.cpp index f69926e5..a64f76b9 100644 --- a/FileUtils.cpp +++ b/FileUtils.cpp @@ -7,13 +7,10 @@ */ #include "FileUtils.h" -#include +#include +#include #include -using std::cout; -using std::cerr; -using std::endl; - CFile::CFile() { m_iFD = -1; m_bClose = false; diff --git a/FileUtils.h b/FileUtils.h index f245bb2f..a91a5da1 100644 --- a/FileUtils.h +++ b/FileUtils.h @@ -9,20 +9,13 @@ #ifndef _FILEUTILS_H #define _FILEUTILS_H -#include -#include -#include -#include -#include -#include +#include "Csocket.h" +#include "String.h" #include -#include -#include -#include - -#include "main.h" -#include #include +#include +#include + using std::vector; using std::map; diff --git a/HTTPSock.h b/HTTPSock.h index de40b89c..6eb3c6d8 100644 --- a/HTTPSock.h +++ b/HTTPSock.h @@ -10,9 +10,6 @@ #define _HTTPSOCK_H #include "main.h" -#include "Utils.h" -#include "FileUtils.h" -#include "User.h" class CHTTPSock : public Csock { public: diff --git a/IRCSock.cpp b/IRCSock.cpp index 492d1419..cf5330e0 100644 --- a/IRCSock.cpp +++ b/IRCSock.cpp @@ -6,11 +6,11 @@ * by the Free Software Foundation. */ -#include "znc.h" #include "IRCSock.h" -#include "DCCBounce.h" +#include "Chan.h" #include "Client.h" -#include +#include "DCCBounce.h" +#include "User.h" CIRCSock::CIRCSock(CUser* pUser) : Csock() { m_pUser = pUser; diff --git a/IRCSock.h b/IRCSock.h index ad82b054..b9de2e40 100644 --- a/IRCSock.h +++ b/IRCSock.h @@ -9,13 +9,12 @@ #ifndef _IRCSOCK_H #define _IRCSOCK_H -#include "main.h" -#include "User.h" -#include "Chan.h" -#include "Buffer.h" +#include "Csocket.h" +#include "Nick.h" // Forward Declarations -class CZNC; +class CChan; +class CUser; // !Forward Declarations class CIRCSock : public Csock { diff --git a/MD5.cpp b/MD5.cpp index 940a6ca1..8056a87d 100644 --- a/MD5.cpp +++ b/MD5.cpp @@ -18,11 +18,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include "MD5.h" + #include #include -#include "MD5.h" - CMD5::CMD5() { *m_szMD5 = '\0'; diff --git a/Modules.cpp b/Modules.cpp index 7183916a..478601cb 100644 --- a/Modules.cpp +++ b/Modules.cpp @@ -8,13 +8,15 @@ #ifdef _MODULES -#include "main.h" #include "Modules.h" -#include "znc.h" -#include "Utils.h" #include "User.h" -#include "Nick.h" -#include "Chan.h" +#include "znc.h" +#include + +#ifndef RTLD_LOCAL +# define RTLD_LOCAL 0 +# warning "your crap box doesnt define RTLD_LOCAL !?" +#endif #define MODUNLOADCHK(func) \ for (unsigned int a = 0; a < size(); a++) { \ diff --git a/Modules.h b/Modules.h index 0ccee960..2f5a315e 100644 --- a/Modules.h +++ b/Modules.h @@ -11,15 +11,20 @@ #ifndef _MODULES_H #define _MODULES_H -#include "main.h" #include "FileUtils.h" -#include "Client.h" -#include -#include +#include "Utils.h" #include +#include + using std::vector; using std::set; +// Forward Declarations +class CAuthBase; +class CChan; +class CClient; +// !Forward Declarations + // User Module Macros #ifdef REQUIRESSL #ifndef HAVE_LIBSSL @@ -31,11 +36,6 @@ using std::set; #endif #endif -#ifndef RTLD_LOCAL -# define RTLD_LOCAL 0 -# warning "your crap box doesnt define RTLD_LOCAL !?" -#endif - #define MODCONSTRUCTOR(CLASS) \ CLASS(void *pDLL, CUser* pUser, const CString& sModName, \ const CString& sModPath) \ diff --git a/Nick.cpp b/Nick.cpp index 81a47272..7b61ed1c 100644 --- a/Nick.cpp +++ b/Nick.cpp @@ -6,10 +6,10 @@ * by the Free Software Foundation. */ -#include "Chan.h" #include "Nick.h" -#include "User.h" +#include "Chan.h" #include "IRCSock.h" +#include "User.h" CNick::CNick() { Reset(); diff --git a/Nick.h b/Nick.h index 6ccf6520..7c22ccdc 100644 --- a/Nick.h +++ b/Nick.h @@ -10,8 +10,9 @@ #define _NICK_H #include "String.h" -#include #include +#include + using std::vector; using std::set; diff --git a/Server.cpp b/Server.cpp index dc50678d..579ed21b 100644 --- a/Server.cpp +++ b/Server.cpp @@ -6,7 +6,6 @@ * by the Free Software Foundation. */ -#include "main.h" #include "Server.h" CServer::CServer(const CString& sName, unsigned short uPort, const CString& sPass, bool bSSL, bool bIPV6) { diff --git a/String.cpp b/String.cpp index 57329a17..c0b49368 100644 --- a/String.cpp +++ b/String.cpp @@ -6,10 +6,13 @@ * by the Free Software Foundation. */ -#include #include "String.h" #include "FileUtils.h" #include "MD5.h" +#include "Utils.h" +#include + +using std::stringstream; const char* g_szHTMLescapes[256] = { "�", 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0-9 diff --git a/String.h b/String.h index 7b53b26a..9cbad147 100644 --- a/String.h +++ b/String.h @@ -9,40 +9,25 @@ #ifndef X_STRING_H #define X_STRING_H -#ifdef USE_PCRE -#include -#endif - -#include - -#include #include +#include #include -#include #include -using std::set; using std::map; -using std::multimap; +using std::set; using std::string; -using std::pair; using std::vector; -using std::stringstream; - #define _SQL(s) CString("'" + CString(s).Escape_n(CString::ESQL) + "'") #define _URL(s) CString("'" + CString(s).Escape_n(CString::EURL) + "'") #define _HTML(s) CString("'" + CString(s).Escape_n(CString::EHTML) + "'") - class CString; class MCString; typedef set SCString; typedef vector VCString; -typedef map MVCString; -typedef vector VMCString; -typedef multimap MMCString; static const unsigned char XX = 0xff; static const unsigned char base64_table[256] = { diff --git a/Template.cpp b/Template.cpp index 49934155..b8ed01c4 100644 --- a/Template.cpp +++ b/Template.cpp @@ -7,8 +7,7 @@ */ #include "Template.h" - -using std::cerr; +#include "FileUtils.h" void CTemplateOptions::Parse(const CString& sLine) { CString sName = sLine.Token(0, false, "=").Trim_n().AsUpper(); diff --git a/Template.h b/Template.h index a18ddd0e..c9d56d25 100644 --- a/Template.h +++ b/Template.h @@ -9,13 +9,12 @@ #ifndef _TEMPLATE_H #define _TEMPLATE_H -#include "FileUtils.h" #include "Utils.h" #include -using std::ostream; using std::cout; using std::endl; +using std::ostream; class CTemplate; diff --git a/Timers.h b/Timers.h index 3becab76..f1158d03 100644 --- a/Timers.h +++ b/Timers.h @@ -9,7 +9,10 @@ #ifndef _TIMERS_H #define _TIMERS_H -#include "main.h" +#include "Client.h" +#include "Csocket.h" +#include "FileUtils.h" +#include "User.h" class CKeepNickTimer : public CCron { public: diff --git a/User.cpp b/User.cpp index 58b1cb55..e2a4bdbe 100644 --- a/User.cpp +++ b/User.cpp @@ -6,16 +6,13 @@ * by the Free Software Foundation. */ -#include "main.h" -#include "znc.h" #include "User.h" -#include "Server.h" -#include "IRCSock.h" -#include "Client.h" -#include "DCCBounce.h" +#include "Chan.h" #include "DCCSock.h" -#include "MD5.h" +#include "IRCSock.h" +#include "Server.h" #include "Timers.h" +#include "znc.h" CUser::CUser(const CString& sUserName) { m_fTimezoneOffset = 0; @@ -779,7 +776,7 @@ bool CUser::CheckPass(const CString& sPass) { return (sPass == m_sPass); } - return (m_sPass.CaseCmp((char*) CMD5(sPass)) == 0); + return (m_sPass.CaseCmp(sPass.MD5()) == 0); } /*CClient* CUser::GetClient() { diff --git a/User.h b/User.h index 2ff98328..69565188 100644 --- a/User.h +++ b/User.h @@ -9,28 +9,26 @@ #ifndef _USER_H #define _USER_H -#include "main.h" +#include "Buffer.h" +#include "FileUtils.h" #ifdef _MODULES #include "Modules.h" #endif - -#include -#include #include "Nick.h" -#include "FileUtils.h" -#include "Buffer.h" +#include "Utils.h" +#include +#include -using std::vector; using std::set; +using std::vector; -class CZNC; class CChan; -class CServer; -class CIRCSock; class CClient; -class CKeepNickTimer; +class CIRCSock; class CJoinTimer; +class CKeepNickTimer; class CMiscTimer; +class CServer; class CUser { public: @@ -62,9 +60,7 @@ public: void DelClients(); #ifdef _MODULES void DelModules(); -#endif -#ifdef _MODULES // Modules CModules& GetModules() { return *m_pModules; } const CModules& GetModules() const { return *m_pModules; } diff --git a/Utils.cpp b/Utils.cpp index 300cc21f..79f3253f 100644 --- a/Utils.cpp +++ b/Utils.cpp @@ -8,17 +8,14 @@ #include "Utils.h" #include "MD5.h" -#include -#include -#include -#include -#include -#include -#include #include #ifdef HAVE_LIBSSL #include #endif /* HAVE_LIBSSL */ +#include +#include +#include +#include using std::stringstream; diff --git a/Utils.h b/Utils.h index 8abf2d80..080a6f8e 100644 --- a/Utils.h +++ b/Utils.h @@ -9,18 +9,15 @@ #ifndef _UTILS_H #define _UTILS_H -#include -#include -#include -#include -#include -#include - #include "String.h" -#include +#include #include -using std::vector; +#include +#include +#include + using std::map; +using std::vector; #ifdef _DEBUG #define DEBUG_ONLY(f) f diff --git a/main.cpp b/main.cpp index e78fe70e..c5d532d6 100644 --- a/main.cpp +++ b/main.cpp @@ -6,13 +6,8 @@ * by the Free Software Foundation. */ -#include -#include -#include -#include #include "znc.h" -#include "Modules.h" -#include "MD5.h" +#include static struct option g_LongOpts[] = { { "help", no_argument, 0, 'h' }, diff --git a/main.h b/main.h index b9cdd024..9b846847 100644 --- a/main.h +++ b/main.h @@ -63,6 +63,5 @@ using std::endl; #include "String.h" #include "Csocket.h" -#include "Utils.h" #endif // !_MAIN_H diff --git a/modules/autoattach.cpp b/modules/autoattach.cpp index 1a2000b8..7635b2fb 100644 --- a/modules/autoattach.cpp +++ b/modules/autoattach.cpp @@ -6,11 +6,8 @@ * by the Free Software Foundation. */ -#include "main.h" -#include "User.h" -#include "Nick.h" -#include "Modules.h" #include "Chan.h" +#include "Modules.h" class CChanAttach : public CModule { public: diff --git a/modules/autoop.cpp b/modules/autoop.cpp index b4fbe2fc..afb11673 100644 --- a/modules/autoop.cpp +++ b/modules/autoop.cpp @@ -6,11 +6,8 @@ * by the Free Software Foundation. */ -#include "main.h" -#include "User.h" -#include "Nick.h" -#include "Modules.h" #include "Chan.h" +#include "User.h" class CAutoOpMod; diff --git a/modules/away.cpp b/modules/away.cpp index ef74ec8f..bac5f196 100644 --- a/modules/away.cpp +++ b/modules/away.cpp @@ -11,15 +11,8 @@ #define REQUIRESSL -#include "main.h" #include "User.h" -#include "Nick.h" -#include "Modules.h" -#include "Chan.h" -#include "Utils.h" -#include -#include -#include +#include #define CRYPT_VERIFICATION_TOKEN "::__:AWAY:__::" diff --git a/modules/awaynick.cpp b/modules/awaynick.cpp index 9dc16a3d..a7af2c2b 100644 --- a/modules/awaynick.cpp +++ b/modules/awaynick.cpp @@ -7,12 +7,8 @@ */ // @todo handle raw 433 (nick in use) -#include "main.h" -#include "User.h" -#include "Nick.h" -#include "Modules.h" -#include "Chan.h" #include "IRCSock.h" +#include "User.h" class CAwayNickMod; diff --git a/modules/chansaver.cpp b/modules/chansaver.cpp index c98d8ec5..d5def858 100644 --- a/modules/chansaver.cpp +++ b/modules/chansaver.cpp @@ -6,12 +6,9 @@ * by the Free Software Foundation. */ -#include "main.h" -#include "znc.h" -#include "User.h" -#include "Nick.h" -#include "Modules.h" #include "Chan.h" +#include "User.h" +#include "znc.h" class CChanSaverMod : public CModule { public: diff --git a/modules/crypt.cpp b/modules/crypt.cpp index 36f89863..f889ed9a 100644 --- a/modules/crypt.cpp +++ b/modules/crypt.cpp @@ -22,12 +22,8 @@ // It is strongly suggested that you enable SSL between znc and your client otherwise the encryption stops at znc and gets sent to your client in plain text. // -#include "main.h" -#include "User.h" -#include "Nick.h" -#include "Modules.h" #include "Chan.h" -#include "String.h" +#include "User.h" #define REQUIRESSL 1 diff --git a/modules/email.cpp b/modules/email.cpp index 3338b6e1..79bfab43 100644 --- a/modules/email.cpp +++ b/modules/email.cpp @@ -9,18 +9,13 @@ * Author: imaginos */ -#include "znc.h" -#include "main.h" -#include "User.h" -#include "Nick.h" -#include "Modules.h" -#include "Chan.h" -#include "Utils.h" -#include "FileUtils.h" #include "MD5.h" -#include +#include "User.h" +#include "znc.h" #include +using std::stringstream; + struct EmailST { CString sFrom; diff --git a/modules/imapauth.cpp b/modules/imapauth.cpp index 28880a22..6d1bd395 100644 --- a/modules/imapauth.cpp +++ b/modules/imapauth.cpp @@ -6,15 +6,8 @@ * by the Free Software Foundation. */ -#include "main.h" -#include "User.h" -#include "Nick.h" #include "Modules.h" -#include "Chan.h" #include "znc.h" -#include "HTTPSock.h" -#include "Server.h" -#include using std::map; diff --git a/modules/kickrejoin.cpp b/modules/kickrejoin.cpp index a12c3879..18a12fdb 100644 --- a/modules/kickrejoin.cpp +++ b/modules/kickrejoin.cpp @@ -12,8 +12,7 @@ * Usage: LoadModule = rejoin [delay] * */ -#include -#include + #include #include diff --git a/modules/modperl.cpp b/modules/modperl.cpp index d4dae25a..c72361d7 100644 --- a/modules/modperl.cpp +++ b/modules/modperl.cpp @@ -7,13 +7,8 @@ */ #ifdef HAVE_PERL -#include "main.h" -#include "User.h" -#include "Nick.h" -#include "Modules.h" #include "Chan.h" -#include "FileUtils.h" -#include "Csocket.h" +#include "User.h" #include "znc.h" // perl stuff diff --git a/modules/nickserv.cpp b/modules/nickserv.cpp index 36e565ae..58f0f090 100644 --- a/modules/nickserv.cpp +++ b/modules/nickserv.cpp @@ -6,15 +6,7 @@ * by the Free Software Foundation. */ -#include "main.h" #include "User.h" -#include "Nick.h" -#include "Modules.h" -#include "Chan.h" -#include "Utils.h" -#include -#include -#include class CNickServ : public CModule { diff --git a/modules/partyline.cpp b/modules/partyline.cpp index 7a32d231..1b03fc73 100644 --- a/modules/partyline.cpp +++ b/modules/partyline.cpp @@ -6,14 +6,8 @@ * by the Free Software Foundation. */ -#include "main.h" #include "User.h" -#include "Nick.h" -#include "Modules.h" -#include "Chan.h" #include "znc.h" -#include "HTTPSock.h" -#include "Server.h" class CPartylineChannel { public: diff --git a/modules/perform.cpp b/modules/perform.cpp index 8d596e6f..0a84086d 100644 --- a/modules/perform.cpp +++ b/modules/perform.cpp @@ -6,15 +6,7 @@ * by the Free Software Foundation. */ -#include "main.h" #include "User.h" -#include "Nick.h" -#include "Modules.h" -#include "Chan.h" -#include "Utils.h" -#include -#include -#include class CPerform : public CModule { diff --git a/modules/raw.cpp b/modules/raw.cpp index 354b4841..17be74d5 100644 --- a/modules/raw.cpp +++ b/modules/raw.cpp @@ -6,11 +6,7 @@ * by the Free Software Foundation. */ -#include "main.h" #include "User.h" -#include "Nick.h" -#include "Modules.h" -#include "Chan.h" class CRawMod : public CModule { public: diff --git a/modules/sample.cpp b/modules/sample.cpp index 38af6058..8b65205d 100644 --- a/modules/sample.cpp +++ b/modules/sample.cpp @@ -6,11 +6,8 @@ * by the Free Software Foundation. */ -#include "main.h" -#include "User.h" -#include "Nick.h" -#include "Modules.h" #include "Chan.h" +#include "Modules.h" class CSampleTimer : public CTimer { public: diff --git a/modules/saslauth.cpp b/modules/saslauth.cpp index abdfacce..1e03edc9 100644 --- a/modules/saslauth.cpp +++ b/modules/saslauth.cpp @@ -10,10 +10,9 @@ * @brief SASL authentication module for znc. */ -#include - #include "Modules.h" #include "znc.h" +#include class CSASLAuthMod : public CGlobalModule { public: diff --git a/modules/savebuff.cpp b/modules/savebuff.cpp index 9e264fae..e5b059f5 100644 --- a/modules/savebuff.cpp +++ b/modules/savebuff.cpp @@ -14,14 +14,9 @@ #define REQUIRESSL -#include "main.h" -#include "znc.h" -#include "User.h" -#include "Nick.h" -#include "Modules.h" #include "Chan.h" -#include "Utils.h" -#include +#include "User.h" +#include /* TODO list * store timestamp to be displayed diff --git a/modules/schat.cpp b/modules/schat.cpp index a463ebcb..a525db94 100644 --- a/modules/schat.cpp +++ b/modules/schat.cpp @@ -11,21 +11,12 @@ #define REQUIRESSL -#include "main.h" -#include "znc.h" #include "User.h" -#include "Nick.h" -#include "Modules.h" -#include "Chan.h" -#include "Utils.h" -#include "String.h" -#include "FileUtils.h" -#include "Csocket.h" -#include "MD5.h" -#include +#include "znc.h" #include using std::pair; +using std::stringstream; class CSChat; diff --git a/modules/shell.cpp b/modules/shell.cpp index 115dd6ac..155a5cd9 100644 --- a/modules/shell.cpp +++ b/modules/shell.cpp @@ -6,16 +6,8 @@ * by the Free Software Foundation. */ -#include "main.h" -#include "Csocket.h" #include "User.h" -#include "Nick.h" -#include "Modules.h" -#include "Chan.h" -#include "Utils.h" -#include "FileUtils.h" #include "znc.h" -#include // Forward Declaration class CShellMod; diff --git a/modules/stickychan.cpp b/modules/stickychan.cpp index ec029edc..45dd6bda 100644 --- a/modules/stickychan.cpp +++ b/modules/stickychan.cpp @@ -6,16 +6,8 @@ * by the Free Software Foundation. */ -#include "main.h" -#include "User.h" -#include "Nick.h" -#include "Modules.h" #include "Chan.h" -#include "Utils.h" -#include "FileUtils.h" -#include -#include -#include +#include "User.h" class CStickyChan : public CModule { diff --git a/modules/watch.cpp b/modules/watch.cpp index 25d8685b..0f71bd8f 100644 --- a/modules/watch.cpp +++ b/modules/watch.cpp @@ -6,15 +6,10 @@ * by the Free Software Foundation. */ -#include "main.h" -#include "User.h" -#include "Nick.h" -#include "Modules.h" #include "Chan.h" -#include "Buffer.h" -#include "Utils.h" - +#include "User.h" #include + using std::list; class CWatchSource { diff --git a/modules/webadmin.cpp b/modules/webadmin.cpp index 9f9462f9..1e5c5976 100644 --- a/modules/webadmin.cpp +++ b/modules/webadmin.cpp @@ -6,21 +6,19 @@ * by the Free Software Foundation. */ -#include "main.h" -#include "User.h" -#include "Nick.h" -#include "Modules.h" #include "Chan.h" -#include "znc.h" #include "HTTPSock.h" -#include "Client.h" #include "Server.h" #include "Template.h" +#include "User.h" +#include "znc.h" +#include + +using std::stringstream; class CWebAdminMod; class CWebAdminSock; - class CWebAdminAuth : public CAuthBase { public: CWebAdminAuth(CWebAdminSock* pWebAdminSock, const CString& sUsername, const CString& sPassword) diff --git a/znc.cpp b/znc.cpp index 82c20282..8f338984 100644 --- a/znc.cpp +++ b/znc.cpp @@ -7,19 +7,11 @@ */ #include "znc.h" -#include "User.h" -#include "Server.h" -#include "Client.h" +#include "Chan.h" #include "IRCSock.h" -#include "Utils.h" - +#include "Server.h" +#include "User.h" #include -#include -#include - -#ifdef _MODULES -#include "Modules.h" -#endif CZNC::CZNC() { #ifdef _MODULES diff --git a/znc.h b/znc.h index 61993587..62c0970d 100644 --- a/znc.h +++ b/znc.h @@ -9,19 +9,17 @@ #ifndef _ZNC_H #define _ZNC_H -#include "main.h" -#include "FileUtils.h" #include "Client.h" +#include "Csocket.h" +#include "FileUtils.h" #ifdef _MODULES #include "Modules.h" #endif -#include #include + using std::map; -using std::set; class CUser; -class CClient; class CListener; class CSockManager : public TSocketManager {