Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Tidy up source files. #461

Merged
merged 1 commit into from

2 participants

@SaberUK
  • Use #pragma once instead of include guards.
  • Move header files in src/modules to include/modules.
  • Fixed various spacing issues.
@SaberUK SaberUK Tidy up source files:
- Use #pragma once instead of include guards.
- Move header files in src/modules to include/modules.
- Fixed various spacing issues.
11cafc1
@attilamolnar attilamolnar merged commit debedfe into inspircd:master
@attilamolnar

thanks

@SaberUK SaberUK deleted the SaberUK:master+header-cleanup branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 12, 2013
  1. @SaberUK

    Tidy up source files:

    SaberUK authored
    - Use #pragma once instead of include guards.
    - Move header files in src/modules to include/modules.
    - Fixed various spacing issues.
This page is out of date. Refresh to see the latest.
Showing with 121 additions and 307 deletions.
  1. +2 −3 configure
  2. +1 −4 include/bancache.h
  3. +1 −4 include/base.h
  4. +1 −4 include/caller.h
  5. +1 −4 include/channels.h
  6. +1 −4 include/command_parse.h
  7. +2 −4 include/commands/cmd_whowas.h
  8. +2 −2 include/configparser.h
  9. +1 −4 include/configreader.h
  10. +2 −4 include/consolecolors.h
  11. +1 −4 include/ctables.h
  12. +1 −5 include/cull_list.h
  13. +2 −6 include/dns.h
  14. +1 −5 include/dynamic.h
  15. +1 −5 include/exitcodes.h
  16. +1 −4 include/extensible.h
  17. +1 −5 include/filelogger.h
  18. +1 −4 include/hashcomp.h
  19. +1 −5 include/inspircd.h
  20. +1 −3 include/inspsocket.h
  21. +1 −6 include/inspstring.h
  22. +1 −0  include/listmode.h
  23. +1 −4 include/logger.h
  24. +1 −4 include/membership.h
  25. +1 −4 include/mode.h
  26. +1 −4 include/modules.h
  27. +1 −4 {src → include}/modules/account.h
  28. +1 −3 src/modules/m_cap.h → include/modules/cap.h
  29. +1 −4 {src → include}/modules/hash.h
  30. +2 −5 {src → include}/modules/httpd.h
  31. +1 −4 src/modules/m_regex.h → include/modules/regex.h
  32. +1 −4 {src → include}/modules/sasl.h
  33. +1 −4 {src → include}/modules/spanningtree.h
  34. +1 −4 {src → include}/modules/sql.h
  35. +1 −4 {src → include}/modules/ssl.h
  36. +1 −4 include/numerics.h
  37. +1 −5 include/protocol.h
  38. +1 −4 include/snomasks.h
  39. +1 −5 include/socket.h
  40. +1 −5 include/socketengine.h
  41. +1 −4 include/testsuite.h
  42. +1 −5 include/threadengine.h
  43. +1 −5 include/threadengines/threadengine_pthread.h
  44. +1 −5 include/threadengines/threadengine_win32.h
  45. +1 −5 include/timer.h
  46. +1 −6 include/typedefs.h
  47. +1 −1  include/uid.h
  48. +1 −4 include/usermanager.h
  49. +1 −4 include/users.h
  50. +1 −3 include/xline.h
  51. +1 −1  src/modules/extra/m_mysql.cpp
  52. +1 −1  src/modules/extra/m_pgsql.cpp
  53. +2 −2 src/modules/extra/m_regex_pcre.cpp
  54. +2 −2 src/modules/extra/m_regex_posix.cpp
  55. +2 −2 src/modules/extra/m_regex_stdlib.cpp
  56. +2 −2 src/modules/extra/m_regex_tre.cpp
  57. +1 −1  src/modules/extra/m_sqlite3.cpp
  58. +2 −2 src/modules/extra/m_ssl_gnutls.cpp
  59. +1 −1  src/modules/extra/m_ssl_openssl.cpp
  60. +0 −1  src/modules/m_banexception.cpp
  61. +1 −1  src/modules/m_cap.cpp
  62. +1 −1  src/modules/m_cloaking.cpp
  63. +1 −1  src/modules/m_filter.cpp
  64. +2 −2 src/modules/m_httpd.cpp
  65. +1 −1  src/modules/m_httpd_acl.cpp
  66. +1 −1  src/modules/m_httpd_config.cpp
  67. +1 −1  src/modules/m_httpd_stats.cpp
  68. +0 −1  src/modules/m_inviteexception.cpp
  69. +2 −2 src/modules/m_ircv3.cpp
  70. +1 −1  src/modules/m_md5.cpp
  71. +1 −1  src/modules/m_namesx.cpp
  72. +1 −1  src/modules/m_password_hash.cpp
  73. +1 −1  src/modules/m_regex_glob.cpp
  74. +1 −1  src/modules/m_regonlycreate.cpp
  75. +1 −1  src/modules/m_ripemd160.cpp
  76. +1 −1  src/modules/m_rline.cpp
  77. +4 −4 src/modules/m_sasl.cpp
  78. +1 −1  src/modules/m_services_account.cpp
  79. +1 −1  src/modules/m_sha256.cpp
  80. +1 −4 src/modules/m_spanningtree/cachetimer.h
  81. +1 −4 src/modules/m_spanningtree/commands.h
  82. +2 −2 src/modules/m_spanningtree/hmac.cpp
  83. +1 −4 src/modules/m_spanningtree/link.h
  84. +1 −4 src/modules/m_spanningtree/main.h
  85. +0 −1  src/modules/m_spanningtree/operquit.cpp
  86. +1 −5 src/modules/m_spanningtree/protocolinterface.h
  87. +1 −4 src/modules/m_spanningtree/resolvers.h
  88. +1 −1  src/modules/m_spanningtree/treeserver.cpp
  89. +1 −4 src/modules/m_spanningtree/treeserver.h
  90. +1 −5 src/modules/m_spanningtree/treesocket.h
  91. +1 −1  src/modules/m_spanningtree/treesocket1.cpp
  92. +1 −4 src/modules/m_spanningtree/utils.h
  93. +2 −2 src/modules/m_sqlauth.cpp
  94. +2 −2 src/modules/m_sqloper.cpp
  95. +1 −1  src/modules/m_sslinfo.cpp
  96. +1 −1  src/modules/m_sslmodes.cpp
  97. +1 −1  src/modules/m_uhnames.cpp
  98. +1 −4 win/config.h.cmake
  99. +1 −0  win/inspircd_memory_functions.cpp
  100. +2 −1  win/inspircd_win32wrapper.cpp
  101. +2 −7 win/inspircd_win32wrapper.h
  102. +2 −0  win/win32service.h
View
5 configure
@@ -876,8 +876,7 @@ sub writefiles {
open(FILEHANDLE, ">include/config.h.tmp");
print FILEHANDLE <<EOF;
/* Auto generated by configure, do not modify! */
-#ifndef __CONFIGURATION_AUTO__
-#define __CONFIGURATION_AUTO__
+#pragma once
#define BRANCH "$branch"
#define VERSION "$version"
@@ -946,7 +945,7 @@ print FILEHANDLE "#define MAXBUF " . ($config{MAXBUF}+2) . "\n";
$config{SOCKETENGINE} = "socketengine_select";
}
}
- print FILEHANDLE "\n#include \"threadengines/threadengine_pthread.h\"\n\n#endif\n";
+ print FILEHANDLE "\n#include \"threadengines/threadengine_pthread.h\"\n";
close(FILEHANDLE);
my $file = 'include/config.h';
View
5 include/bancache.h
@@ -18,8 +18,7 @@
*/
-#ifndef BANCACHE_H
-#define BANCACHE_H
+#pragma once
/** Stores a cached ban entry.
* Each ban has one of these hashed in a hash_map to make for faster removal
@@ -84,5 +83,3 @@ class CoreExport BanCacheManager
}
~BanCacheManager();
};
-
-#endif
View
5 include/base.h
@@ -20,8 +20,7 @@
*/
-#ifndef BASE_H
-#define BASE_H
+#pragma once
#include <map>
#include <deque>
@@ -255,5 +254,3 @@ class CoreExport ServiceProvider : public classbase
virtual ~ServiceProvider();
};
-
-#endif
View
5 include/caller.h
@@ -19,8 +19,7 @@
*/
-#ifndef CALLER_H
-#define CALLER_H
+#pragma once
/* Pending some sort of C++11 support */
#if 0
@@ -355,5 +354,3 @@ template <typename ReturnType, typename Param1, typename Param2, typename Param3
class CoreExport NAME : public HandlerBase8<RETURN, V1, V2, V3, V4, V5, V6, V7, V8> { public: NAME() { } virtual ~NAME() { } virtual RETURN Call(V1, V2, V3, V4, V5, V6, V7, V8); }
#endif
-
-#endif
View
5 include/channels.h
@@ -20,8 +20,7 @@
*/
-#ifndef CHANNELS_H
-#define CHANNELS_H
+#pragma once
#include "membership.h"
#include "mode.h"
@@ -354,5 +353,3 @@ class CoreExport Channel : public Extensible, public InviteBase
*/
ModResult GetExtBanStatus(User *u, char type);
};
-
-#endif
View
5 include/command_parse.h
@@ -20,8 +20,7 @@
*/
-#ifndef COMMAND_PARSE_H
-#define COMMAND_PARSE_H
+#pragma once
/** A list of dll/so files containing the command handlers for the core
*/
@@ -175,5 +174,3 @@ const int duration_multi[] =
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
};
-
-#endif
View
6 include/commands/cmd_whowas.h
@@ -19,8 +19,8 @@
*/
-#ifndef CMD_WHOWAS_H
-#define CMD_WHOWAS_H
+#pragma once
+
#include "modules.h"
/* Forward ref for typedefs */
@@ -114,5 +114,3 @@ class WhoWasGroup
*/
~WhoWasGroup();
};
-
-#endif
View
4 include/configparser.h
@@ -17,6 +17,8 @@
*/
+#pragma once
+
struct fpos
{
std::string filename;
@@ -76,5 +78,3 @@ struct FileWrapper
}
}
};
-
-
View
5 include/configreader.h
@@ -21,8 +21,7 @@
*/
-#ifndef INSPIRCD_CONFIGREADER
-#define INSPIRCD_CONFIGREADER
+#pragma once
#include <sstream>
#include <string>
@@ -569,5 +568,3 @@ class CoreExport ConfigReaderThread : public Thread
void Finish();
bool IsDone() { return done; }
};
-
-#endif
View
6 include/consolecolors.h
@@ -14,8 +14,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONSOLECOLORS_H
-#define CONSOLECOLORS_H
+
+#pragma once
#include <ostream>
@@ -96,5 +96,3 @@ inline std::ostream& con_reset(std::ostream &s)
}
#endif
-
-#endif
View
5 include/ctables.h
@@ -21,8 +21,7 @@
*/
-#ifndef CTABLES_H
-#define CTABLES_H
+#pragma once
/** Used to indicate command success codes
*/
@@ -252,5 +251,3 @@ class CoreExport SplitCommand : public Command
translation.push_back(x5);translation.push_back(x6);translation.push_back(x7);
#define TRANSLATE8(x1,x2,x3,x4,x5,x6,x7,x8) translation.push_back(x1);translation.push_back(x2);translation.push_back(x3);translation.push_back(x4);\
translation.push_back(x5);translation.push_back(x6);translation.push_back(x7);translation.push_back(x8);
-
-#endif
View
6 include/cull_list.h
@@ -20,8 +20,7 @@
*/
-#ifndef CULL_LIST_H
-#define CULL_LIST_H
+#pragma once
/**
* The CullList class is used to delete objects at the end of the main loop to
@@ -58,6 +57,3 @@ class CoreExport ActionList
void Run();
};
-
-#endif
-
View
8 include/dns.h
@@ -18,7 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-
/*
dns.h - dns library very very loosely based on
firedns, Copyright (C) 2002 Ian Gulliver
@@ -37,8 +36,8 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#ifndef DNS_H
-#define DNS_H
+
+#pragma once
#include "socket.h"
#include "hashcomp.h"
@@ -438,6 +437,3 @@ class CoreExport DNS : public EventHandler
*/
int PruneCache();
};
-
-#endif
-
View
6 include/dynamic.h
@@ -20,8 +20,7 @@
*/
-#ifndef DLL_H
-#define DLL_H
+#pragma once
/** The DLLManager class is able to load a module file by filename,
* and locate its init_module symbol.
@@ -65,6 +64,3 @@ class CoreExport DLLManager : public classbase
/** Get detailed version information from the module file */
std::string GetVersion();
};
-
-#endif
-
View
6 include/exitcodes.h
@@ -19,8 +19,7 @@
*/
-#ifndef EXITCODE_H
-#define EXITCODE_H
+#pragma once
/** Valid exit codes to be used with InspIRCd::Exit()
*/
@@ -52,6 +51,3 @@ enum ExitStatus
* human-readable strings to be shown on shutdown.
*/
extern const char * ExitCodes[];
-
-#endif
-
View
5 include/extensible.h
@@ -17,8 +17,7 @@
*/
-#ifndef EXTENSIBLE_H
-#define EXTENSIBLE_H
+#pragma once
#include <stdint.h>
@@ -190,5 +189,3 @@ class CoreExport StringExtItem : public ExtensionItem
void unset(Extensible* container);
void free(void* item);
};
-
-#endif
View
6 include/filelogger.h
@@ -18,8 +18,7 @@
*/
-#ifndef FILELOGGER_H
-#define FILELOGGER_H
+#pragma once
#include "logger.h"
@@ -51,6 +50,3 @@ class CoreExport FileLogStream : public LogStream
virtual void OnLog(int loglevel, const std::string &type, const std::string &msg);
};
-
-#endif
-
View
5 include/hashcomp.h
@@ -22,8 +22,7 @@
*/
-#ifndef HASHCOMP_H
-#define HASHCOMP_H
+#pragma once
#include <cstring>
#include <string>
@@ -600,5 +599,3 @@ namespace std
}
}
-
-#endif
View
6 include/inspircd.h
@@ -23,8 +23,7 @@
*/
-#ifndef INSPIRCD_H
-#define INSPIRCD_H
+#pragma once
#define _FILE_OFFSET_BITS 64
#ifndef _LARGEFILE_SOURCE
@@ -877,6 +876,3 @@ class CommandModule : public Module
return Version(cmd.name, VF_VENDOR|VF_CORE);
}
};
-
-#endif
-
View
4 include/inspsocket.h
@@ -21,8 +21,7 @@
*/
-#ifndef INSPSOCKET_H
-#define INSPSOCKET_H
+#pragma once
#include "timer.h"
@@ -234,4 +233,3 @@ class CoreExport BufferedSocket : public StreamSocket
inline Module* StreamSocket::GetIOHook() { return IOHook; }
inline void StreamSocket::AddIOHook(Module* m) { IOHook = m; }
inline void StreamSocket::DelIOHook() { IOHook = NULL; }
-#endif
View
7 include/inspstring.h
@@ -18,13 +18,11 @@
*/
-#ifndef INSPSTRING_H
-#define INSPSTRING_H
+#pragma once
// This (config) is needed as inspstring doesn't pull in the central header
#include "config.h"
#include <cstring>
-//#include <cstddef>
#ifndef HAS_STRLCPY
/** strlcpy() implementation for systems that don't have it (linux) */
@@ -52,6 +50,3 @@ CoreExport std::string BinToHex(const std::string& data);
CoreExport std::string BinToBase64(const std::string& data, const char* table = NULL, char pad = 0);
/** Base64 decode */
CoreExport std::string Base64ToBin(const std::string& data, const char* table = NULL);
-
-#endif
-
View
1  include/listmode.h
@@ -16,6 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+
#pragma once
/** The base class for list modes, should be inherited.
View
5 include/logger.h
@@ -18,8 +18,7 @@
*/
-#ifndef LOGGER_H
-#define LOGGER_H
+#pragma once
/** Simple wrapper providing periodic flushing to a disk-backed file.
*/
@@ -211,5 +210,3 @@ class CoreExport LogManager
*/
void Log(const std::string &type, int loglevel, const char *fmt, ...) CUSTOM_PRINTF(4, 5);
};
-
-#endif
View
5 include/membership.h
@@ -17,8 +17,7 @@
*/
-#ifndef MEMBERSHIP_H
-#define MEMBERSHIP_H
+#pragma once
class CoreExport Membership : public Extensible
{
@@ -59,5 +58,3 @@ class Invitation : public classbase
static void Create(Channel* c, LocalUser* u, time_t timeout);
static Invitation* Find(Channel* c, LocalUser* u, bool check_expired = true);
};
-
-#endif
View
5 include/mode.h
@@ -20,8 +20,7 @@
*/
-#ifndef MODE_H
-#define MODE_H
+#pragma once
#include "ctables.h"
@@ -563,5 +562,3 @@ class CoreExport ModeParser
*/
std::string BuildPrefixes(bool lettersAndModes = true);
};
-
-#endif
View
5 include/modules.h
@@ -23,8 +23,7 @@
*/
-#ifndef MODULES_H
-#define MODULES_H
+#pragma once
#include "dynamic.h"
#include "base.h"
@@ -1645,5 +1644,3 @@ struct AllModuleList {
#define COMMAND_INIT(c) MODULE_INIT(CommandModule<c>)
#endif
-
-#endif
View
5 src/modules/account.h → include/modules/account.h
@@ -17,8 +17,7 @@
*/
-#ifndef ACCOUNT_H
-#define ACCOUNT_H
+#pragma once
#include <map>
#include <string>
@@ -40,5 +39,3 @@ inline AccountExtItem* GetAccountExtItem()
{
return static_cast<AccountExtItem*>(ServerInstance->Extensions.GetItem("accountname"));
}
-
-#endif
View
4 src/modules/m_cap.h → include/modules/cap.h
@@ -18,8 +18,7 @@
*/
-#ifndef M_CAP_H
-#define M_CAP_H
+#pragma once
class CapEvent : public Event
{
@@ -89,4 +88,3 @@ class GenericCap
}
};
-#endif
View
5 src/modules/hash.h → include/modules/hash.h
@@ -17,8 +17,7 @@
*/
-#ifndef HASH_H
-#define HASH_H
+#pragma once
#include "modules.h"
@@ -57,5 +56,3 @@ class HashProvider : public DataProvider
return sum(hmac1);
}
};
-
-#endif
View
7 src/modules/httpd.h → include/modules/httpd.h
@@ -21,10 +21,9 @@
*/
-#include "base.h"
+#pragma once
-#ifndef HTTPD_H
-#define HTTPD_H
+#include "base.h"
#include <string>
#include <sstream>
@@ -202,5 +201,3 @@ class HTTPDocumentResponse : public Request
{
}
};
-
-#endif
View
5 src/modules/m_regex.h → include/modules/regex.h
@@ -18,8 +18,7 @@
*/
-#ifndef M_REGEX_H
-#define M_REGEX_H
+#pragma once
#include "inspircd.h"
@@ -54,5 +53,3 @@ class RegexFactory : public DataProvider
virtual Regex* Create(const std::string& expr) = 0;
};
-
-#endif
View
5 src/modules/sasl.h → include/modules/sasl.h
@@ -17,8 +17,7 @@
*/
-#ifndef SASL_H
-#define SASL_H
+#pragma once
class SASLFallback : public Event
{
@@ -30,5 +29,3 @@ class SASLFallback : public Event
Send();
}
};
-
-#endif
View
5 src/modules/spanningtree.h → include/modules/spanningtree.h
@@ -17,8 +17,7 @@
*/
-#ifndef SPANNINGTREE_H
-#define SPANNINGTREE_H
+#pragma once
struct AddServerEvent : public Event
{
@@ -39,5 +38,3 @@ struct DelServerEvent : public Event
Send();
}
};
-
-#endif
View
5 src/modules/sql.h → include/modules/sql.h
@@ -17,8 +17,7 @@
*/
-#ifndef INSPIRCD_SQLAPI_3
-#define INSPIRCD_SQLAPI_3
+#pragma once
/** Defines the error types which SQLerror may be set to
*/
@@ -183,5 +182,3 @@ class SQLProvider : public DataProvider
userinfo["uuid"] = user->uuid;
}
};
-
-#endif
View
5 src/modules/ssl.h → include/modules/ssl.h
@@ -18,8 +18,7 @@
*/
-#ifndef SSL_H
-#define SSL_H
+#pragma once
#include <map>
#include <string>
@@ -171,5 +170,3 @@ struct UserCertificateRequest : public Request
return "";
}
};
-
-#endif
View
5 include/numerics.h
@@ -18,8 +18,7 @@
*/
-#ifndef NUMERICS_H
-#define NUMERICS_H
+#pragma once
/*
* This file is aimed providing a string that is easier to use than using the numeric
@@ -157,5 +156,3 @@ enum Numerics
ERR_CANTLOADMODULE = 974, // insp-specific
RPL_LOADEDMODULE = 975 // insp-specific
};
-
-#endif
View
6 include/protocol.h
@@ -18,8 +18,7 @@
*/
-#ifndef PROTOCOL_H
-#define PROTOCOL_H
+#pragma once
#include "hashcomp.h"
@@ -135,6 +134,3 @@ class ProtocolInterface
*/
virtual void GetServerList(ProtoServerList &sl) { }
};
-
-#endif
-
View
5 include/snomasks.h
@@ -20,8 +20,7 @@
*/
-#ifndef SNOMASKS_H
-#define SNOMASKS_H
+#pragma once
class Snomask
{
@@ -106,5 +105,3 @@ class CoreExport SnomaskManager
*/
void FlushSnotices();
};
-
-#endif
View
6 include/socket.h
@@ -22,8 +22,7 @@
*/
-#ifndef INSPIRCD_SOCKET_H
-#define INSPIRCD_SOCKET_H
+#pragma once
#ifndef _WIN32
@@ -165,6 +164,3 @@ class CoreExport ListenSocket : public EventHandler
*/
void AcceptInternal();
};
-
-#endif
-
View
6 include/socketengine.h
@@ -20,8 +20,7 @@
*/
-#ifndef SOCKETENGINE_H
-#define SOCKETENGINE_H
+#pragma once
#include <vector>
#include <string>
@@ -492,6 +491,3 @@ class CoreExport SocketEngine
};
SocketEngine* CreateSocketEngine();
-
-#endif
-
View
5 include/testsuite.h
@@ -16,8 +16,7 @@
*/
-#ifndef TESTSUITE_H
-#define TESTSUITE_H
+#pragma once
class TestSuite
{
@@ -32,5 +31,3 @@ class TestSuite
bool DoSpaceSepStreamTests();
bool DoGenerateUIDTests();
};
-
-#endif
View
6 include/threadengine.h
@@ -18,8 +18,7 @@
*/
-#ifndef THREADENGINE_H
-#define THREADENGINE_H
+#pragma once
#include <vector>
#include <string>
@@ -172,6 +171,3 @@ class CoreExport SocketThread : public Thread
*/
virtual void OnNotify() = 0;
};
-
-#endif
-
View
6 include/threadengines/threadengine_pthread.h
@@ -18,8 +18,7 @@
*/
-#ifndef THREADENGINE_PTHREAD_H
-#define THREADENGINE_PTHREAD_H
+#pragma once
#include <pthread.h>
#include "typedefs.h"
@@ -153,6 +152,3 @@ class ThreadSignalData
public:
ThreadSignalSocket* sock;
};
-
-
-#endif
View
6 include/threadengines/threadengine_win32.h
@@ -18,8 +18,7 @@
*/
-#ifndef THREADENGINE_WIN32_H
-#define THREADENGINE_WIN32_H
+#pragma once
#include "config.h"
#include "base.h"
@@ -152,6 +151,3 @@ class ThreadSignalData
connFD = -1;
}
};
-
-#endif
-
View
6 include/timer.h
@@ -19,8 +19,7 @@
*/
-#ifndef INSPIRCD_TIMER_H
-#define INSPIRCD_TIMER_H
+#pragma once
/** Timer class for one-second resolution timers
* Timer provides a facility which allows module
@@ -149,6 +148,3 @@ class CoreExport TimerManager
*/
static bool TimerComparison( Timer *one, Timer*two);
};
-
-#endif
-
View
7 include/typedefs.h
@@ -19,8 +19,7 @@
*/
-#ifndef TYPEDEFS_H
-#define TYPEDEFS_H
+#pragma once
class BanCacheManager;
class BanItem;
@@ -154,7 +153,3 @@ typedef XLineContainer::iterator ContainerIter;
/** An interator in an XLineLookup
*/
typedef XLineLookup::iterator LookupIter;
-
-
-#endif
-
View
2  include/uid.h
@@ -16,6 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#pragma once
/**
* This is the maximum length of a UUID (unique user identifier).
@@ -24,4 +25,3 @@
*/
#define UUID_LENGTH 10
-
View
5 include/usermanager.h
@@ -17,8 +17,7 @@
*/
-#ifndef USERMANAGER_H
-#define USERMANAGER_H
+#pragma once
#include <list>
@@ -168,5 +167,3 @@ class CoreExport UserManager
*/
void ServerPrivmsgAll(const char* text, ...) CUSTOM_PRINTF(2, 3);
};
-
-#endif
View
5 include/users.h
@@ -22,8 +22,7 @@
*/
-#ifndef USERS_H
-#define USERS_H
+#pragma once
#include "socket.h"
#include "inspsocket.h"
@@ -953,5 +952,3 @@ class CoreExport UserResolver : public Resolver
*/
void OnError(ResolverError e, const std::string &errormessage);
};
-
-#endif
View
4 include/xline.h
@@ -20,8 +20,7 @@
*/
-#ifndef XLINE_H
-#define XLINE_H
+#pragma once
/** XLine is the base class for ban lines such as G lines and K lines.
* Modules may derive from this, and their xlines will automatically be
@@ -527,4 +526,3 @@ class CoreExport XLineManager
void InvokeStats(const std::string &type, int numeric, User* user, string_list &results);
};
-#endif
View
2  src/modules/extra/m_mysql.cpp
@@ -25,7 +25,7 @@
#include "inspircd.h"
#include <mysql.h>
-#include "sql.h"
+#include "modules/sql.h"
#ifdef _WIN32
# pragma comment(lib, "mysqlclient.lib")
View
2  src/modules/extra/m_pgsql.cpp
@@ -26,7 +26,7 @@
#include <cstdlib>
#include <sstream>
#include <libpq-fe.h>
-#include "sql.h"
+#include "modules/sql.h"
/* $ModDesc: PostgreSQL Service Provider module for all other m_sql* modules, uses v2 of the SQL API */
/* $CompileFlags: -Iexec("pg_config --includedir") eval("my $s = `pg_config --version`;$s =~ /^.*?(\d+)\.(\d+)\.(\d+).*?$/;my $v = hex(sprintf("0x%02x%02x%02x", $1, $2, $3));print "-DPGSQL_HAS_ESCAPECONN" if(($v >= 0x080104) || ($v >= 0x07030F && $v < 0x070400) || ($v >= 0x07040D && $v < 0x080000) || ($v >= 0x080008 && $v < 0x080100));") */
View
4 src/modules/extra/m_regex_pcre.cpp
@@ -20,10 +20,10 @@
#include "inspircd.h"
#include <pcre.h>
-#include "m_regex.h"
+#include "modules/regex.h"
/* $ModDesc: Regex Provider Module for PCRE */
-/* $ModDep: m_regex.h */
+/* $ModDep: modules/regex.h */
/* $CompileFlags: exec("pcre-config --cflags") */
/* $LinkerFlags: exec("pcre-config --libs") rpath("pcre-config --libs") -lpcre */
View
4 src/modules/extra/m_regex_posix.cpp
@@ -19,12 +19,12 @@
#include "inspircd.h"
-#include "m_regex.h"
+#include "modules/regex.h"
#include <sys/types.h>
#include <regex.h>
/* $ModDesc: Regex Provider Module for POSIX Regular Expressions */
-/* $ModDep: m_regex.h */
+/* $ModDep: modules/regex.h */
class POSIXRegexException : public ModuleException
{
View
4 src/modules/extra/m_regex_stdlib.cpp
@@ -17,7 +17,7 @@
*/
#include "inspircd.h"
-#include "m_regex.h"
+#include "modules/regex.h"
#include <regex>
/* $ModDesc: Regex Provider Module for std::regex Regular Expressions */
@@ -25,7 +25,7 @@
* Specify the Regular Expression engine to use here. Valid settings are
* bre, ere, awk, grep, egrep, ecmascript (default if not specified)*/
/* $CompileFlags: -std=c++11 */
-/* $ModDep: m_regex.h */
+/* $ModDep: modules/regex.h */
class StdRegexException : public ModuleException
{
View
4 src/modules/extra/m_regex_tre.cpp
@@ -19,14 +19,14 @@
#include "inspircd.h"
-#include "m_regex.h"
+#include "modules/regex.h"
#include <sys/types.h>
#include <tre/regex.h>
/* $ModDesc: Regex Provider Module for TRE Regular Expressions */
/* $CompileFlags: pkgconfincludes("tre","tre/regex.h","") */
/* $LinkerFlags: pkgconflibs("tre","/libtre.so","-ltre") rpath("pkg-config --libs tre") */
-/* $ModDep: m_regex.h */
+/* $ModDep: modules/regex.h */
class TRERegexException : public ModuleException
{
View
2  src/modules/extra/m_sqlite3.cpp
@@ -22,7 +22,7 @@
#include "inspircd.h"
#include <sqlite3.h>
-#include "sql.h"
+#include "modules/sql.h"
#ifdef _WIN32
# pragma comment(lib, "sqlite3.lib")
View
4 src/modules/extra/m_ssl_gnutls.cpp
@@ -25,8 +25,8 @@
#include <gcrypt.h>
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
-#include "ssl.h"
-#include "m_cap.h"
+#include "modules/ssl.h"
+#include "modules/cap.h"
#ifdef _WIN32
# pragma comment(lib, "libgnutls.lib")
View
2  src/modules/extra/m_ssl_openssl.cpp
@@ -33,7 +33,7 @@
#include "inspircd.h"
#include <openssl/ssl.h>
#include <openssl/err.h>
-#include "ssl.h"
+#include "modules/ssl.h"
#ifdef _WIN32
# pragma comment(lib, "libcrypto.lib")
View
1  src/modules/m_banexception.cpp
@@ -25,7 +25,6 @@
#include "listmode.h"
/* $ModDesc: Provides support for the +e channel mode */
-/* $ModDep: ../../include/listmode.h */
/* Written by Om<om@inspircd.org>, April 2005. */
/* Rewritten to use the listmode utility by Om, December 2005 */
View
2  src/modules/m_cap.cpp
@@ -19,7 +19,7 @@
#include "inspircd.h"
-#include "m_cap.h"
+#include "modules/cap.h"
/* $ModDesc: Provides the CAP negotiation mechanism seen in ratbox-derived ircds */
View
2  src/modules/m_cloaking.cpp
@@ -24,7 +24,7 @@
#include "inspircd.h"
-#include "hash.h"
+#include "modules/hash.h"
/* $ModDesc: Provides masking of user hostnames */
View
2  src/modules/m_filter.cpp
@@ -22,7 +22,7 @@
#include "inspircd.h"
#include "xline.h"
-#include "m_regex.h"
+#include "modules/regex.h"
/* $ModDesc: Text (spam) filtering */
View
4 src/modules/m_httpd.cpp
@@ -23,10 +23,10 @@
#include "inspircd.h"
-#include "httpd.h"
+#include "modules/httpd.h"
/* $ModDesc: Provides HTTP serving facilities to modules */
-/* $ModDep: httpd.h */
+/* $ModDep: modules/httpd.h */
class ModuleHttpServer;
View
2  src/modules/m_httpd_acl.cpp
@@ -19,7 +19,7 @@
#include "inspircd.h"
-#include "httpd.h"
+#include "modules/httpd.h"
#include "protocol.h"
/* $ModDesc: Provides access control lists (passwording of resources, ip restrictions etc) to m_httpd.so dependent modules */
View
2  src/modules/m_httpd_config.cpp
@@ -19,7 +19,7 @@
#include "inspircd.h"
-#include "httpd.h"
+#include "modules/httpd.h"
#include "protocol.h"
/* $ModDesc: Allows for the server configuration to be viewed over HTTP via m_httpd.so */
View
2  src/modules/m_httpd_stats.cpp
@@ -22,7 +22,7 @@
#include "inspircd.h"
-#include "httpd.h"
+#include "modules/httpd.h"
#include "xline.h"
#include "protocol.h"
View
1  src/modules/m_inviteexception.cpp
@@ -25,7 +25,6 @@
#include "listmode.h"
/* $ModDesc: Provides support for the +I channel mode */
-/* $ModDep: ../../include/listmode.h */
/*
* Written by Om <om@inspircd.org>, April 2005.
View
4 src/modules/m_ircv3.cpp
@@ -19,8 +19,8 @@
/* $ModDesc: Provides support for extended-join, away-notify and account-notify CAP capabilities */
#include "inspircd.h"
-#include "account.h"
-#include "m_cap.h"
+#include "modules/account.h"
+#include "modules/cap.h"
class ModuleIRCv3 : public Module
{
View
2  src/modules/m_md5.cpp
@@ -27,7 +27,7 @@
#ifdef HAS_STDINT
#include <stdint.h>
#endif
-#include "hash.h"
+#include "modules/hash.h"
/* The four core functions - F1 is optimized somewhat */
#define F1(x, y, z) (z ^ (x & (y ^ z)))
View
2  src/modules/m_namesx.cpp
@@ -21,7 +21,7 @@
#include "inspircd.h"
-#include "m_cap.h"
+#include "modules/cap.h"
/* $ModDesc: Provides the NAMESX (CAP multi-prefix) capability. */
View
2  src/modules/m_password_hash.cpp
@@ -21,7 +21,7 @@
/* $ModDesc: Allows for hashed oper passwords */
#include "inspircd.h"
-#include "hash.h"
+#include "modules/hash.h"
/* Handle /MKPASSWD
*/
View
2  src/modules/m_regex_glob.cpp
@@ -18,7 +18,7 @@
*/
-#include "m_regex.h"
+#include "modules/regex.h"
#include "inspircd.h"
/* $ModDesc: Regex module using plain wildcard matching. */
View
2  src/modules/m_regonlycreate.cpp
@@ -21,7 +21,7 @@
#include "inspircd.h"
-#include "account.h"
+#include "modules/account.h"
/* $ModDesc: Prevents users whose nicks are not registered from creating new channels */
View
2  src/modules/m_ripemd160.cpp
@@ -64,7 +64,7 @@
#ifdef HAS_STDINT
#include <stdint.h>
#endif
-#include "hash.h"
+#include "modules/hash.h"
#define RMDsize 160
View
2  src/modules/m_rline.cpp
@@ -23,7 +23,7 @@
/* $ModDesc: RLINE: Regexp user banning. */
#include "inspircd.h"
-#include "m_regex.h"
+#include "modules/regex.h"
#include "xline.h"
static bool ZlineOnMatch = false;
View
8 src/modules/m_sasl.cpp
@@ -19,10 +19,10 @@
#include "inspircd.h"
-#include "m_cap.h"
-#include "account.h"
-#include "sasl.h"
-#include "ssl.h"
+#include "modules/cap.h"
+#include "modules/account.h"
+#include "modules/sasl.h"
+#include "modules/ssl.h"
/* $ModDesc: Provides support for IRC Authentication Layer (aka: atheme SASL) via AUTHENTICATE. */
View
2  src/modules/m_services_account.cpp
@@ -25,7 +25,7 @@
/* $ModDesc: Provides support for ircu-style services accounts, including chmode +R, etc. */
#include "inspircd.h"
-#include "account.h"
+#include "modules/account.h"
/** Channel mode +r - mark a channel as identified
*/
View
2  src/modules/m_sha256.cpp
@@ -62,7 +62,7 @@
#ifdef HAS_STDINT
#include <stdint.h>
#endif
-#include "hash.h"
+#include "modules/hash.h"
#ifndef HAS_STDINT
typedef unsigned int uint32_t;
View
5 src/modules/m_spanningtree/cachetimer.h
@@ -17,8 +17,7 @@
*/
-#ifndef M_SPANNINGTREE_CACHETIMER_H
-#define M_SPANNINGTREE_CACHETIMER_H
+#pragma once
#include "timer.h"
@@ -37,5 +36,3 @@ class CacheRefreshTimer : public Timer
CacheRefreshTimer(SpanningTreeUtilities* Util);
virtual void Tick(time_t TIME);
};
-
-#endif
View
5 src/modules/m_spanningtree/commands.h
@@ -17,8 +17,7 @@
*/
-#ifndef M_SPANNINGTREE_COMMANDS_H
-#define M_SPANNINGTREE_COMMANDS_H
+#pragma once
#include "main.h"
@@ -151,5 +150,3 @@ class SpanningTreeCommands
CommandFName fname;
SpanningTreeCommands(ModuleSpanningTree* module);
};
-
-#endif
View
4 src/modules/m_spanningtree/hmac.cpp
@@ -21,8 +21,8 @@
#include "inspircd.h"
#include "socket.h"
#include "xline.h"
-#include "../hash.h"
-#include "../ssl.h"
+#include "modules/hash.h"
+#include "modules/ssl.h"
#include "socketengine.h"
#include "main.h"
View
5 src/modules/m_spanningtree/link.h
@@ -18,8 +18,7 @@
*/
-#ifndef M_SPANNINGTREE_LINK_H
-#define M_SPANNINGTREE_LINK_H
+#pragma once
class Link : public refcountbase
{
@@ -51,5 +50,3 @@ class Autoconnect : public refcountbase
int position;
Autoconnect(ConfigTag* Tag) : tag(Tag) {}
};
-
-#endif
View
5 src/modules/m_spanningtree/main.h
@@ -21,8 +21,7 @@
*/
-#ifndef M_SPANNINGTREE_MAIN_H
-#define M_SPANNINGTREE_MAIN_H
+#pragma once
#include "inspircd.h"
#include <stdarg.h>
@@ -178,5 +177,3 @@ class ModuleSpanningTree : public Module
Version GetVersion();
void Prioritize();
};
-
-#endif
View
1  src/modules/m_spanningtree/operquit.cpp
@@ -19,7 +19,6 @@
#include "inspircd.h"
#include "xline.h"
-
#include "treesocket.h"
#include "treeserver.h"
#include "utils.h"
View
6 src/modules/m_spanningtree/protocolinterface.h
@@ -17,8 +17,7 @@
*/
-#ifndef M_SPANNINGTREE_PROTOCOLINTERFACE_H
-#define M_SPANNINGTREE_PROTOCOLINTERFACE_H
+#pragma once
class SpanningTreeUtilities;
class ModuleSpanningTree;
@@ -43,6 +42,3 @@ class SpanningTreeProtocolInterface : public ProtocolInterface
virtual void SendUserNotice(User* target, const std::string &text);
virtual void GetServerList(ProtoServerList &sl);
};
-
-#endif
-
View
5 src/modules/m_spanningtree/resolvers.h
@@ -18,8 +18,7 @@
*/
-#ifndef M_SPANNINGTREE_RESOLVERS_H
-#define M_SPANNINGTREE_RESOLVERS_H
+#pragma once
#include "socket.h"
#include "inspircd.h"
@@ -63,5 +62,3 @@ class ServernameResolver : public Resolver
void OnLookupComplete(const std::string &result, unsigned int ttl, bool cached);
void OnError(ResolverError e, const std::string &errormessage);
};
-
-#endif
View
2  src/modules/m_spanningtree/treeserver.cpp
@@ -24,7 +24,7 @@
#include "socket.h"
#include "xline.h"
#include "main.h"
-#include "../spanningtree.h"
+#include "modules/spanningtree.h"
#include "utils.h"
#include "treeserver.h"
View
5 src/modules/m_spanningtree/treeserver.h
@@ -19,8 +19,7 @@
*/
-#ifndef M_SPANNINGTREE_TREESERVER_H
-#define M_SPANNINGTREE_TREESERVER_H
+#pragma once
#include "treesocket.h"
@@ -210,5 +209,3 @@ class TreeServer : public classbase
*/
~TreeServer();
};
-
-#endif
View
6 src/modules/m_spanningtree/treesocket.h
@@ -20,8 +20,7 @@
*/
-#ifndef M_SPANNINGTREE_TREESOCKET_H
-#define M_SPANNINGTREE_TREESOCKET_H
+#pragma once
#include "socket.h"
#include "inspircd.h"
@@ -318,6 +317,3 @@ class TreeSocket : public BufferedSocket
*/
bool Introduced();
};
-
-#endif
-
View
2  src/modules/m_spanningtree/treesocket1.cpp
@@ -26,7 +26,7 @@
#include "socketengine.h"
#include "main.h"
-#include "../spanningtree.h"
+#include "modules/spanningtree.h"
#include "utils.h"
#include "treeserver.h"
#include "link.h"
View
5 src/modules/m_spanningtree/utils.h
@@ -20,8 +20,7 @@
*/
-#ifndef M_SPANNINGTREE_UTILS_H
-#define M_SPANNINGTREE_UTILS_H
+#pragma once
#include "inspircd.h"
@@ -179,5 +178,3 @@ class SpanningTreeUtilities : public classbase
*/
void RefreshIPCache();
};
-
-#endif
View
4 src/modules/m_sqlauth.cpp
@@ -18,8 +18,8 @@
#include "inspircd.h"
-#include "sql.h"
-#include "hash.h"
+#include "modules/sql.h"
+#include "modules/hash.h"
/* $ModDesc: Allow/Deny connections based upon an arbitrary SQL table */
View
4 src/modules/m_sqloper.cpp
@@ -18,8 +18,8 @@
#include "inspircd.h"
-#include "sql.h"
-#include "hash.h"
+#include "modules/sql.h"
+#include "modules/hash.h"
/* $ModDesc: Allows storage of oper credentials in an SQL table */
View
2  src/modules/m_sslinfo.cpp
@@ -18,7 +18,7 @@
#include "inspircd.h"
-#include "ssl.h"
+#include "modules/ssl.h"
/* $ModDesc: Provides SSL metadata, including /WHOIS information and /SSLINFO command */
View
2  src/modules/m_sslmodes.cpp
@@ -22,7 +22,7 @@
#include "inspircd.h"
-#include "ssl.h"
+#include "modules/ssl.h"
/* $ModDesc: Provides channel mode +z to allow for Secure/SSL only channels */
View
2  src/modules/m_uhnames.cpp
@@ -20,7 +20,7 @@
#include "inspircd.h"
-#include "m_cap.h"
+#include "modules/cap.h"
/* $ModDesc: Provides the UHNAMES facility. */
View
5 win/config.h.cmake
@@ -1,5 +1,4 @@
-#ifndef INSPIRCD_CONFIG_H
-#define INSPIRCD_CONFIG_H
+#pragma once
#define BRANCH "@MAJOR_VERSION@.@MINOR_VERSION@"
#define VERSION "@FULL_VERSION@"
@@ -14,5 +13,3 @@
#include "inspircd_win32wrapper.h"
#include "threadengines/threadengine_win32.h"
-
-#endif
View
1  win/inspircd_memory_functions.cpp
@@ -16,6 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+
#include <windows.h>
#include <exception>
#include <new>
View
3  win/inspircd_win32wrapper.cpp
@@ -22,6 +22,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+
#include "inspircd_win32wrapper.h"
#include "inspircd.h"
#include "configreader.h"
@@ -203,7 +204,7 @@ DWORD CWin32Exception::GetErrorCode()
}
#include "../src/modules/m_spanningtree/link.h"
-#include "../src/modules/ssl.h"
+#include "modules/ssl.h"
template class reference<Link>;
template class reference<Autoconnect>;
template class reference<ssl_cert>;
View
9 win/inspircd_win32wrapper.h
@@ -19,13 +19,11 @@
*/
+#pragma once
+
/* Windows Port
Wrapper Functions/Definitions
By Burlex */
-
-#ifndef INSPIRCD_WIN32WRAPPER_H
-#define INSPIRCD_WIN32WRAPPER_H
-
/*
* Starting with PSAPI version 2 for Windows 7 and Windows Server 2008 R2, this function is defined as K32GetProcessMemoryInfo in Psapi.h and exported
* in Kernel32.lib and Kernel32.dll. However, you should always call this function as GetProcessMemoryInfo. To ensure correct resolution of symbols
@@ -200,6 +198,3 @@ class CWin32Exception : public std::exception
char szErrorString[500];
DWORD dwErrorCode;
};
-
-#endif
-
View
2  win/win32service.h
@@ -15,7 +15,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+
#pragma once
+
#ifdef _WIN32
/* Hook for win32service.cpp to exit properly with the service specific error code */
Something went wrong with that request. Please try again.