diff options
Diffstat (limited to 'include')
62 files changed, 95 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, |
