summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-01-23 15:28:23 +0000
committerSadie Powell <sadie@witchery.services>2024-01-23 15:28:23 +0000
commita6a0f6c44780c839b2269f4f29a26ecfdbd95544 (patch)
treed4d1fded5c14350eb003a665ca8de500a0440cea /include
parent398d674cf40c0dba4e4cd2edd0f325ace15128c2 (diff)
Improve the layout of types that inherit from another type.
Diffstat (limited to 'include')
-rw-r--r--include/access.h6
-rw-r--r--include/account.h8
-rw-r--r--include/anope.h15
-rw-r--r--include/base.h3
-rw-r--r--include/bots.h4
-rw-r--r--include/channels.h7
-rw-r--r--include/commands.h3
-rw-r--r--include/config.h6
-rw-r--r--include/extensible.h18
-rw-r--r--include/hashcomp.h9
-rw-r--r--include/mail.h3
-rw-r--r--include/memo.h3
-rw-r--r--include/messages.h60
-rw-r--r--include/modes.h39
-rw-r--r--include/modules.h8
-rw-r--r--include/modules/cs_entrymsg.h3
-rw-r--r--include/modules/cs_log.h3
-rw-r--r--include/modules/dns.h10
-rw-r--r--include/modules/encryption.h3
-rw-r--r--include/modules/httpd.h12
-rw-r--r--include/modules/ldap.h6
-rw-r--r--include/modules/ns_cert.h3
-rw-r--r--include/modules/os_forbid.h3
-rw-r--r--include/modules/os_ignore.h3
-rw-r--r--include/modules/os_news.h6
-rw-r--r--include/modules/os_session.h6
-rw-r--r--include/modules/pseudoclients/chanserv.h3
-rw-r--r--include/modules/pseudoclients/global.h3
-rw-r--r--include/modules/pseudoclients/memoserv.h3
-rw-r--r--include/modules/pseudoclients/nickserv.h3
-rw-r--r--include/modules/redis.h3
-rw-r--r--include/modules/sasl.h9
-rw-r--r--include/modules/sql.h6
-rw-r--r--include/modules/ssl.h3
-rw-r--r--include/modules/xmlrpc.h3
-rw-r--r--include/protocol.h6
-rw-r--r--include/regchannel.h7
-rw-r--r--include/regexpr.h6
-rw-r--r--include/serialize.h9
-rw-r--r--include/servers.h3
-rw-r--r--include/service.h6
-rw-r--r--include/sockets.h21
-rw-r--r--include/threadengine.h7
-rw-r--r--include/uplink.h4
-rw-r--r--include/users.h5
-rw-r--r--include/xline.h6
46 files changed, 249 insertions, 117 deletions
diff --git a/include/access.h b/include/access.h
index 4a20a8c90..4242509aa 100644
--- a/include/access.h
+++ b/include/access.h
@@ -52,7 +52,8 @@ public:
/* A provider of access. Only used for creating ChanAccesses, as
* they contain pure virtual functions.
*/
-class CoreExport AccessProvider : public Service
+class CoreExport AccessProvider
+ : public Service
{
public:
AccessProvider(Module *owner, const Anope::string &name);
@@ -70,7 +71,8 @@ public:
};
/* Represents one entry of an access list on a channel. */
-class CoreExport ChanAccess : public Serializable
+class CoreExport ChanAccess
+ : public Serializable
{
Anope::string mask;
/* account this access entry is for, if any */
diff --git a/include/account.h b/include/account.h
index 160b0a260..1062b67bf 100644
--- a/include/account.h
+++ b/include/account.h
@@ -28,7 +28,9 @@ extern CoreExport nickcoreid_map NickCoreIdList;
/* A registered nickname.
* It matters that Base is here before Extensible (it is inherited by Serializable)
*/
-class CoreExport NickAlias : public Serializable, public Extensible
+class CoreExport NickAlias
+ : public Serializable
+ , public Extensible
{
Anope::string vhost_ident, vhost_host, vhost_creator;
time_t vhost_created;
@@ -104,7 +106,9 @@ public:
* account's display.
* It matters that Base is here before Extensible (it is inherited by Serializable)
*/
-class CoreExport NickCore : public Serializable, public Extensible
+class CoreExport NickCore
+ : public Serializable
+ , public Extensible
{
/* Channels which reference this core in some way (this is on their access list, akick list, is founder, successor, etc) */
Serialize::Checker<std::map<ChannelInfo *, int> > chanaccess;
diff --git a/include/anope.h b/include/anope.h
index fc8d01fba..976c69702 100644
--- a/include/anope.h
+++ b/include/anope.h
@@ -628,7 +628,8 @@ public:
/** A derived form of sepstream, which separates on commas
*/
-class commasepstream : public sepstream
+class commasepstream
+ : public sepstream
{
public:
/** Initialize with comma separator
@@ -638,7 +639,8 @@ public:
/** A derived form of sepstream, which separates on spaces
*/
-class spacesepstream : public sepstream
+class spacesepstream
+ : public sepstream
{
public:
/** Initialize with space separator
@@ -652,7 +654,8 @@ public:
* be loaded. If this happens, the error message returned by ModuleException::GetReason will be displayed to the user
* attempting to load the module, or dumped to the console if the ircd is currently loading for the first time.
*/
-class CoreExport CoreException : public std::exception
+class CoreExport CoreException
+ : public std::exception
{
protected:
/** Holds the error message to be displayed
@@ -691,7 +694,8 @@ public:
}
};
-class CoreExport ModuleException : public CoreException
+class CoreExport ModuleException
+ : public CoreException
{
public:
/** Default constructor, just uses the error message 'Module threw an exception'.
@@ -708,7 +712,8 @@ public:
virtual ~ModuleException() noexcept = default;
};
-class CoreExport ConvertException : public CoreException
+class CoreExport ConvertException
+ : public CoreException
{
public:
ConvertException(const Anope::string &reason = "") : CoreException(reason) { }
diff --git a/include/base.h b/include/base.h
index 99b16fed7..07b3bdf89 100644
--- a/include/base.h
+++ b/include/base.h
@@ -43,7 +43,8 @@ public:
* no longer be valid once the object it refers is destructed.
*/
template<typename T>
-class Reference : public ReferenceBase
+class Reference
+ : public ReferenceBase
{
protected:
T *ref = nullptr;
diff --git a/include/bots.h b/include/bots.h
index 68bfd9318..35ec7cd50 100644
--- a/include/bots.h
+++ b/include/bots.h
@@ -19,7 +19,9 @@ typedef Anope::map<BotInfo *> botinfo_map;
extern CoreExport Serialize::Checker<botinfo_map> BotListByNick, BotListByUID;
/* A service bot (NickServ, ChanServ, a BotServ bot, etc). */
-class CoreExport BotInfo : public User, public Serializable
+class CoreExport BotInfo
+ : public User
+ , public Serializable
{
/* Channels this bot is assigned to */
Serialize::Checker<std::set<ChannelInfo *> > channels;
diff --git a/include/channels.h b/include/channels.h
index 1e7531ab2..0230cc566 100644
--- a/include/channels.h
+++ b/include/channels.h
@@ -18,7 +18,8 @@ typedef Anope::hash_map<Channel *> channel_map;
extern CoreExport channel_map ChannelList;
/* A user container, there is one of these per user per channel. */
-struct ChanUserContainer : public Extensible
+struct ChanUserContainer
+ : public Extensible
{
User *user;
Channel *chan;
@@ -28,7 +29,9 @@ struct ChanUserContainer : public Extensible
ChanUserContainer(User *u, Channel *c) : user(u), chan(c) { }
};
-class CoreExport Channel : public Base, public Extensible
+class CoreExport Channel
+ : public Base
+ , public Extensible
{
static std::vector<Channel *> deleting;
diff --git a/include/commands.h b/include/commands.h
index cb53cf017..5f15da345 100644
--- a/include/commands.h
+++ b/include/commands.h
@@ -88,7 +88,8 @@ public:
/** Every services command is a class, inheriting from Command.
*/
-class CoreExport Command : public Service
+class CoreExport Command
+ : public Service
{
Anope::string desc;
std::vector<Anope::string> syntax;
diff --git a/include/config.h b/include/config.h
index 7a032d7e9..cb8de7c55 100644
--- a/include/config.h
+++ b/include/config.h
@@ -98,7 +98,8 @@ namespace Configuration
struct Uplink;
- struct CoreExport Conf : Block
+ struct CoreExport Conf
+ : Block
{
/* options:readtimeout */
time_t ReadTimeout;
@@ -171,7 +172,8 @@ namespace Configuration
* be loaded. If this happens, the error message returned by ModuleException::GetReason will be displayed to the user
* attempting to load the module, or dumped to the console if the ircd is currently loading for the first time.
*/
-class CoreExport ConfigException : public CoreException
+class CoreExport ConfigException
+ : public CoreException
{
public:
/** Default constructor, just uses the error message 'Config threw an exception'.
diff --git a/include/extensible.h b/include/extensible.h
index 7388651d8..a83d9e81f 100644
--- a/include/extensible.h
+++ b/include/extensible.h
@@ -15,7 +15,8 @@
class Extensible;
-class CoreExport ExtensibleBase : public Service
+class CoreExport ExtensibleBase
+ : public Service
{
protected:
std::map<Extensible *, void *> items;
@@ -53,7 +54,8 @@ public:
};
template<typename T>
-class BaseExtensibleItem : public ExtensibleBase
+class BaseExtensibleItem
+ : public ExtensibleBase
{
protected:
virtual T *Create(Extensible *) = 0;
@@ -124,7 +126,8 @@ public:
};
template<typename T>
-class ExtensibleItem : public BaseExtensibleItem<T>
+class ExtensibleItem
+ : public BaseExtensibleItem<T>
{
protected:
T* Create(Extensible *obj) override
@@ -136,7 +139,8 @@ public:
};
template<typename T>
-class PrimitiveExtensibleItem : public BaseExtensibleItem<T>
+class PrimitiveExtensibleItem
+ : public BaseExtensibleItem<T>
{
protected:
T* Create(Extensible *obj) override
@@ -160,7 +164,8 @@ public:
};
template<typename T>
-class SerializableExtensibleItem : public PrimitiveExtensibleItem<T>
+class SerializableExtensibleItem
+ : public PrimitiveExtensibleItem<T>
{
public:
SerializableExtensibleItem(Module *m, const Anope::string &n) : PrimitiveExtensibleItem<T>(m, n) { }
@@ -204,7 +209,8 @@ public:
};
template<typename T>
-struct ExtensibleRef : ServiceReference<BaseExtensibleItem<T> >
+struct ExtensibleRef
+ : ServiceReference<BaseExtensibleItem<T> >
{
ExtensibleRef(const Anope::string &n) : ServiceReference<BaseExtensibleItem<T> >("Extensible", n) { }
};
diff --git a/include/hashcomp.h b/include/hashcomp.h
index 13dc3ca10..91ccc3391 100644
--- a/include/hashcomp.h
+++ b/include/hashcomp.h
@@ -27,7 +27,8 @@ namespace Anope
/* ASCII case insensitive ctype. */
template<typename char_type>
- class ascii_ctype : public std::ctype<char_type>
+ class ascii_ctype
+ : public std::ctype<char_type>
{
public:
char_type do_toupper(char_type c) const override
@@ -49,7 +50,8 @@ namespace Anope
/* rfc1459 case insensitive ctype, { = [, } = ], and | = \ */
template<typename char_type>
- class rfc1459_ctype : public ascii_ctype<char_type>
+ class rfc1459_ctype
+ : public ascii_ctype<char_type>
{
public:
char_type do_toupper(char_type c) const override
@@ -78,7 +80,8 @@ namespace ci
* This class is used to implement ci::string, a case-insensitive, ASCII-
* comparing string class.
*/
- struct CoreExport ci_char_traits : std::char_traits<char>
+ struct CoreExport ci_char_traits
+ : std::char_traits<char>
{
/** Check if two chars match.
* @param c1st First character
diff --git a/include/mail.h b/include/mail.h
index f0bb6d10d..1a0ce88cc 100644
--- a/include/mail.h
+++ b/include/mail.h
@@ -22,7 +22,8 @@ namespace Mail
extern CoreExport bool Validate(const Anope::string &email);
/* A email message being sent */
- class Message : public Thread
+ class Message
+ : public Thread
{
private:
Anope::string sendmail_path;
diff --git a/include/memo.h b/include/memo.h
index 0eac6859e..5e7c1a5c9 100644
--- a/include/memo.h
+++ b/include/memo.h
@@ -14,7 +14,8 @@
#include "anope.h"
#include "serialize.h"
-class CoreExport Memo : public Serializable
+class CoreExport Memo
+ : public Serializable
{
public:
MemoInfo *mi;
diff --git a/include/messages.h b/include/messages.h
index 7782aa665..206570940 100644
--- a/include/messages.h
+++ b/include/messages.h
@@ -21,35 +21,40 @@
namespace Message
{
- struct CoreExport Away : IRCDMessage
+ struct CoreExport Away
+ : IRCDMessage
{
Away(Module *creator, const Anope::string &mname = "AWAY") : IRCDMessage(creator, mname, 0) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
- struct CoreExport Capab : IRCDMessage
+ struct CoreExport Capab
+ : IRCDMessage
{
Capab(Module *creator, const Anope::string &mname = "CAPAB") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
- struct CoreExport Error : IRCDMessage
+ struct CoreExport Error
+ : IRCDMessage
{
Error(Module *creator, const Anope::string &mname = "ERROR") : IRCDMessage(creator, mname, 1) { }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
- struct CoreExport Invite : IRCDMessage
+ struct CoreExport Invite
+ : IRCDMessage
{
Invite(Module *creator, const Anope::string &mname = "INVITE") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
- struct CoreExport Join : IRCDMessage
+ struct CoreExport Join
+ : IRCDMessage
{
Join(Module *creator, const Anope::string &mname = "JOIN") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
@@ -67,105 +72,120 @@ namespace Message
static void SJoin(MessageSource &source, const Anope::string &chan, time_t ts, const Anope::string &modes, const std::list<SJoinUser> &users);
};
- struct CoreExport Kick : IRCDMessage
+ struct CoreExport Kick
+ : IRCDMessage
{
Kick(Module *creator, const Anope::string &mname = "KICK") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
- struct CoreExport Kill : IRCDMessage
+ struct CoreExport Kill
+ : IRCDMessage
{
Kill(Module *creator, const Anope::string &mname = "KILL") : IRCDMessage(creator, mname, 2) { }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
- struct CoreExport Mode : IRCDMessage
+ struct CoreExport Mode
+ : IRCDMessage
{
Mode(Module *creator, const Anope::string &mname = "MODE") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
- struct CoreExport MOTD : IRCDMessage
+ struct CoreExport MOTD
+ : IRCDMessage
{
MOTD(Module *creator, const Anope::string &mname = "MOTD") : IRCDMessage(creator, mname, 1) { }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
- struct CoreExport Notice : IRCDMessage
+ struct CoreExport Notice
+ : IRCDMessage
{
Notice(Module *creator, const Anope::string &mname = "NOTICE") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_USER); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
- struct CoreExport Part : IRCDMessage
+ struct CoreExport Part
+ : IRCDMessage
{
Part(Module *creator, const Anope::string &mname = "PART") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
- struct CoreExport Ping : IRCDMessage
+ struct CoreExport Ping
+ : IRCDMessage
{
Ping(Module *creator, const Anope::string &mname = "PING") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
- struct CoreExport Privmsg : IRCDMessage
+ struct CoreExport Privmsg
+ : IRCDMessage
{
Privmsg(Module *creator, const Anope::string &mname = "PRIVMSG") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_USER); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
- struct CoreExport Quit : IRCDMessage
+ struct CoreExport Quit
+ : IRCDMessage
{
Quit(Module *creator, const Anope::string &mname = "QUIT") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
- struct CoreExport SQuit : IRCDMessage
+ struct CoreExport SQuit
+ : IRCDMessage
{
SQuit(Module *creator, const Anope::string &mname = "SQUIT") : IRCDMessage(creator, mname, 2) { }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
- struct CoreExport Stats : IRCDMessage
+ struct CoreExport Stats
+ : IRCDMessage
{
Stats(Module *creator, const Anope::string &mname = "STATS") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_REQUIRE_USER); SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
- struct CoreExport Time : IRCDMessage
+ struct CoreExport Time
+ : IRCDMessage
{
Time(Module *creator, const Anope::string &mname = "TIME") : IRCDMessage(creator, mname, 0) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
- struct CoreExport Topic : IRCDMessage
+ struct CoreExport Topic
+ : IRCDMessage
{
Topic(Module *creator, const Anope::string &mname = "TOPIC") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_USER); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
- struct CoreExport Version : IRCDMessage
+ struct CoreExport Version
+ : IRCDMessage
{
Version(Module *creator, const Anope::string &mname = "VERSION") : IRCDMessage(creator, mname, 0) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
void Run(MessageSource &source, const std::vector<Anope::string> &params, const Anope::map<Anope::string> &tags) override;
};
- struct CoreExport Whois : IRCDMessage
+ struct CoreExport Whois
+ : IRCDMessage
{
Whois(Module *creator, const Anope::string &mname = "WHOIS") : IRCDMessage(creator, mname, 1) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
diff --git a/include/modes.h b/include/modes.h
index 02aef2ebf..b87d1e5b5 100644
--- a/include/modes.h
+++ b/include/modes.h
@@ -35,7 +35,8 @@ enum ModeClass
/** This class is the basis of all modes in Anope
*/
-class CoreExport Mode : public Base
+class CoreExport Mode
+ : public Base
{
public:
/* Mode name */
@@ -64,7 +65,8 @@ public:
/** This class is a user mode, all user modes use this/inherit from this
*/
-class CoreExport UserMode : public Mode
+class CoreExport UserMode
+ : public Mode
{
public:
/** constructor
@@ -74,7 +76,8 @@ public:
UserMode(const Anope::string &name, char mc);
};
-class CoreExport UserModeParam : public UserMode
+class CoreExport UserModeParam
+ : public UserMode
{
public:
/** constructor
@@ -92,7 +95,8 @@ public:
/** This class is a channel mode, all channel modes use this/inherit from this
*/
-class CoreExport ChannelMode : public Mode
+class CoreExport ChannelMode
+ : public Mode
{
public:
/* channel modes that can possibly unwrap this mode */
@@ -123,7 +127,8 @@ public:
/** This is a mode for lists, eg b/e/I. These modes should inherit from this
*/
-class CoreExport ChannelModeList : public ChannelMode
+class CoreExport ChannelModeList
+ : public ChannelMode
{
public:
/** constructor
@@ -161,7 +166,8 @@ public:
/** This is a mode with a parameter, eg +k/l. These modes should use/inherit from this
*/
-class CoreExport ChannelModeParam : public ChannelMode
+class CoreExport ChannelModeParam
+ : public ChannelMode
{
public:
/** constructor
@@ -183,7 +189,8 @@ public:
/** This is a mode that is a channel status, eg +v/h/o/a/q.
*/
-class CoreExport ChannelModeStatus : public ChannelMode
+class CoreExport ChannelModeStatus
+ : public ChannelMode
{
public:
/* The symbol, eg @ % + */
@@ -206,7 +213,8 @@ public:
* but we still have a representation for it.
*/
template<typename T>
-class CoreExport ChannelModeVirtual : public T
+class CoreExport ChannelModeVirtual
+ : public T
{
Anope::string base;
ChannelMode *basech;
@@ -239,7 +247,8 @@ public:
Anope::string BuildModePrefixList() const;
};
-class CoreExport UserModeOperOnly : public UserMode
+class CoreExport UserModeOperOnly
+ : public UserMode
{
public:
UserModeOperOnly(const Anope::string &mname, char um) : UserMode(mname, um) { }
@@ -247,7 +256,8 @@ public:
bool CanSet(User *u) const override;
};
-class CoreExport UserModeNoone : public UserMode
+class CoreExport UserModeNoone
+ : public UserMode
{
public:
UserModeNoone(const Anope::string &mname, char um) : UserMode(mname, um) { }
@@ -257,7 +267,8 @@ public:
/** Channel mode +k (key)
*/
-class CoreExport ChannelModeKey : public ChannelModeParam
+class CoreExport ChannelModeKey
+ : public ChannelModeParam
{
public:
ChannelModeKey(char mc) : ChannelModeParam("KEY", mc) { }
@@ -267,7 +278,8 @@ public:
/** This class is used for oper only channel modes
*/
-class CoreExport ChannelModeOperOnly : public ChannelMode
+class CoreExport ChannelModeOperOnly
+ : public ChannelMode
{
public:
ChannelModeOperOnly(const Anope::string &mname, char mc) : ChannelMode(mname, mc) { }
@@ -278,7 +290,8 @@ public:
/** This class is used for channel modes only servers may set
*/
-class CoreExport ChannelModeNoone : public ChannelMode
+class CoreExport ChannelModeNoone
+ : public ChannelMode
{
public:
ChannelModeNoone(const Anope::string &mname, char mc) : ChannelMode(mname, mc) { }
diff --git a/include/modules.h b/include/modules.h
index 94bde45aa..de8d560fe 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -196,11 +196,15 @@ public:
int GetPatch() const;
};
-class CoreExport NotImplementedException : public CoreException { };
+class CoreExport NotImplementedException
+ : public CoreException
+{
+};
/** Every module in Anope is actually a class.
*/
-class CoreExport Module : public Extensible
+class CoreExport Module
+ : public Extensible
{
private:
bool permanent;
diff --git a/include/modules/cs_entrymsg.h b/include/modules/cs_entrymsg.h
index 95f571f43..8259adf49 100644
--- a/include/modules/cs_entrymsg.h
+++ b/include/modules/cs_entrymsg.h
@@ -20,7 +20,8 @@ protected:
EntryMsg() = default;
};
-struct EntryMessageList : Serialize::Checker<std::vector<EntryMsg *> >
+struct EntryMessageList
+ : Serialize::Checker<std::vector<EntryMsg *> >
{
protected:
EntryMessageList() : Serialize::Checker<std::vector<EntryMsg *> >("EntryMsg") { }
diff --git a/include/modules/cs_log.h b/include/modules/cs_log.h
index 12bc3fcaf..077ee70ed 100644
--- a/include/modules/cs_log.h
+++ b/include/modules/cs_log.h
@@ -29,7 +29,8 @@ protected:
LogSetting() = default;
};
-struct LogSettings : Serialize::Checker<std::vector<LogSetting *> >
+struct LogSettings
+ : Serialize::Checker<std::vector<LogSetting *> >
{
typedef std::vector<LogSetting *>::iterator iterator;
diff --git a/include/modules/dns.h b/include/modules/dns.h
index a1e5eb71f..25123a504 100644
--- a/include/modules/dns.h
+++ b/include/modules/dns.h
@@ -88,7 +88,8 @@ namespace DNS
};
};
- struct ResourceRecord : Question
+ struct ResourceRecord
+ : Question
{
unsigned int ttl = 0;
Anope::string rdata;
@@ -113,7 +114,8 @@ namespace DNS
/** DNS manager
*/
- class Manager : public Service
+ class Manager
+ : public Service
{
public:
Manager(Module *creator) : Service(creator, "DNS::Manager", "dns/manager") { }
@@ -131,7 +133,9 @@ namespace DNS
/** A DNS query.
*/
- class Request : public Timer, public Question
+ class Request
+ : public Timer
+ , public Question
{
Manager *manager;
public:
diff --git a/include/modules/encryption.h b/include/modules/encryption.h
index 92385d94a..39eab638b 100644
--- a/include/modules/encryption.h
+++ b/include/modules/encryption.h
@@ -25,7 +25,8 @@ namespace Encryption
virtual Hash GetFinalizedHash() = 0;
};
- class Provider : public Service
+ class Provider
+ : public Service
{
public:
Provider(Module *creator, const Anope::string &sname) : Service(creator, "Encryption::Provider", sname) { }
diff --git a/include/modules/httpd.h b/include/modules/httpd.h
index 430336236..c755e9dd2 100644
--- a/include/modules/httpd.h
+++ b/include/modules/httpd.h
@@ -93,7 +93,8 @@ struct HTTPMessage
class HTTPClient;
class HTTPProvider;
-class HTTPPage : public virtual Base
+class HTTPPage
+ : public virtual Base
{
Anope::string url;
Anope::string content_type;
@@ -115,7 +116,10 @@ public:
virtual bool OnRequest(HTTPProvider *, const Anope::string &, HTTPClient *, HTTPMessage &, HTTPReply &) = 0;
};
-class HTTPClient : public ClientSocket, public BinarySocket, public Base
+class HTTPClient
+ : public ClientSocket
+ , public BinarySocket
+ , public Base
{
protected:
void WriteClient(const Anope::string &message)
@@ -135,7 +139,9 @@ public:
virtual void SendReply(HTTPReply *) = 0;
};
-class HTTPProvider : public ListenSocket, public Service
+class HTTPProvider
+ : public ListenSocket
+ , public Service
{
Anope::string ip;
unsigned short port;
diff --git a/include/modules/ldap.h b/include/modules/ldap.h
index 166e85fe9..37087198d 100644
--- a/include/modules/ldap.h
+++ b/include/modules/ldap.h
@@ -31,7 +31,8 @@ struct LDAPModification
};
typedef std::vector<LDAPModification> LDAPMods;
-struct LDAPAttributes : public std::map<Anope::string, std::vector<Anope::string> >
+struct LDAPAttributes
+ : public std::map<Anope::string, std::vector<Anope::string>>
{
size_t size(const Anope::string &attr) const
{
@@ -122,7 +123,8 @@ public:
virtual void OnDelete() { }
};
-class LDAPProvider : public Service
+class LDAPProvider
+ : public Service
{
public:
LDAPProvider(Module *c, const Anope::string &n) : Service(c, "LDAPProvider", n) { }
diff --git a/include/modules/ns_cert.h b/include/modules/ns_cert.h
index 09857ffd5..2d24cfeae 100644
--- a/include/modules/ns_cert.h
+++ b/include/modules/ns_cert.h
@@ -63,7 +63,8 @@ public:
virtual void Check() = 0;
};
-class CertService : public Service
+class CertService
+ : public Service
{
public:
CertService(Module *c) : Service(c, "CertService", "certs") { }
diff --git a/include/modules/os_forbid.h b/include/modules/os_forbid.h
index 12eeedbf9..19b34a1e6 100644
--- a/include/modules/os_forbid.h
+++ b/include/modules/os_forbid.h
@@ -31,7 +31,8 @@ protected:
ForbidData() = default;
};
-class ForbidService : public Service
+class ForbidService
+ : public Service
{
public:
ForbidService(Module *m) : Service(m, "ForbidService", "forbid") { }
diff --git a/include/modules/os_ignore.h b/include/modules/os_ignore.h
index 1cd24b670..448fa4354 100644
--- a/include/modules/os_ignore.h
+++ b/include/modules/os_ignore.h
@@ -23,7 +23,8 @@ protected:
IgnoreData() = default;
};
-class IgnoreService : public Service
+class IgnoreService
+ : public Service
{
protected:
IgnoreService(Module *c) : Service(c, "IgnoreService", "ignore") { }
diff --git a/include/modules/os_news.h b/include/modules/os_news.h
index 6a7732269..af7619e56 100644
--- a/include/modules/os_news.h
+++ b/include/modules/os_news.h
@@ -22,7 +22,8 @@ struct NewsMessages
const char *msgs[10];
};
-struct NewsItem : Serializable
+struct NewsItem
+ : Serializable
{
NewsType type;
Anope::string text;
@@ -32,7 +33,8 @@ struct NewsItem : Serializable
NewsItem() : Serializable("NewsItem") { }
};
-class NewsService : public Service
+class NewsService
+ : public Service
{
public:
NewsService(Module *m) : Service(m, "NewsService", "news") { }
diff --git a/include/modules/os_session.h b/include/modules/os_session.h
index f72e6b8b2..5341b4fe0 100644
--- a/include/modules/os_session.h
+++ b/include/modules/os_session.h
@@ -17,7 +17,8 @@ struct Session
Session(const sockaddrs &ip, int len) : addr(ip, len) { }
};
-struct Exception : Serializable
+struct Exception
+ : Serializable
{
Anope::string mask; /* Hosts to which this exception applies */
unsigned limit; /* Session limit for exception */
@@ -31,7 +32,8 @@ struct Exception : Serializable
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data);
};
-class SessionService : public Service
+class SessionService
+ : public Service
{
public:
typedef std::unordered_map<cidr, Session *, cidr::hash> SessionMap;
diff --git a/include/modules/pseudoclients/chanserv.h b/include/modules/pseudoclients/chanserv.h
index baf5cafce..c9e11185c 100644
--- a/include/modules/pseudoclients/chanserv.h
+++ b/include/modules/pseudoclients/chanserv.h
@@ -8,7 +8,8 @@
#pragma once
-class ChanServService : public Service
+class ChanServService
+ : public Service
{
public:
ChanServService(Module *m) : Service(m, "ChanServService", "ChanServ")
diff --git a/include/modules/pseudoclients/global.h b/include/modules/pseudoclients/global.h
index e0b138e8e..73283605d 100644
--- a/include/modules/pseudoclients/global.h
+++ b/include/modules/pseudoclients/global.h
@@ -8,7 +8,8 @@
#pragma once
-class GlobalService : public Service
+class GlobalService
+ : public Service
{
public:
GlobalService(Module *m) : Service(m, "GlobalService", "Global")
diff --git a/include/modules/pseudoclients/memoserv.h b/include/modules/pseudoclients/memoserv.h
index 8529c775e..845a19f00 100644
--- a/include/modules/pseudoclients/memoserv.h
+++ b/include/modules/pseudoclients/memoserv.h
@@ -8,7 +8,8 @@
#pragma once
-class MemoServService : public Service
+class MemoServService
+ : public Service
{
public:
enum MemoResult
diff --git a/include/modules/pseudoclients/nickserv.h b/include/modules/pseudoclients/nickserv.h
index a4f2a89b2..58cf93bd9 100644
--- a/include/modules/pseudoclients/nickserv.h
+++ b/include/modules/pseudoclients/nickserv.h
@@ -8,7 +8,8 @@
#pragma once
-class NickServService : public Service
+class NickServService
+ : public Service
{
public:
NickServService(Module *m) : Service(m, "NickServService", "NickServ")
diff --git a/include/modules/redis.h b/include/modules/redis.h
index 0007922a2..ec990823e 100644
--- a/include/modules/redis.h
+++ b/include/modules/redis.h
@@ -55,7 +55,8 @@ namespace Redis
virtual void OnError(const Anope::string &error) { Log(owner) << error; }
};
- class Provider : public Service
+ class Provider
+ : public Service
{
public:
Provider(Module *c, const Anope::string &n) : Service(c, "Redis::Provider", n) { }
diff --git a/include/modules/sasl.h b/include/modules/sasl.h
index 64994a7f8..2b1c6a30d 100644
--- a/include/modules/sasl.h
+++ b/include/modules/sasl.h
@@ -22,7 +22,8 @@ namespace SASL
class Mechanism;
struct Session;
- class Service : public ::Service
+ class Service
+ : public ::Service
{
public:
Service(Module *o) : ::Service(o, "SASL::Service", "sasl") { }
@@ -60,7 +61,8 @@ namespace SASL
};
/* PLAIN, EXTERNAL, etc */
- class Mechanism : public ::Service
+ class Mechanism
+ : public ::Service
{
public:
Mechanism(Module *o, const Anope::string &sname) : Service(o, "SASL::Mechanism", sname) { }
@@ -76,7 +78,8 @@ namespace SASL
}
};
- class IdentifyRequest : public ::IdentifyRequest
+ class IdentifyRequest
+ : public ::IdentifyRequest
{
Anope::string uid;
Anope::string hostname, ip;
diff --git a/include/modules/sql.h b/include/modules/sql.h
index 0f2abc812..59cc7a24b 100644
--- a/include/modules/sql.h
+++ b/include/modules/sql.h
@@ -11,7 +11,8 @@
namespace SQL
{
- class Data : public Serialize::Data
+ class Data
+ : public Serialize::Data
{
public:
typedef std::map<Anope::string, std::stringstream *> Map;
@@ -199,7 +200,8 @@ namespace SQL
/** Class providing the SQL service, modules call this to execute queries
*/
- class Provider : public Service
+ class Provider
+ : public Service
{
public:
Provider(Module *c, const Anope::string &n) : Service(c, "SQL::Provider", n) { }
diff --git a/include/modules/ssl.h b/include/modules/ssl.h
index c56212f03..32bcdb73a 100644
--- a/include/modules/ssl.h
+++ b/include/modules/ssl.h
@@ -8,7 +8,8 @@
#pragma once
-class SSLService : public Service
+class SSLService
+ : public Service
{
public:
SSLService(Module *o, const Anope::string &n) : Service(o, "SSLService", n) { }
diff --git a/include/modules/xmlrpc.h b/include/modules/xmlrpc.h
index e57f00004..a12a23c9e 100644
--- a/include/modules/xmlrpc.h
+++ b/include/modules/xmlrpc.h
@@ -34,7 +34,8 @@ public:
virtual bool Run(XMLRPCServiceInterface *iface, HTTPClient *client, XMLRPCRequest &request) = 0;
};
-class XMLRPCServiceInterface : public Service
+class XMLRPCServiceInterface
+ : public Service
{
public:
XMLRPCServiceInterface(Module *creator, const Anope::string &sname) : Service(creator, "XMLRPCServiceInterface", sname) { }
diff --git a/include/protocol.h b/include/protocol.h
index 86c1528b4..e2bee5317 100644
--- a/include/protocol.h
+++ b/include/protocol.h
@@ -17,7 +17,8 @@
#include "modes.h"
/* Encapsulates the IRCd protocol we are speaking. */
-class CoreExport IRCDProto : public Service
+class CoreExport IRCDProto
+ : public Service
{
Anope::string proto_name;
@@ -268,7 +269,8 @@ enum IRCDMessageFlag
IRCDMESSAGE_REQUIRE_USER
};
-class CoreExport IRCDMessage : public Service
+class CoreExport IRCDMessage
+ : public Service
{
Anope::string name;
unsigned param_count;
diff --git a/include/regchannel.h b/include/regchannel.h
index a3315a5e1..29c203cf3 100644
--- a/include/regchannel.h
+++ b/include/regchannel.h
@@ -21,7 +21,8 @@ typedef Anope::hash_map<ChannelInfo *> registered_channel_map;
extern CoreExport Serialize::Checker<registered_channel_map> RegisteredChannelList;
/* AutoKick data. */
-class CoreExport AutoKick : public Serializable
+class CoreExport AutoKick
+ : public Serializable
{
public:
/* Channel this autokick is on */
@@ -43,7 +44,9 @@ public:
/* It matters that Base is here before Extensible (it is inherited by Serializable)
*/
-class CoreExport ChannelInfo : public Serializable, public Extensible
+class CoreExport ChannelInfo
+ : public Serializable
+ , public Extensible
{
/* channels who reference this one */
Anope::map<int> references;
diff --git a/include/regexpr.h b/include/regexpr.h
index fdb0cce50..536c891c1 100644
--- a/include/regexpr.h
+++ b/include/regexpr.h
@@ -15,7 +15,8 @@
#include "anope.h"
#include "service.h"
-class CoreExport RegexException : public CoreException
+class CoreExport RegexException
+ : public CoreException
{
public:
RegexException(const Anope::string &reason = "") : CoreException(reason) { }
@@ -34,7 +35,8 @@ public:
virtual bool Matches(const Anope::string &str) = 0;
};
-class CoreExport RegexProvider : public Service
+class CoreExport RegexProvider
+ : public Service
{
public:
RegexProvider(Module *o, const Anope::string &n) : Service(o, "Regex", n) { }
diff --git a/include/serialize.h b/include/serialize.h
index bd6a311a0..b0739e683 100644
--- a/include/serialize.h
+++ b/include/serialize.h
@@ -49,7 +49,8 @@ namespace Serialize
* abstract data types (Serialize::Data), and then reconstructed or
* updated later at any time.
*/
-class CoreExport Serializable : public virtual Base
+class CoreExport Serializable
+ : public virtual Base
{
private:
/* A list of every serializable item in Anope.
@@ -107,7 +108,8 @@ public:
* of class that inherits from Serializable. Used for unserializing objects
* of this type, as it requires a function pointer to a static member function.
*/
-class CoreExport Serialize::Type : public Base
+class CoreExport Serialize::Type
+ : public Base
{
typedef Serializable* (*unserialize_func)(Serializable *obj, Serialize::Data &);
@@ -240,7 +242,8 @@ public:
* destructed.
*/
template<typename T>
-class Serialize::Reference : public ReferenceBase
+class Serialize::Reference
+ : public ReferenceBase
{
protected:
T *ref = nullptr;
diff --git a/include/servers.h b/include/servers.h
index e83a5ac55..a2a0bfdfb 100644
--- a/include/servers.h
+++ b/include/servers.h
@@ -37,7 +37,8 @@ namespace Servers
/** Class representing a server
*/
-class CoreExport Server : public Extensible
+class CoreExport Server
+ : public Extensible
{
private:
/* Server name */
diff --git a/include/service.h b/include/service.h
index c84cb7bb9..5a59fa303 100644
--- a/include/service.h
+++ b/include/service.h
@@ -20,7 +20,8 @@
* such as commands, use this. This is also used for modules
* that publish a service (m_ssl_openssl, etc).
*/
-class CoreExport Service : public virtual Base
+class CoreExport Service
+ : public virtual Base
{
static std::map<Anope::string, std::map<Anope::string, Service *> > Services;
static std::map<Anope::string, std::map<Anope::string, Anope::string> > Aliases;
@@ -115,7 +116,8 @@ public:
/** Like Reference, but used to refer to a Service.
*/
template<typename T>
-class ServiceReference : public Reference<T>
+class ServiceReference
+ : public Reference<T>
{
Anope::string type;
Anope::string name;
diff --git a/include/sockets.h b/include/sockets.h
index fc10fec4e..e7311e727 100644
--- a/include/sockets.h
+++ b/include/sockets.h
@@ -126,7 +126,8 @@ public:
};
};
-class CoreExport SocketException : public CoreException
+class CoreExport SocketException
+ : public CoreException
{
public:
/** Constructor for socket exceptions
@@ -286,7 +287,8 @@ public:
virtual void ProcessError();
};
-class CoreExport BufferedSocket : public virtual Socket
+class CoreExport BufferedSocket
+ : public virtual Socket
{
protected:
/* Things read from the socket */
@@ -333,7 +335,8 @@ public:
int WriteBufferLen() const;
};
-class CoreExport BinarySocket : public virtual Socket
+class CoreExport BinarySocket
+ : public virtual Socket
{
protected:
struct DataBlock
@@ -378,7 +381,8 @@ public:
virtual bool Read(const char *buffer, size_t l);
};
-class CoreExport ListenSocket : public virtual Socket
+class CoreExport ListenSocket
+ : public virtual Socket
{
public:
/** Constructor
@@ -402,7 +406,8 @@ public:
virtual ClientSocket *OnAccept(int fd, const sockaddrs &addr) = 0;
};
-class CoreExport ConnectionSocket : public virtual Socket
+class CoreExport ConnectionSocket
+ : public virtual Socket
{
public:
/* Sockaddrs for connection ip/port */
@@ -435,7 +440,8 @@ public:
virtual void OnError(const Anope::string &error);
};
-class CoreExport ClientSocket : public virtual Socket
+class CoreExport ClientSocket
+ : public virtual Socket
{
public:
/* Listen socket this connection came from */
@@ -469,7 +475,8 @@ public:
virtual void OnError(const Anope::string &error);
};
-class CoreExport Pipe : public Socket
+class CoreExport Pipe
+ : public Socket
{
public:
/** The FD of the write pipe
diff --git a/include/threadengine.h b/include/threadengine.h
index 7b7b88c9f..79e545166 100644
--- a/include/threadengine.h
+++ b/include/threadengine.h
@@ -14,7 +14,9 @@
#include "sockets.h"
#include "extensible.h"
-class CoreExport Thread : public Pipe, public Extensible
+class CoreExport Thread
+ : public Pipe
+ , public Extensible
{
private:
/* Set to true to tell the thread to finish and we are waiting for it */
@@ -88,7 +90,8 @@ public:
bool TryLock();
};
-class CoreExport Condition : public Mutex
+class CoreExport Condition
+ : public Mutex
{
private:
/* A condition */
diff --git a/include/uplink.h b/include/uplink.h
index a6982b41b..6646f58cb 100644
--- a/include/uplink.h
+++ b/include/uplink.h
@@ -20,7 +20,9 @@ namespace Uplink
}
/* This is the socket to our uplink */
-class UplinkSocket : public ConnectionSocket, public BufferedSocket
+class UplinkSocket
+ : public ConnectionSocket
+ , public BufferedSocket
{
public:
bool error;
diff --git a/include/users.h b/include/users.h
index 02fb48b60..2c9779ea3 100644
--- a/include/users.h
+++ b/include/users.h
@@ -28,7 +28,10 @@ extern CoreExport unsigned MaxUserCount;
extern CoreExport time_t MaxUserTime;
/* Online user and channel data. */
-class CoreExport User : public virtual Base, public Extensible, public CommandReply
+class CoreExport User
+ : public virtual Base
+ , public Extensible
+ , public CommandReply
{
/* true if the user was quit or killed */
bool quit;
diff --git a/include/xline.h b/include/xline.h
index 526831d06..19dd0a5c0 100644
--- a/include/xline.h
+++ b/include/xline.h
@@ -13,7 +13,8 @@
#include "sockets.h"
/* An Xline, eg, anything added with operserv/akill, or any of the operserv/sxline commands */
-class CoreExport XLine : public Serializable
+class CoreExport XLine
+ : public Serializable
{
void Init();
Anope::string nick, user, host, real;
@@ -48,7 +49,8 @@ public:
};
/* Managers XLines. There is one XLineManager per type of XLine. */
-class CoreExport XLineManager : public Service
+class CoreExport XLineManager
+ : public Service
{
char type;
/* List of XLines in this XLineManager */