mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Stop including FileUtils.h in any header
This causes every piece of code which wants to use CFile or CDir to have to include FileUtils.h. This causes quite some noise. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
1
Chan.cpp
1
Chan.cpp
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "Chan.h"
|
||||
#include "FileUtils.h"
|
||||
#include "IRCSock.h"
|
||||
#include "User.h"
|
||||
#include "znc.h"
|
||||
|
||||
2
Chan.h
2
Chan.h
@@ -10,7 +10,6 @@
|
||||
#define _CHAN_H
|
||||
|
||||
#include "zncconfig.h"
|
||||
#include "FileUtils.h"
|
||||
#include "Nick.h"
|
||||
#include "ZNCString.h"
|
||||
#include <map>
|
||||
@@ -25,6 +24,7 @@ using std::set;
|
||||
class CUser;
|
||||
class CClient;
|
||||
class CConfig;
|
||||
class CFile;
|
||||
// !Forward Declarations
|
||||
|
||||
class CChan {
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "Client.h"
|
||||
#include "Chan.h"
|
||||
#include "DCCBounce.h"
|
||||
#include "FileUtils.h"
|
||||
#include "IRCSock.h"
|
||||
#include "User.h"
|
||||
#include "znc.h"
|
||||
|
||||
@@ -10,11 +10,12 @@
|
||||
#include "Chan.h"
|
||||
#include "DCCBounce.h"
|
||||
#include "DCCSock.h"
|
||||
#include "FileUtils.h"
|
||||
#include "IRCSock.h"
|
||||
#include "Listener.h"
|
||||
#include "Server.h"
|
||||
#include "User.h"
|
||||
#include "znc.h"
|
||||
#include "Listener.h"
|
||||
|
||||
void CClient::UserCommand(CString& sLine) {
|
||||
if (!m_pUser) {
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "Config.h"
|
||||
#include "FileUtils.h"
|
||||
#include <stack>
|
||||
#include <sstream>
|
||||
|
||||
|
||||
3
Config.h
3
Config.h
@@ -10,7 +10,8 @@
|
||||
#define CONFIG_H
|
||||
|
||||
#include "ZNCString.h"
|
||||
#include "FileUtils.h"
|
||||
|
||||
class CFile;
|
||||
|
||||
class CConfig {
|
||||
public:
|
||||
|
||||
11
DCCSock.cpp
11
DCCSock.cpp
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "DCCSock.h"
|
||||
#include "FileUtils.h"
|
||||
#include "User.h"
|
||||
#include "Utils.h"
|
||||
|
||||
@@ -236,3 +237,13 @@ CFile* CDCCSock::OpenFile(bool bWrite) {
|
||||
return m_pFile;
|
||||
}
|
||||
|
||||
bool CDCCSock::Seek(unsigned int uPos) {
|
||||
if (m_pFile) {
|
||||
if (m_pFile->Seek(uPos)) {
|
||||
m_uBytesSoFar = uPos;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
13
DCCSock.h
13
DCCSock.h
@@ -10,11 +10,11 @@
|
||||
#define _DCCSOCK_H
|
||||
|
||||
#include "zncconfig.h"
|
||||
#include "FileUtils.h"
|
||||
#include "Socket.h"
|
||||
|
||||
// Forward Declarations
|
||||
class CUser;
|
||||
class CFile;
|
||||
// !Forward Declarations
|
||||
|
||||
class CDCCSock : public CZNCSock {
|
||||
@@ -32,16 +32,7 @@ public:
|
||||
void SendPacket();
|
||||
virtual Csock* GetSockObj(const CString& sHost, unsigned short uPort);
|
||||
CFile* OpenFile(bool bWrite = true);
|
||||
bool Seek(unsigned int uPos) {
|
||||
if (m_pFile) {
|
||||
if (m_pFile->Seek(uPos)) {
|
||||
m_uBytesSoFar = uPos;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
bool Seek(unsigned int uPos);
|
||||
|
||||
// Setters
|
||||
void SetRemoteIP(const CString& s) { m_sRemoteIP = s; }
|
||||
|
||||
@@ -7,11 +7,12 @@
|
||||
*/
|
||||
|
||||
#include "Modules.h"
|
||||
#include "FileUtils.h"
|
||||
#include "Template.h"
|
||||
#include "User.h"
|
||||
#include "WebModules.h"
|
||||
#include "znc.h"
|
||||
#include <dlfcn.h>
|
||||
#include "WebModules.h"
|
||||
#include "Template.h"
|
||||
|
||||
#ifndef RTLD_LOCAL
|
||||
# define RTLD_LOCAL 0
|
||||
|
||||
3
User.cpp
3
User.cpp
@@ -10,6 +10,7 @@
|
||||
#include "Chan.h"
|
||||
#include "Config.h"
|
||||
#include "DCCSock.h"
|
||||
#include "FileUtils.h"
|
||||
#include "IRCSock.h"
|
||||
#include "Server.h"
|
||||
#include "znc.h"
|
||||
@@ -1514,4 +1515,6 @@ unsigned int CUser::GetBufferCount() const { return m_uBufferCount; }
|
||||
bool CUser::KeepBuffer() const { return m_bKeepBuffer; }
|
||||
//CString CUser::GetSkinName() const { return (!m_sSkinName.empty()) ? m_sSkinName : CZNC::Get().GetSkinName(); }
|
||||
CString CUser::GetSkinName() const { return m_sSkinName; }
|
||||
const CString& CUser::GetUserPath() const { if (!CFile::Exists(m_sUserPath)) { CDir::MakeDir(m_sUserPath); } return m_sUserPath; }
|
||||
const CString& CUser::GetDLPath() const { if (!CFile::Exists(m_sDLPath)) { CDir::MakeDir(m_sDLPath); } return m_sDLPath; }
|
||||
// !Getters
|
||||
|
||||
6
User.h
6
User.h
@@ -11,7 +11,6 @@
|
||||
|
||||
#include "zncconfig.h"
|
||||
#include "Buffer.h"
|
||||
#include "FileUtils.h"
|
||||
#include "Modules.h"
|
||||
#include "Nick.h"
|
||||
#include <set>
|
||||
@@ -23,6 +22,7 @@ using std::vector;
|
||||
class CChan;
|
||||
class CClient;
|
||||
class CConfig;
|
||||
class CFile;
|
||||
class CIRCSock;
|
||||
class CUserTimer;
|
||||
class CServer;
|
||||
@@ -198,8 +198,8 @@ public:
|
||||
const CString& GetChanPrefixes() const { return m_sChanPrefixes; }
|
||||
bool IsChan(const CString& sChan) const;
|
||||
|
||||
const CString& GetUserPath() const { if (!CFile::Exists(m_sUserPath)) { CDir::MakeDir(m_sUserPath); } return m_sUserPath; }
|
||||
const CString& GetDLPath() const { if (!CFile::Exists(m_sDLPath)) { CDir::MakeDir(m_sDLPath); } return m_sDLPath; }
|
||||
const CString& GetUserPath() const;
|
||||
const CString& GetDLPath() const;
|
||||
|
||||
bool UseClientIP() const;
|
||||
bool DenyLoadMod() const;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include "WebModules.h"
|
||||
#include "FileUtils.h"
|
||||
#include "User.h"
|
||||
#include "znc.h"
|
||||
#include <sstream>
|
||||
|
||||
@@ -6,9 +6,10 @@
|
||||
* by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include "User.h"
|
||||
#include "Client.h"
|
||||
#include "FileUtils.h"
|
||||
#include "Server.h"
|
||||
#include "User.h"
|
||||
|
||||
#include <syslog.h>
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#define REQUIRESSL
|
||||
|
||||
#include "User.h"
|
||||
#include "FileUtils.h"
|
||||
#include <sys/stat.h>
|
||||
|
||||
#define CRYPT_VERIFICATION_TOKEN "::__:AWAY:__::"
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
* Author: imaginos <imaginos@imaginos.net>
|
||||
*/
|
||||
|
||||
#include "FileUtils.h"
|
||||
#include "MD5.h"
|
||||
#include "User.h"
|
||||
#include "znc.h"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
* by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include "FileUtils.h"
|
||||
#include "User.h"
|
||||
#include "Chan.h"
|
||||
#include "Server.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
* by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include "FileUtils.h"
|
||||
#include "User.h"
|
||||
#include "znc.h"
|
||||
#include "ExecSock.h"
|
||||
|
||||
@@ -6,9 +6,10 @@
|
||||
* by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include "znc.h"
|
||||
#include "FileUtils.h"
|
||||
#include "IRCSock.h"
|
||||
#include "User.h"
|
||||
#include "znc.h"
|
||||
|
||||
class CIdentFileModule : public CGlobalModule {
|
||||
CString m_sOrigISpoof;
|
||||
|
||||
@@ -6,12 +6,13 @@
|
||||
* by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include "Modules.h"
|
||||
#include "User.h"
|
||||
#include "Chan.h"
|
||||
#include "Nick.h"
|
||||
#include "znc.h"
|
||||
#include "FileUtils.h"
|
||||
#include "IRCSock.h"
|
||||
#include "Modules.h"
|
||||
#include "Nick.h"
|
||||
#include "User.h"
|
||||
#include "znc.h"
|
||||
|
||||
#include "modperl/module.h"
|
||||
#include "modperl/swigperlrun.h"
|
||||
|
||||
@@ -8,12 +8,13 @@
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
#include "Modules.h"
|
||||
#include "User.h"
|
||||
#include "Chan.h"
|
||||
#include "Nick.h"
|
||||
#include "znc.h"
|
||||
#include "FileUtils.h"
|
||||
#include "IRCSock.h"
|
||||
#include "Modules.h"
|
||||
#include "Nick.h"
|
||||
#include "User.h"
|
||||
#include "znc.h"
|
||||
|
||||
#include "modpython/swigpyrun.h"
|
||||
#include "modpython/module.h"
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include "Chan.h"
|
||||
#include "User.h"
|
||||
#include "FileUtils.h"
|
||||
#include <sys/stat.h>
|
||||
|
||||
#define CRYPT_VERIFICATION_TOKEN "::__:SAVEBUFF:__::"
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
#define REQUIRESSL
|
||||
|
||||
#include "FileUtils.h"
|
||||
#include "User.h"
|
||||
#include "znc.h"
|
||||
#include <sstream>
|
||||
|
||||
Reference in New Issue
Block a user