diff options
84 files changed, 139 insertions, 175 deletions
diff --git a/include/access.h b/include/access.h index 32b59e655..7b3f5eb86 100644 --- a/include/access.h +++ b/include/access.h @@ -9,8 +9,7 @@ * Based on the original code of Services by Andy Church. */ -#ifndef ACCESS_H -#define ACCESS_H +#pragma once #include "services.h" #include "anope.h" @@ -170,5 +169,3 @@ class CoreExport AccessGroup inline bool empty() const { return paths.empty(); } }; - -#endif diff --git a/include/account.h b/include/account.h index 92b892f65..fd22393fd 100644 --- a/include/account.h +++ b/include/account.h @@ -9,8 +9,7 @@ * Based on the original code of Services by Andy Church. */ -#ifndef ACCOUNT_H -#define ACCOUNT_H +#pragma once #include "extensible.h" #include "serialize.h" @@ -286,5 +285,3 @@ class CoreExport IdentifyRequest static void ModuleUnload(Module *m); }; - -#endif // ACCOUNT_H diff --git a/include/anope.h b/include/anope.h index 129028fda..32ba53de7 100644 --- a/include/anope.h +++ b/include/anope.h @@ -9,8 +9,7 @@ * Based on the original code of Services by Andy Church. */ -#ifndef ANOPE_H -#define ANOPE_H +#pragma once #include <signal.h> @@ -777,5 +776,3 @@ template<typename T, typename O> inline T anope_dynamic_static_cast(O ptr) return static_cast<T>(ptr); } #endif - -#endif // ANOPE_H diff --git a/include/base.h b/include/base.h index 3f0180247..87f9ce0c1 100644 --- a/include/base.h +++ b/include/base.h @@ -6,8 +6,7 @@ * Please read COPYING and README for further details. */ -#ifndef BASE_H -#define BASE_H +#pragma once #include "services.h" @@ -136,5 +135,3 @@ class Reference : public ReferenceBase return false; } }; - -#endif // BASE_H diff --git a/include/bots.h b/include/bots.h index 0cfee8c53..eed1308a1 100644 --- a/include/bots.h +++ b/include/bots.h @@ -6,8 +6,7 @@ * Please read COPYING and README for further details. */ -#ifndef BOTS_H -#define BOTS_H +#pragma once #include "users.h" #include "anope.h" @@ -131,5 +130,3 @@ class CoreExport BotInfo : public User, public Serializable */ static BotInfo* Find(const Anope::string &nick, bool nick_only = false); }; - -#endif // BOTS_H diff --git a/include/channels.h b/include/channels.h index 838dd15c0..5b7e7a52e 100644 --- a/include/channels.h +++ b/include/channels.h @@ -6,8 +6,7 @@ * Please read COPYING and README for further details. */ -#ifndef CHANNELS_H -#define CHANNELS_H +#pragma once #include "anope.h" #include "extensible.h" @@ -306,5 +305,3 @@ class CoreExport Channel : public Base, public Extensible static void DeleteChannels(); }; - -#endif // CHANNELS_H diff --git a/include/commands.h b/include/commands.h index c5b718dea..ed7b42511 100644 --- a/include/commands.h +++ b/include/commands.h @@ -9,8 +9,7 @@ * Based on the original code of Services by Andy Church. */ -#ifndef COMMAND_H -#define COMMAND_H +#pragma once #include "service.h" #include "anope.h" @@ -181,5 +180,3 @@ class CoreExport Command : public Service */ static bool FindCommandFromService(const Anope::string &command_service, BotInfo* &bi, Anope::string &name); }; - -#endif // COMMANDS_H diff --git a/include/config.h b/include/config.h index d2989cab4..4891eeacd 100644 --- a/include/config.h +++ b/include/config.h @@ -9,8 +9,7 @@ * Based on the original code of Services by Andy Church. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "account.h" #include "regchannel.h" @@ -183,5 +182,3 @@ class ConfigException : public CoreException extern Configuration::File ServicesConf; extern CoreExport Configuration::Conf *Config; - -#endif // CONFIG_H diff --git a/include/defs.h b/include/defs.h index 5da239355..af5709c20 100644 --- a/include/defs.h +++ b/include/defs.h @@ -9,6 +9,8 @@ * Based on the original code of Services by Andy Church. */ +#pragma once + class AccessGroup; class AutoKick; class BotInfo; diff --git a/include/extensible.h b/include/extensible.h index bb7f38448..40c71e3e2 100644 --- a/include/extensible.h +++ b/include/extensible.h @@ -6,8 +6,7 @@ * Please read COPYING and README for further details. */ -#ifndef EXTENSIBLE_H -#define EXTENSIBLE_H +#pragma once #include "anope.h" #include "serialize.h" @@ -259,5 +258,3 @@ void Extensible::Shrink(const Anope::string &name) else Log(LOG_DEBUG) << "Shrink for nonexistent type " << name << " on " << static_cast<void *>(this); } - -#endif // EXTENSIBLE_H diff --git a/include/hashcomp.h b/include/hashcomp.h index a50ab334d..6ab84fafa 100644 --- a/include/hashcomp.h +++ b/include/hashcomp.h @@ -6,8 +6,7 @@ * Please read COPYING and README for further details. */ -#ifndef HASHCOMP_H -#define HASHCOMP_H +#pragma once #include <string> #include <locale> @@ -195,5 +194,3 @@ inline bool operator!=(const std::string &leftval, const ci::string &rightval) { return !(leftval.c_str() == rightval); } - -#endif // HASHCOMP_H diff --git a/include/language.h b/include/language.h index b6940ee99..46b5b6a50 100644 --- a/include/language.h +++ b/include/language.h @@ -6,6 +6,8 @@ * Please read COPYING and README for further details. */ +#pragma once + #include "anope.h" namespace Language diff --git a/include/lists.h b/include/lists.h index cbde1494f..8410fa890 100644 --- a/include/lists.h +++ b/include/lists.h @@ -9,8 +9,7 @@ * Based on the original code of Services by Andy Church. */ -#ifndef LISTS_H -#define LISTS_H +#pragma once #include "services.h" #include "anope.h" @@ -90,5 +89,3 @@ class CoreExport InfoFormatter Anope::string &operator[](const Anope::string &key); void AddOption(const Anope::string &opt); }; - -#endif // LISTS_H diff --git a/include/logger.h b/include/logger.h index 98e1bc156..95f8f81d2 100644 --- a/include/logger.h +++ b/include/logger.h @@ -9,8 +9,7 @@ * Based on the original code of Services by Andy Church. */ -#ifndef LOGGER_H -#define LOGGER_H +#pragma once #include "anope.h" #include "defs.h" @@ -140,5 +139,3 @@ class CoreExport LogInfo /* Logs the message l if configured to */ void ProcessMessage(const Log *l); }; - -#endif // LOGGER_H diff --git a/include/mail.h b/include/mail.h index 65873feba..bb246ba29 100644 --- a/include/mail.h +++ b/include/mail.h @@ -9,8 +9,7 @@ * Based on the original code of Services by Andy Church. */ -#ifndef MAIL_H -#define MAIL_H +#pragma once #include "anope.h" #include "threadengine.h" @@ -52,5 +51,3 @@ namespace Mail }; } // namespace Mail - -#endif // MAIL_H diff --git a/include/memo.h b/include/memo.h index a41730b53..5ce167839 100644 --- a/include/memo.h +++ b/include/memo.h @@ -9,8 +9,7 @@ * Based on the original code of Services by Andy Church. */ -#ifndef MEMO_H -#define MEMO_H +#pragma once #include "anope.h" #include "serialize.h" @@ -51,5 +50,3 @@ struct CoreExport MemoInfo static MemoInfo *GetMemoInfo(const Anope::string &targ, bool &is_chan); }; - -#endif // MEMO_H diff --git a/include/messages.h b/include/messages.h index 3e8be52fd..042330223 100644 --- a/include/messages.h +++ b/include/messages.h @@ -9,6 +9,8 @@ * Based on the original code of Services by Andy Church. */ +#pragma once + #include "protocol.h" /* Common IRCD messages. diff --git a/include/modes.h b/include/modes.h index af66a877c..9ea82142f 100644 --- a/include/modes.h +++ b/include/modes.h @@ -6,8 +6,7 @@ * Please read COPYING and README for further details. */ -#ifndef MODES_H -#define MODES_H +#pragma once #include "anope.h" #include "base.h" @@ -418,5 +417,3 @@ class CoreExport Entry */ bool Matches(User *u, bool full = false) const; }; - -#endif // MODES_H diff --git a/include/module.h b/include/module.h index ed3c309ae..c8000f35f 100644 --- a/include/module.h +++ b/include/module.h @@ -9,8 +9,7 @@ * Based on the original code of Services by Andy Church. */ -#ifndef MODULE_H -#define MODULE_H +#pragma once #include "access.h" #include "account.h" @@ -50,5 +49,3 @@ #include "modules/pseudoclients/global.h" #include "modules/pseudoclients/memoserv.h" #include "modules/pseudoclients/nickserv.h" - -#endif // MODULE_H diff --git a/include/modules.h b/include/modules.h index c3379bc6d..c3fea51b1 100644 --- a/include/modules.h +++ b/include/modules.h @@ -9,11 +9,10 @@ * Based on the original code of Services by Andy Church. */ -#include "serialize.h" -#ifndef MODULES_H -#define MODULES_H +#pragma once +#include "serialize.h" #include "base.h" #include "modes.h" #include "timers.h" @@ -1227,5 +1226,3 @@ class CoreExport ModuleManager */ static ModuleVersion GetVersion(void *handle); }; - -#endif // MODULES_H diff --git a/include/modules/bs_badwords.h b/include/modules/bs_badwords.h index 7bb7f1130..a3120d609 100644 --- a/include/modules/bs_badwords.h +++ b/include/modules/bs_badwords.h @@ -9,6 +9,8 @@ * Based on the original code of Services by Andy Church. */ +#pragma once + /** Flags for badwords */ enum BadWordType diff --git a/include/modules/bs_kick.h b/include/modules/bs_kick.h index 69c5c43ad..dc9926615 100644 --- a/include/modules/bs_kick.h +++ b/include/modules/bs_kick.h @@ -9,6 +9,8 @@ * Based on the original code of Services by Andy Church. */ +#pragma once + /* Indices for TTB (Times To Ban) */ enum { diff --git a/include/modules/cs_entrymsg.h b/include/modules/cs_entrymsg.h index 5b899ec84..5ff38130e 100644 --- a/include/modules/cs_entrymsg.h +++ b/include/modules/cs_entrymsg.h @@ -6,6 +6,8 @@ * Please read COPYING and README for further details. */ +#pragma once + struct EntryMsg { Anope::string chan; diff --git a/include/modules/cs_log.h b/include/modules/cs_log.h index 14f9764e3..6438dfada 100644 --- a/include/modules/cs_log.h +++ b/include/modules/cs_log.h @@ -9,6 +9,8 @@ * Based on the original code of Services by Andy Church. */ +#pragma once + struct LogSetting { Anope::string chan; diff --git a/include/modules/cs_mode.h b/include/modules/cs_mode.h index d99a9a1ff..33bf14317 100644 --- a/include/modules/cs_mode.h +++ b/include/modules/cs_mode.h @@ -9,6 +9,8 @@ * Based on the original code of Services by Andy Church. */ +#pragma once + struct ModeLock { Anope::string ci; diff --git a/include/modules/dns.h b/include/modules/dns.h index 6c9eda89f..2dc75a188 100644 --- a/include/modules/dns.h +++ b/include/modules/dns.h @@ -9,8 +9,7 @@ * Based on the original code of Services by Andy Church. */ -#ifndef DNS_H -#define DNS_H +#pragma once namespace DNS { @@ -174,5 +173,3 @@ namespace DNS }; } // namespace DNS - -#endif // DNS_H diff --git a/include/modules/encryption.h b/include/modules/encryption.h index 4adc77136..6d20c906e 100644 --- a/include/modules/encryption.h +++ b/include/modules/encryption.h @@ -9,6 +9,8 @@ * Based on the original code of Services by Andy Church. */ +#pragma once + namespace Encryption { typedef std::pair<const unsigned char *, size_t> Hash; diff --git a/include/modules/httpd.h b/include/modules/httpd.h index c4c2c7d74..f5a4c026f 100644 --- a/include/modules/httpd.h +++ b/include/modules/httpd.h @@ -6,8 +6,7 @@ * Please read COPYING and README for further details. */ -#ifndef ANOPE_HTTPD_H -#define ANOPE_HTTPD_H +#pragma once enum HTTPError { @@ -240,5 +239,3 @@ namespace HTTPUtils return dst; } } - -#endif // ANOPE_HTTPD_H diff --git a/include/modules/ldap.h b/include/modules/ldap.h index 7b778b6d4..05eceed50 100644 --- a/include/modules/ldap.h +++ b/include/modules/ldap.h @@ -6,8 +6,7 @@ * Please read COPYING and README for further details. */ -#ifndef ANOPE_LDAP_H -#define ANOPE_LDAP_H +#pragma once class LDAPException : public ModuleException { @@ -167,5 +166,3 @@ class LDAPProvider : public Service */ virtual void Modify(LDAPInterface *i, const Anope::string &base, LDAPMods &attributes) = 0; }; - -#endif // ANOPE_LDAP_H diff --git a/include/modules/ns_cert.h b/include/modules/ns_cert.h index 62ac07846..a4c9df02b 100644 --- a/include/modules/ns_cert.h +++ b/include/modules/ns_cert.h @@ -9,6 +9,8 @@ * Based on the original code of Services by Andy Church. */ +#pragma once + struct NSCertList { protected: diff --git a/include/modules/os_forbid.h b/include/modules/os_forbid.h index dd73dca4a..2c49fb197 100644 --- a/include/modules/os_forbid.h +++ b/include/modules/os_forbid.h @@ -6,8 +6,7 @@ * Please read COPYING and README for further details. */ -#ifndef OS_FORBID_H -#define OS_FORBID_H +#pragma once enum ForbidType { @@ -51,5 +50,3 @@ class ForbidService : public Service }; static ServiceReference<ForbidService> forbid_service("ForbidService", "forbid"); - -#endif diff --git a/include/modules/os_ignore.h b/include/modules/os_ignore.h index c4e401e81..658f5b712 100644 --- a/include/modules/os_ignore.h +++ b/include/modules/os_ignore.h @@ -9,6 +9,8 @@ * Based on the original code of Services by Andy Church. */ +#pragma once + struct IgnoreData { Anope::string mask; diff --git a/include/modules/os_news.h b/include/modules/os_news.h index acae4b641..68baa79cc 100644 --- a/include/modules/os_news.h +++ b/include/modules/os_news.h @@ -6,8 +6,7 @@ * Please read COPYING and README for further details. */ -#ifndef OS_NEWS -#define OS_NEWS +#pragma once enum NewsType { @@ -48,5 +47,3 @@ class NewsService : public Service }; static ServiceReference<NewsService> news_service("NewsService", "news"); - -#endif // OS_NEWS diff --git a/include/modules/os_session.h b/include/modules/os_session.h index 8318a40ec..638a587c2 100644 --- a/include/modules/os_session.h +++ b/include/modules/os_session.h @@ -6,8 +6,7 @@ * Please read COPYING and README for further details. */ -#ifndef OS_SESSION_H -#define OS_SESSION_H +#pragma once struct Session { @@ -90,5 +89,3 @@ Serializable* Exception::Unserialize(Serializable *obj, Serialize::Data &data) session_service->AddException(ex); return ex; } - -#endif diff --git a/include/modules/pseudoclients/chanserv.h b/include/modules/pseudoclients/chanserv.h index 893ea05aa..c9b52e630 100644 --- a/include/modules/pseudoclients/chanserv.h +++ b/include/modules/pseudoclients/chanserv.h @@ -6,8 +6,7 @@ * Please read COPYING and README for further details. */ -#ifndef CHANSERV_H -#define CHANSERV_H +#pragma once class ChanServService : public Service { @@ -21,5 +20,3 @@ class ChanServService : public Service */ virtual void Hold(Channel *c) = 0; }; - -#endif // CHANSERV_H diff --git a/include/modules/pseudoclients/global.h b/include/modules/pseudoclients/global.h index 357f1c5cf..9d1f4505c 100644 --- a/include/modules/pseudoclients/global.h +++ b/include/modules/pseudoclients/global.h @@ -6,8 +6,7 @@ * Please read COPYING and README for further details. */ -#ifndef GLOBAL_H -#define GLOBAL_H +#pragma once class GlobalService : public Service { @@ -26,5 +25,3 @@ class GlobalService : public Service */ virtual void SendGlobal(BotInfo *sender, const Anope::string &source, const Anope::string &message) = 0; }; - -#endif // GLOBAL_H diff --git a/include/modules/pseudoclients/memoserv.h b/include/modules/pseudoclients/memoserv.h index e64b2104a..ff0584772 100644 --- a/include/modules/pseudoclients/memoserv.h +++ b/include/modules/pseudoclients/memoserv.h @@ -6,8 +6,7 @@ * Please read COPYING and README for further details. */ -#ifndef MEMOSERV_H -#define MEMOSERV_H +#pragma once class MemoServService : public Service { @@ -37,5 +36,3 @@ class MemoServService : public Service */ virtual void Check(User *u) = 0; }; - -#endif // MEMOSERV_H diff --git a/include/modules/pseudoclients/nickserv.h b/include/modules/pseudoclients/nickserv.h index d17e14e8e..1a50a67c1 100644 --- a/include/modules/pseudoclients/nickserv.h +++ b/include/modules/pseudoclients/nickserv.h @@ -6,8 +6,7 @@ * Please read COPYING and README for further details. */ -#ifndef NICKSERV_H -#define NICKSERV_H +#pragma once class NickServService : public Service { @@ -20,5 +19,3 @@ class NickServService : public Service virtual void Collide(User *u, NickAlias *na) = 0; virtual void Release(NickAlias *na) = 0; }; - -#endif // NICKSERV_H diff --git a/include/modules/redis.h b/include/modules/redis.h index 4d72b2afa..b4adb1f40 100644 --- a/include/modules/redis.h +++ b/include/modules/redis.h @@ -6,6 +6,8 @@ * Please read COPYING and README for further details. */ +#pragma once + namespace Redis { struct Reply diff --git a/include/modules/sasl.h b/include/modules/sasl.h index 3b2d587fa..ab848e587 100644 --- a/include/modules/sasl.h +++ b/include/modules/sasl.h @@ -6,6 +6,8 @@ * Please read COPYING and README for further details. */ +#pragma once + namespace SASL { struct Message diff --git a/include/modules/set_misc.h b/include/modules/set_misc.h index c056c4c98..a2cd1b973 100644 --- a/include/modules/set_misc.h +++ b/include/modules/set_misc.h @@ -6,6 +6,8 @@ * Please read COPYING and README for further details. */ +#pragma once + struct MiscData { Anope::string object; diff --git a/include/modules/sql.h b/include/modules/sql.h index f7734a717..fcad4c79d 100644 --- a/include/modules/sql.h +++ b/include/modules/sql.h @@ -6,6 +6,8 @@ * Please read COPYING and README for further details. */ +#pragma once + namespace SQL { diff --git a/include/modules/ssl.h b/include/modules/ssl.h index 5dcc98b6e..83536558f 100644 --- a/include/modules/ssl.h +++ b/include/modules/ssl.h @@ -6,6 +6,8 @@ * Please read COPYING and README for further details. */ +#pragma once + class SSLService : public Service { public: diff --git a/include/modules/suspend.h b/include/modules/suspend.h index b9865717d..b376e4f00 100644 --- a/include/modules/suspend.h +++ b/include/modules/suspend.h @@ -9,6 +9,8 @@ * Based on the original code of Services by Andy Church. */ +#pragma once + struct SuspendInfo { Anope::string what, by, reason; diff --git a/include/modules/xmlrpc.h b/include/modules/xmlrpc.h index a39cdf061..1ccaa5ac9 100644 --- a/include/modules/xmlrpc.h +++ b/include/modules/xmlrpc.h @@ -6,6 +6,8 @@ * Please read COPYING and README for further details. */ +#pragma once + #include "httpd.h" class XMLRPCRequest diff --git a/include/opertype.h b/include/opertype.h index 9e46dda5b..dab26c7f6 100644 --- a/include/opertype.h +++ b/include/opertype.h @@ -6,8 +6,7 @@ * Please read COPYING and README for further details. */ -#ifndef OPERTYPE_H -#define OPERTYPE_H +#pragma once #include "services.h" #include "account.h" @@ -123,5 +122,3 @@ class CoreExport OperType */ const std::list<Anope::string> GetPrivs() const; }; - -#endif // OPERTYPE_H diff --git a/include/protocol.h b/include/protocol.h index 6bb649f74..5e43e3566 100644 --- a/include/protocol.h +++ b/include/protocol.h @@ -9,8 +9,7 @@ * Based on the original code of Services by Andy Church. */ -#ifndef PROTOCOL_H -#define PROTOCOL_H +#pragma once #include "services.h" #include "anope.h" @@ -309,5 +308,3 @@ private: }; extern CoreExport IRCDProto *IRCD; - -#endif // PROTOCOL_H diff --git a/include/regchannel.h b/include/regchannel.h index 9b05a2e62..ce12a04a7 100644 --- a/include/regchannel.h +++ b/include/regchannel.h @@ -6,8 +6,7 @@ * Please read COPYING and README for further details. */ -#ifndef REGCHANNEL_H -#define REGCHANNEL_H +#pragma once #include "memo.h" #include "modes.h" @@ -249,5 +248,3 @@ class CoreExport ChannelInfo : public Serializable, public Extensible * @return true or false */ extern CoreExport bool IsFounder(const User *user, const ChannelInfo *ci); - -#endif // REGCHANNEL_H diff --git a/include/regexpr.h b/include/regexpr.h index 20ed28098..b82ba89b6 100644 --- a/include/regexpr.h +++ b/include/regexpr.h @@ -9,8 +9,7 @@ * Based on the original code of Services by Andy Church. */ -#ifndef REGEXPR_H -#define REGEXPR_H +#pragma once #include "services.h" #include "anope.h" @@ -41,5 +40,3 @@ class CoreExport RegexProvider : public Service RegexProvider(Module *o, const Anope::string &n) : Service(o, "Regex", n) { } virtual Regex *Compile(const Anope::string &) = 0; }; - -#endif // REGEXPR_H diff --git a/include/serialize.h b/include/serialize.h index afe75c6d3..7979aca35 100644 --- a/include/serialize.h +++ b/include/serialize.h @@ -9,8 +9,7 @@ * Based on the original code of Services by Andy Church. */ -#ifndef SERIALIZE_H -#define SERIALIZE_H +#pragma once #include <sstream> @@ -329,5 +328,3 @@ class Serialize::Reference : public ReferenceBase return NULL; } }; - -#endif // SERIALIZE_H diff --git a/include/servers.h b/include/servers.h index 5864b7e11..3c03218ea 100644 --- a/include/servers.h +++ b/include/servers.h @@ -9,8 +9,7 @@ * Based on the original code of Services by Andy Church. */ -#ifndef SERVERS_H -#define SERVERS_H +#pragma once #include "services.h" #include "anope.h" @@ -183,5 +182,3 @@ class CoreExport Server : public Extensible */ static Server *Find(const Anope::string &name, bool name_only = false); }; - -#endif // SERVERS_H diff --git a/include/service.h b/include/service.h index a29728b32..dc2ebf609 100644 --- a/include/service.h +++ b/include/service.h @@ -9,8 +9,7 @@ * Based on the original code of Services by Andy Church. */ -#ifndef SERVICE_H -#define SERVICE_H +#pragma once #include "services.h" #include "anope.h" @@ -169,5 +168,3 @@ class ServiceAlias Service::DelAlias(t, f); } }; - -#endif // SERVICE_H diff --git a/include/services.h b/include/services.h index 823aad8a3..a1f150fce 100644 --- a/include/services.h +++ b/include/services.h @@ -9,8 +9,7 @@ * Based on the original code of Services by Andy Church. */ -#ifndef SERVICES_H -#define SERVICES_H +#pragma once #include "sysconf.h" @@ -57,5 +56,3 @@ #else # include "anope_windows.h" #endif - -#endif // SERVICES_H diff --git a/include/socketengine.h b/include/socketengine.h index 9bf32ba30..a4c57e4f4 100644 --- a/include/socketengine.h +++ b/include/socketengine.h @@ -9,8 +9,7 @@ * Based on the original code of Services by Andy Church. */ -#ifndef SOCKETENGINE_H -#define SOCKETENGINE_H +#pragma once #include "services.h" #include "sockets.h" @@ -46,5 +45,3 @@ class CoreExport SocketEngine static bool IgnoreErrno(); }; - -#endif // SOCKETENGINE_H diff --git a/include/sockets.h b/include/sockets.h index 823756a0e..29ed28dec 100644 --- a/include/sockets.h +++ b/include/sockets.h @@ -9,8 +9,7 @@ * Based on the original code of Services by Andy Church. */ -#ifndef SOCKETS_H -#define SOCKETS_H +#pragma once #ifndef _WIN32 #include <netinet/in.h> @@ -505,5 +504,3 @@ class CoreExport Pipe : public Socket extern CoreExport uint32_t TotalRead; extern CoreExport uint32_t TotalWritten; extern CoreExport SocketIO NormalSocketIO; - -#endif // SOCKET_H diff --git a/include/sysconf.h.cmake b/include/sysconf.h.cmake index b63598ae7..18fae8cc3 100644 --- a/include/sysconf.h.cmake +++ b/include/sysconf.h.cmake @@ -1,5 +1,15 @@ -#ifndef _SYSCONF_H_ -#define _SYSCONF_H_ +/* + * + * (C) 2003-2021 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + * + * Based on the original code of Epona by Lara. + * Based on the original code of Services by Andy Church. + */ + +#pragma once #cmakedefine DEBUG_BUILD @@ -22,5 +32,3 @@ # define bzero(buf, size) memset(buf, 0, size) # define sleep(x) Sleep(x * 1000) #endif - -#endif diff --git a/include/threadengine.h b/include/threadengine.h index b5f8e5755..705eb9d6e 100644 --- a/include/threadengine.h +++ b/include/threadengine.h @@ -9,8 +9,7 @@ * Based on the original code of Services by Andy Church. */ -#ifndef THREADENGINE_H -#define THREADENGINE_H +#pragma once #include "sockets.h" #include "extensible.h" @@ -112,5 +111,3 @@ class CoreExport Condition : public Mutex */ void Wait(); }; - -#endif // THREADENGINE_H diff --git a/include/timers.h b/include/timers.h index e51717499..2509e055d 100644 --- a/include/timers.h +++ b/include/timers.h @@ -9,8 +9,7 @@ * Based on the original code of Services by Andy Church. */ -#ifndef TIMERS_H -#define TIMERS_H +#pragma once #include "anope.h" @@ -127,5 +126,3 @@ class CoreExport TimerManager */ static void DeleteTimersFor(Module *m); }; - -#endif // TIMERS_H diff --git a/include/uplink.h b/include/uplink.h index 5aac5dd2d..90399a9b2 100644 --- a/include/uplink.h +++ b/include/uplink.h @@ -9,8 +9,7 @@ * Based on the original code of Services by Andy Church. */ -#ifndef UPLINK_H -#define UPLINK_H +#pragma once #include "sockets.h" #include "protocol.h" @@ -49,5 +48,3 @@ class UplinkSocket : public ConnectionSocket, public BufferedSocket }; }; extern CoreExport UplinkSocket *UplinkSock; - -#endif // UPLINK_H diff --git a/include/users.h b/include/users.h index e9bef1c4a..dc9d078d1 100644 --- a/include/users.h +++ b/include/users.h @@ -9,8 +9,7 @@ * Based on the original code of Services by Andy Church. */ -#ifndef USERS_H -#define USERS_H +#pragma once #include "anope.h" #include "modes.h" @@ -375,5 +374,3 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe */ static void QuitUsers(); }; - -#endif // USERS_H diff --git a/include/version.cpp b/include/version.cpp index 02fef8975..164fdb525 100644 --- a/include/version.cpp +++ b/include/version.cpp @@ -105,8 +105,9 @@ static bool write_build_h(const std::string &buildh, const std::string &git_vers return false; } - fd << "/* This file is automatically generated by version.cpp - do not edit it! */" << std::endl; - fd << build << std::endl; + fd << "/* This file is automatically generated by version.cpp - do not edit it! */" << std::endl + << "#pragma once" << std::endl + << build << std::endl; if (!git_version.empty()) fd << "#define VERSION_GIT \"" << git_version << "\"" << std::endl; fd.close(); @@ -144,6 +145,7 @@ static bool write_version_h(const std::string &versionh, const std::map<std::str if (!fd.is_open()) return false; + fd << "#pragma once" << std::endl; for (std::map<std::string, std::string>::const_iterator it = versions.begin(); it != versions.end(); ++it) { fd << "#define " << it->first << " " << it->second << std::endl; diff --git a/include/xline.h b/include/xline.h index f00937ba0..abe5fd001 100644 --- a/include/xline.h +++ b/include/xline.h @@ -6,8 +6,7 @@ * Please read COPYING and README for further details. */ -#ifndef XLINE_H -#define XLINE_H +#pragma once #include "serialize.h" #include "service.h" @@ -180,5 +179,3 @@ class CoreExport XLineManager : public Service */ virtual void SendDel(XLine *x) = 0; }; - -#endif // XLINE_H diff --git a/modules/extra/stats/irc2sql/irc2sql.h b/modules/extra/stats/irc2sql/irc2sql.h index 63acd4adc..41dfce38d 100644 --- a/modules/extra/stats/irc2sql/irc2sql.h +++ b/modules/extra/stats/irc2sql/irc2sql.h @@ -6,6 +6,8 @@ * Please read COPYING and README for further details. */ +#pragma once + #include "module.h" #include "modules/sql.h" diff --git a/modules/webcpanel/pages/chanserv/access.h b/modules/webcpanel/pages/chanserv/access.h index 2633f1db7..016b76080 100644 --- a/modules/webcpanel/pages/chanserv/access.h +++ b/modules/webcpanel/pages/chanserv/access.h @@ -5,6 +5,8 @@ * Please read COPYING and README for further details. */ +#pragma once + namespace WebCPanel { diff --git a/modules/webcpanel/pages/chanserv/akick.h b/modules/webcpanel/pages/chanserv/akick.h index 9d79e4c11..fac5df94c 100644 --- a/modules/webcpanel/pages/chanserv/akick.h +++ b/modules/webcpanel/pages/chanserv/akick.h @@ -5,6 +5,8 @@ * Please read COPYING and README for further details. */ +#pragma once + namespace WebCPanel { diff --git a/modules/webcpanel/pages/chanserv/drop.h b/modules/webcpanel/pages/chanserv/drop.h index 9fb121d4d..334b2f843 100644 --- a/modules/webcpanel/pages/chanserv/drop.h +++ b/modules/webcpanel/pages/chanserv/drop.h @@ -5,6 +5,8 @@ * Please read COPYING and README for further details. */ +#pragma once + namespace WebCPanel { diff --git a/modules/webcpanel/pages/chanserv/info.h b/modules/webcpanel/pages/chanserv/info.h index 94ec0fde5..3a581387a 100644 --- a/modules/webcpanel/pages/chanserv/info.h +++ b/modules/webcpanel/pages/chanserv/info.h @@ -5,6 +5,8 @@ * Please read COPYING and README for further details. */ +#pragma once + namespace WebCPanel { diff --git a/modules/webcpanel/pages/chanserv/modes.h b/modules/webcpanel/pages/chanserv/modes.h index 60d83f24a..e1b2a0e90 100644 --- a/modules/webcpanel/pages/chanserv/modes.h +++ b/modules/webcpanel/pages/chanserv/modes.h @@ -5,6 +5,8 @@ * Please read COPYING and README for further details. */ +#pragma once + namespace WebCPanel { diff --git a/modules/webcpanel/pages/chanserv/set.h b/modules/webcpanel/pages/chanserv/set.h index 157d02dea..c1ab5d56d 100644 --- a/modules/webcpanel/pages/chanserv/set.h +++ b/modules/webcpanel/pages/chanserv/set.h @@ -5,6 +5,8 @@ * Please read COPYING and README for further details. */ +#pragma once + namespace WebCPanel { diff --git a/modules/webcpanel/pages/chanserv/utils.h b/modules/webcpanel/pages/chanserv/utils.h index 704fbf89e..b63b027b5 100644 --- a/modules/webcpanel/pages/chanserv/utils.h +++ b/modules/webcpanel/pages/chanserv/utils.h @@ -5,6 +5,8 @@ * Please read COPYING and README for further details. */ +#pragma once + namespace WebCPanel { diff --git a/modules/webcpanel/pages/confirm.h b/modules/webcpanel/pages/confirm.h index 66ded4d50..a5e53943c 100644 --- a/modules/webcpanel/pages/confirm.h +++ b/modules/webcpanel/pages/confirm.h @@ -5,6 +5,8 @@ * Please read COPYING and README for further details. */ +#pragma once + #include "modules/httpd.h" namespace WebCPanel diff --git a/modules/webcpanel/pages/hostserv/request.h b/modules/webcpanel/pages/hostserv/request.h index 9ec729a20..775c8ab94 100644 --- a/modules/webcpanel/pages/hostserv/request.h +++ b/modules/webcpanel/pages/hostserv/request.h @@ -5,6 +5,8 @@ * Please read COPYING and README for further details. */ +#pragma once + namespace WebCPanel { diff --git a/modules/webcpanel/pages/index.h b/modules/webcpanel/pages/index.h index 715fc72ec..0b9bb69ad 100644 --- a/modules/webcpanel/pages/index.h +++ b/modules/webcpanel/pages/index.h @@ -5,6 +5,8 @@ * Please read COPYING and README for further details. */ +#pragma once + #include "modules/httpd.h" namespace WebCPanel diff --git a/modules/webcpanel/pages/logout.h b/modules/webcpanel/pages/logout.h index bbb84c2fa..78338f947 100644 --- a/modules/webcpanel/pages/logout.h +++ b/modules/webcpanel/pages/logout.h @@ -5,6 +5,8 @@ * Please read COPYING and README for further details. */ +#pragma once + namespace WebCPanel { diff --git a/modules/webcpanel/pages/memoserv/memos.h b/modules/webcpanel/pages/memoserv/memos.h index b64ce4677..dadbd5639 100644 --- a/modules/webcpanel/pages/memoserv/memos.h +++ b/modules/webcpanel/pages/memoserv/memos.h @@ -5,6 +5,8 @@ * Please read COPYING and README for further details. */ +#pragma once + namespace WebCPanel { diff --git a/modules/webcpanel/pages/nickserv/access.h b/modules/webcpanel/pages/nickserv/access.h index 2421e2d6d..03c0268c7 100644 --- a/modules/webcpanel/pages/nickserv/access.h +++ b/modules/webcpanel/pages/nickserv/access.h @@ -5,6 +5,8 @@ * Please read COPYING and README for further details. */ +#pragma once + namespace WebCPanel { diff --git a/modules/webcpanel/pages/nickserv/alist.h b/modules/webcpanel/pages/nickserv/alist.h index e1767519e..bcbe33385 100644 --- a/modules/webcpanel/pages/nickserv/alist.h +++ b/modules/webcpanel/pages/nickserv/alist.h @@ -5,6 +5,8 @@ * Please read COPYING and README for further details. */ +#pragma once + namespace WebCPanel { diff --git a/modules/webcpanel/pages/nickserv/cert.h b/modules/webcpanel/pages/nickserv/cert.h index f5da08987..1785a8446 100644 --- a/modules/webcpanel/pages/nickserv/cert.h +++ b/modules/webcpanel/pages/nickserv/cert.h @@ -5,6 +5,8 @@ * Please read COPYING and README for further details. */ +#pragma once + namespace WebCPanel { diff --git a/modules/webcpanel/pages/nickserv/info.h b/modules/webcpanel/pages/nickserv/info.h index 9d360d9ac..1b2e43d1b 100644 --- a/modules/webcpanel/pages/nickserv/info.h +++ b/modules/webcpanel/pages/nickserv/info.h @@ -5,6 +5,8 @@ * Please read COPYING and README for further details. */ +#pragma once + namespace WebCPanel { diff --git a/modules/webcpanel/pages/operserv/akill.h b/modules/webcpanel/pages/operserv/akill.h index 6567e50f1..2ed2e3b62 100644 --- a/modules/webcpanel/pages/operserv/akill.h +++ b/modules/webcpanel/pages/operserv/akill.h @@ -5,6 +5,8 @@ * Please read COPYING and README for further details. */ +#pragma once + namespace WebCPanel { diff --git a/modules/webcpanel/pages/register.h b/modules/webcpanel/pages/register.h index c8545ef48..b85f0992b 100644 --- a/modules/webcpanel/pages/register.h +++ b/modules/webcpanel/pages/register.h @@ -5,6 +5,8 @@ * Please read COPYING and README for further details. */ +#pragma once + #include "modules/httpd.h" namespace WebCPanel diff --git a/modules/webcpanel/static_fileserver.h b/modules/webcpanel/static_fileserver.h index d75a889c5..79c0468fb 100644 --- a/modules/webcpanel/static_fileserver.h +++ b/modules/webcpanel/static_fileserver.h @@ -5,6 +5,8 @@ * Please read COPYING and README for further details. */ +#pragma once + #include "modules/httpd.h" /* A basic file server. Used for serving static content on disk. */ diff --git a/modules/webcpanel/template_fileserver.h b/modules/webcpanel/template_fileserver.h index 8136c082b..fe1b5f313 100644 --- a/modules/webcpanel/template_fileserver.h +++ b/modules/webcpanel/template_fileserver.h @@ -5,6 +5,8 @@ * Please read COPYING and README for further details. */ +#pragma once + #include "modules/httpd.h" /* A basic file server. Used for serving non-static non-binary content on disk. */ diff --git a/modules/webcpanel/webcpanel.h b/modules/webcpanel/webcpanel.h index b40942f39..80b468ca8 100644 --- a/modules/webcpanel/webcpanel.h +++ b/modules/webcpanel/webcpanel.h @@ -5,6 +5,8 @@ * Please read COPYING and README for further details. */ +#pragma once + #include "module.h" #include "modules/httpd.h" |