From 72acef4e159df5dcdb93b3c13b2f9d2e5e4c21a9 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 23 Jan 2024 13:54:16 +0000 Subject: Mark types that have no inheritors as final. --- include/access.h | 6 +-- include/account.h | 4 +- include/anope.h | 14 +++--- include/bots.h | 2 +- include/channels.h | 4 +- include/commands.h | 6 +-- include/config.h | 8 +-- include/extensible.h | 2 +- include/hashcomp.h | 6 +-- include/lists.h | 4 +- include/logger.h | 6 +-- include/mail.h | 2 +- include/memo.h | 4 +- include/modes.h | 6 +-- include/modules.h | 8 +-- include/modules/dns.h | 4 +- include/modules/httpd.h | 6 +-- include/modules/ldap.h | 6 +-- include/modules/os_news.h | 2 +- include/modules/os_session.h | 4 +- include/modules/redis.h | 2 +- include/modules/sasl.h | 2 +- include/modules/sql.h | 6 +-- include/modules/xmlrpc.h | 2 +- include/opertype.h | 2 +- include/protocol.h | 4 +- include/regchannel.h | 4 +- include/regexpr.h | 2 +- include/serialize.h | 4 +- include/servers.h | 2 +- include/service.h | 2 +- include/socketengine.h | 2 +- include/sockets.h | 8 +-- include/timers.h | 2 +- include/uplink.h | 4 +- include/xline.h | 2 +- modules/bs_autoassign.cpp | 2 +- modules/commands/bs_assign.cpp | 8 +-- modules/commands/bs_badwords.cpp | 12 ++--- modules/commands/bs_bot.cpp | 4 +- modules/commands/bs_botlist.cpp | 4 +- modules/commands/bs_control.cpp | 6 +-- modules/commands/bs_info.cpp | 4 +- modules/commands/bs_kick.cpp | 40 +++++++-------- modules/commands/bs_set.cpp | 10 ++-- modules/commands/cs_access.cpp | 14 +++--- modules/commands/cs_akick.cpp | 8 +-- modules/commands/cs_ban.cpp | 6 +-- modules/commands/cs_clone.cpp | 4 +- modules/commands/cs_drop.cpp | 4 +- modules/commands/cs_enforce.cpp | 4 +- modules/commands/cs_entrymsg.cpp | 8 +-- modules/commands/cs_flags.cpp | 8 +-- modules/commands/cs_getkey.cpp | 4 +- modules/commands/cs_info.cpp | 4 +- modules/commands/cs_invite.cpp | 4 +- modules/commands/cs_kick.cpp | 4 +- modules/commands/cs_list.cpp | 6 +-- modules/commands/cs_log.cpp | 10 ++-- modules/commands/cs_mode.cpp | 10 ++-- modules/commands/cs_register.cpp | 4 +- modules/commands/cs_seen.cpp | 8 +-- modules/commands/cs_set.cpp | 34 ++++++------- modules/commands/cs_set_misc.cpp | 6 +-- modules/commands/cs_status.cpp | 4 +- modules/commands/cs_suspend.cpp | 10 ++-- modules/commands/cs_sync.cpp | 4 +- modules/commands/cs_topic.cpp | 6 +-- modules/commands/cs_unban.cpp | 4 +- modules/commands/cs_updown.cpp | 6 +-- modules/commands/cs_xop.cpp | 12 ++--- modules/commands/gl_global.cpp | 4 +- modules/commands/greet.cpp | 6 +-- modules/commands/help.cpp | 4 +- modules/commands/hs_del.cpp | 6 +-- modules/commands/hs_group.cpp | 4 +- modules/commands/hs_list.cpp | 4 +- modules/commands/hs_off.cpp | 4 +- modules/commands/hs_on.cpp | 4 +- modules/commands/hs_request.cpp | 12 ++--- modules/commands/hs_set.cpp | 6 +-- modules/commands/ms_cancel.cpp | 4 +- modules/commands/ms_check.cpp | 4 +- modules/commands/ms_del.cpp | 6 +-- modules/commands/ms_ignore.cpp | 4 +- modules/commands/ms_info.cpp | 4 +- modules/commands/ms_list.cpp | 6 +-- modules/commands/ms_read.cpp | 6 +-- modules/commands/ms_rsend.cpp | 4 +- modules/commands/ms_send.cpp | 4 +- modules/commands/ms_sendall.cpp | 4 +- modules/commands/ms_set.cpp | 4 +- modules/commands/ms_staff.cpp | 4 +- modules/commands/ns_access.cpp | 4 +- modules/commands/ns_ajoin.cpp | 8 +-- modules/commands/ns_alist.cpp | 4 +- modules/commands/ns_cert.cpp | 10 ++-- modules/commands/ns_drop.cpp | 4 +- modules/commands/ns_getemail.cpp | 4 +- modules/commands/ns_group.cpp | 10 ++-- modules/commands/ns_identify.cpp | 6 +-- modules/commands/ns_info.cpp | 6 +-- modules/commands/ns_list.cpp | 6 +-- modules/commands/ns_logout.cpp | 4 +- modules/commands/ns_recover.cpp | 8 +-- modules/commands/ns_register.cpp | 8 +-- modules/commands/ns_resetpass.cpp | 6 +-- modules/commands/ns_set.cpp | 32 ++++++------ modules/commands/ns_set_misc.cpp | 6 +-- modules/commands/ns_status.cpp | 4 +- modules/commands/ns_suspend.cpp | 10 ++-- modules/commands/ns_update.cpp | 4 +- modules/commands/os_akill.cpp | 8 +-- modules/commands/os_chankill.cpp | 4 +- modules/commands/os_config.cpp | 4 +- modules/commands/os_defcon.cpp | 8 +-- modules/commands/os_dns.cpp | 8 +-- modules/commands/os_forbid.cpp | 8 +-- modules/commands/os_ignore.cpp | 8 +-- modules/commands/os_info.cpp | 8 +-- modules/commands/os_jupe.cpp | 4 +- modules/commands/os_kick.cpp | 4 +- modules/commands/os_kill.cpp | 4 +- modules/commands/os_list.cpp | 6 +-- modules/commands/os_login.cpp | 6 +-- modules/commands/os_logsearch.cpp | 4 +- modules/commands/os_mode.cpp | 6 +-- modules/commands/os_modinfo.cpp | 6 +-- modules/commands/os_module.cpp | 8 +-- modules/commands/os_news.cpp | 12 ++--- modules/commands/os_noop.cpp | 4 +- modules/commands/os_oper.cpp | 6 +-- modules/commands/os_reload.cpp | 4 +- modules/commands/os_session.cpp | 12 ++--- modules/commands/os_set.cpp | 4 +- modules/commands/os_shutdown.cpp | 8 +-- modules/commands/os_stats.cpp | 6 +-- modules/commands/os_svs.cpp | 8 +-- modules/commands/os_sxline.cpp | 10 ++-- modules/commands/os_update.cpp | 4 +- modules/cs_statusupdate.cpp | 2 +- modules/database/db_flatfile.cpp | 6 +-- modules/database/db_old.cpp | 6 +-- modules/database/db_redis.cpp | 18 +++---- modules/database/db_sql.cpp | 4 +- modules/database/db_sql_live.cpp | 2 +- modules/encryption/enc_bcrypt.cpp | 2 +- modules/encryption/enc_md5.cpp | 6 +-- modules/encryption/enc_none.cpp | 2 +- modules/encryption/enc_old.cpp | 4 +- modules/encryption/enc_sha1.cpp | 6 +-- modules/encryption/enc_sha256.cpp | 6 +-- modules/extra/m_ldap.cpp | 14 +++--- modules/extra/m_ldap_authentication.cpp | 10 ++-- modules/extra/m_ldap_oper.cpp | 4 +- modules/extra/m_mysql.cpp | 12 ++--- modules/extra/m_regex_pcre2.cpp | 6 +-- modules/extra/m_regex_posix.cpp | 6 +-- modules/extra/m_regex_tre.cpp | 6 +-- modules/extra/m_sql_authentication.cpp | 4 +- modules/extra/m_sql_log.cpp | 2 +- modules/extra/m_sql_oper.cpp | 8 +-- modules/extra/m_sqlite.cpp | 6 +-- modules/extra/m_ssl_gnutls.cpp | 20 ++++---- modules/extra/m_ssl_openssl.cpp | 6 +-- modules/fantasy.cpp | 4 +- modules/m_dns.cpp | 14 +++--- modules/m_dnsbl.cpp | 8 +-- modules/m_helpchan.cpp | 2 +- modules/m_httpd.cpp | 6 +-- modules/m_proxyscan.cpp | 14 +++--- modules/m_redis.cpp | 8 +-- modules/m_rewrite.cpp | 6 +-- modules/m_sasl.cpp | 12 ++--- modules/m_xmlrpc.cpp | 6 +-- modules/m_xmlrpc_main.cpp | 8 +-- modules/ns_maxemail.cpp | 2 +- modules/protocol/bahamut.cpp | 18 +++---- modules/protocol/hybrid.cpp | 36 +++++++------- modules/protocol/inspircd.cpp | 78 +++++++++++++++--------------- modules/protocol/ngircd.cpp | 26 +++++----- modules/protocol/plexus.cpp | 12 ++--- modules/protocol/ratbox.cpp | 16 +++--- modules/protocol/solanum.cpp | 18 +++---- modules/protocol/unrealircd.cpp | 70 +++++++++++++-------------- modules/pseudoclients/botserv.cpp | 2 +- modules/pseudoclients/chanserv.cpp | 4 +- modules/pseudoclients/global.cpp | 2 +- modules/pseudoclients/hostserv.cpp | 2 +- modules/pseudoclients/memoserv.cpp | 2 +- modules/pseudoclients/nickserv.cpp | 8 +-- modules/pseudoclients/operserv.cpp | 8 +-- modules/stats/cs_fantasy_stats.cpp | 8 +-- modules/stats/cs_fantasy_top.cpp | 12 ++--- modules/stats/irc2sql/irc2sql.h | 4 +- modules/stats/m_chanstats.cpp | 8 +-- modules/webcpanel/pages/chanserv/access.h | 2 +- modules/webcpanel/pages/chanserv/akick.h | 2 +- modules/webcpanel/pages/chanserv/drop.h | 2 +- modules/webcpanel/pages/chanserv/info.h | 2 +- modules/webcpanel/pages/chanserv/modes.h | 2 +- modules/webcpanel/pages/chanserv/set.h | 2 +- modules/webcpanel/pages/confirm.h | 2 +- modules/webcpanel/pages/hostserv/request.h | 2 +- modules/webcpanel/pages/index.cpp | 2 +- modules/webcpanel/pages/index.h | 2 +- modules/webcpanel/pages/logout.h | 2 +- modules/webcpanel/pages/memoserv/memos.h | 2 +- modules/webcpanel/pages/nickserv/access.h | 2 +- modules/webcpanel/pages/nickserv/alist.h | 2 +- modules/webcpanel/pages/nickserv/cert.h | 2 +- modules/webcpanel/pages/nickserv/confirm.h | 2 +- modules/webcpanel/pages/nickserv/info.h | 2 +- modules/webcpanel/pages/operserv/akill.h | 2 +- modules/webcpanel/pages/register.h | 2 +- modules/webcpanel/static_fileserver.h | 2 +- modules/webcpanel/template_fileserver.cpp | 2 +- modules/webcpanel/template_fileserver.h | 4 +- modules/webcpanel/webcpanel.cpp | 6 +-- modules/webcpanel/webcpanel.h | 4 +- src/channels.cpp | 2 +- src/main.cpp | 4 +- src/modes.cpp | 6 +-- src/uplink.cpp | 2 +- src/win32/pthread/pthread.cpp | 2 +- src/win32/sigaction/sigaction.h | 2 +- src/win32/windows.cpp | 2 +- 227 files changed, 771 insertions(+), 771 deletions(-) diff --git a/include/access.h b/include/access.h index 4242509aa..b1587f0c7 100644 --- a/include/access.h +++ b/include/access.h @@ -27,7 +27,7 @@ enum * backing each ChanAccess determines whether that ChanAccess has a given * privilege. */ -struct CoreExport Privilege +struct CoreExport Privilege final { Anope::string name; Anope::string desc; @@ -38,7 +38,7 @@ struct CoreExport Privilege bool operator==(const Privilege &other) const; }; -class CoreExport PrivilegeManager +class CoreExport PrivilegeManager final { static std::vector Privileges; public: @@ -135,7 +135,7 @@ public: /* A group of access entries. This is used commonly, for example with ChannelInfo::AccessFor, * to show what access a user has on a channel because users can match multiple access entries. */ -class CoreExport AccessGroup +class CoreExport AccessGroup final { public: /* access entries + paths */ diff --git a/include/account.h b/include/account.h index 1062b67bf..3d6e0e846 100644 --- a/include/account.h +++ b/include/account.h @@ -28,7 +28,7 @@ extern CoreExport nickcoreid_map NickCoreIdList; /* A registered nickname. * It matters that Base is here before Extensible (it is inherited by Serializable) */ -class CoreExport NickAlias +class CoreExport NickAlias final : public Serializable , public Extensible { @@ -106,7 +106,7 @@ public: * account's display. * It matters that Base is here before Extensible (it is inherited by Serializable) */ -class CoreExport NickCore +class CoreExport NickCore final : public Serializable , public Extensible { diff --git a/include/anope.h b/include/anope.h index 976c69702..ee9797627 100644 --- a/include/anope.h +++ b/include/anope.h @@ -22,7 +22,7 @@ namespace Anope * allow us to only require one type of string everywhere that can be converted * at any time to a specific type of string. */ - class CoreExport string + class CoreExport string final { private: /** @@ -312,7 +312,7 @@ namespace Anope inline const string operator+(const char *_str, const string &str) { string tmp(_str); tmp += str; return tmp; } inline const string operator+(const std::string &_str, const string &str) { string tmp(_str); tmp += str; return tmp; } - struct hash_ci + struct hash_ci final { inline size_t operator()(const string &s) const { @@ -320,7 +320,7 @@ namespace Anope } }; - struct hash_cs + struct hash_cs final { inline size_t operator()(const string &s) const { @@ -328,7 +328,7 @@ namespace Anope } }; - struct compare + struct compare final { inline bool operator()(const string &s1, const string &s2) const { @@ -628,7 +628,7 @@ public: /** A derived form of sepstream, which separates on commas */ -class commasepstream +class commasepstream final : public sepstream { public: @@ -639,7 +639,7 @@ public: /** A derived form of sepstream, which separates on spaces */ -class spacesepstream +class spacesepstream final : public sepstream { public: @@ -712,7 +712,7 @@ public: virtual ~ModuleException() noexcept = default; }; -class CoreExport ConvertException +class CoreExport ConvertException final : public CoreException { public: diff --git a/include/bots.h b/include/bots.h index 35ec7cd50..87a074058 100644 --- a/include/bots.h +++ b/include/bots.h @@ -19,7 +19,7 @@ typedef Anope::map botinfo_map; extern CoreExport Serialize::Checker BotListByNick, BotListByUID; /* A service bot (NickServ, ChanServ, a BotServ bot, etc). */ -class CoreExport BotInfo +class CoreExport BotInfo final : public User , public Serializable { diff --git a/include/channels.h b/include/channels.h index 0230cc566..d918f4a52 100644 --- a/include/channels.h +++ b/include/channels.h @@ -18,7 +18,7 @@ typedef Anope::hash_map channel_map; extern CoreExport channel_map ChannelList; /* A user container, there is one of these per user per channel. */ -struct ChanUserContainer +struct ChanUserContainer final : public Extensible { User *user; @@ -29,7 +29,7 @@ struct ChanUserContainer ChanUserContainer(User *u, Channel *c) : user(u), chan(c) { } }; -class CoreExport Channel +class CoreExport Channel final : public Base , public Extensible { diff --git a/include/commands.h b/include/commands.h index 5f15da345..7c1e62686 100644 --- a/include/commands.h +++ b/include/commands.h @@ -15,13 +15,13 @@ #include "anope.h" #include "channels.h" -struct CommandGroup +struct CommandGroup final { Anope::string name, description; }; /* Used in BotInfo::commands */ -struct CommandInfo +struct CommandInfo final { typedef Anope::map map; @@ -47,7 +47,7 @@ struct CoreExport CommandReply }; /* The source for a command */ -class CoreExport CommandSource +class CoreExport CommandSource final { /* The nick executing the command */ Anope::string nick; diff --git a/include/config.h b/include/config.h index cb8de7c55..d172da457 100644 --- a/include/config.h +++ b/include/config.h @@ -78,7 +78,7 @@ namespace Configuration /** Represents a configuration file */ - class File + class File final { Anope::string name; bool executable; @@ -98,7 +98,7 @@ namespace Configuration struct Uplink; - struct CoreExport Conf + struct CoreExport Conf final : Block { /* options:readtimeout */ @@ -153,7 +153,7 @@ namespace Configuration const Block *GetCommand(CommandSource &); }; - struct Uplink + struct Uplink final { Anope::string host; unsigned port; @@ -172,7 +172,7 @@ 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 +class CoreExport ConfigException final : public CoreException { public: diff --git a/include/extensible.h b/include/extensible.h index a83d9e81f..df76be036 100644 --- a/include/extensible.h +++ b/include/extensible.h @@ -209,7 +209,7 @@ public: }; template -struct ExtensibleRef +struct ExtensibleRef final : ServiceReference > { ExtensibleRef(const Anope::string &n) : ServiceReference >("Extensible", n) { } diff --git a/include/hashcomp.h b/include/hashcomp.h index 91ccc3391..3b9b7d833 100644 --- a/include/hashcomp.h +++ b/include/hashcomp.h @@ -50,7 +50,7 @@ namespace Anope /* rfc1459 case insensitive ctype, { = [, } = ], and | = \ */ template - class rfc1459_ctype + class rfc1459_ctype final : public ascii_ctype { public: @@ -80,7 +80,7 @@ namespace ci * This class is used to implement ci::string, a case-insensitive, ASCII- * comparing string class. */ - struct CoreExport ci_char_traits + struct CoreExport ci_char_traits final : std::char_traits { /** Check if two chars match. @@ -126,7 +126,7 @@ namespace ci */ typedef std::basic_string > string; - struct CoreExport less + struct CoreExport less final { /** Compare two Anope::strings as ci::strings and find which one is less * @param s1 The first string diff --git a/include/lists.h b/include/lists.h index 62578259b..4c4fd8578 100644 --- a/include/lists.h +++ b/include/lists.h @@ -60,7 +60,7 @@ public: /** This class handles formatting LIST/VIEW replies. */ -class CoreExport ListFormatter +class CoreExport ListFormatter final { public: typedef std::map ListEntry; @@ -78,7 +78,7 @@ public: /** This class handles formatting INFO replies */ -class CoreExport InfoFormatter +class CoreExport InfoFormatter final { NickCore *nc; std::vector > replies; diff --git a/include/logger.h b/include/logger.h index aba306134..89f251a9a 100644 --- a/include/logger.h +++ b/include/logger.h @@ -37,7 +37,7 @@ enum LogType LOG_DEBUG_4 }; -struct LogFile +struct LogFile final { Anope::string filename; std::ofstream stream; @@ -48,7 +48,7 @@ struct LogFile }; /* Represents a single log message */ -class CoreExport Log +class CoreExport Log final { public: /* Bot that should log this message */ @@ -109,7 +109,7 @@ public: }; /* Configured in the configuration file, actually does the message logging */ -class CoreExport LogInfo +class CoreExport LogInfo final { public: BotInfo *bot = nullptr; diff --git a/include/mail.h b/include/mail.h index 1a0ce88cc..eeacd3842 100644 --- a/include/mail.h +++ b/include/mail.h @@ -22,7 +22,7 @@ namespace Mail extern CoreExport bool Validate(const Anope::string &email); /* A email message being sent */ - class Message + class Message final : public Thread { private: diff --git a/include/memo.h b/include/memo.h index 5e7c1a5c9..70d8d63b7 100644 --- a/include/memo.h +++ b/include/memo.h @@ -14,7 +14,7 @@ #include "anope.h" #include "serialize.h" -class CoreExport Memo +class CoreExport Memo final : public Serializable { public: @@ -37,7 +37,7 @@ public: /* Memo info structures. Since both nicknames and channels can have memos, * we encapsulate memo data in a MemoInfo to make it easier to handle. */ -struct CoreExport MemoInfo +struct CoreExport MemoInfo final { int16_t memomax = 0; Serialize::Checker > memos; diff --git a/include/modes.h b/include/modes.h index b87d1e5b5..f1c116f1c 100644 --- a/include/modes.h +++ b/include/modes.h @@ -232,7 +232,7 @@ public: }; /* The status a user has on a channel (+v, +h, +o) etc */ -class CoreExport ChannelStatus +class CoreExport ChannelStatus final { Anope::string modes; public: @@ -305,7 +305,7 @@ public: * This also contains a mode stacker that will combine multiple modes and set * them on a channel or user at once */ -class CoreExport ModeManager +class CoreExport ModeManager final { public: @@ -401,7 +401,7 @@ public: /** Represents a mask set on a channel (b/e/I) */ -class CoreExport Entry +class CoreExport Entry final { Anope::string name; Anope::string mask; diff --git a/include/modules.h b/include/modules.h index de8d560fe..3fdcef674 100644 --- a/include/modules.h +++ b/include/modules.h @@ -162,7 +162,7 @@ enum }; typedef unsigned short ModType; -struct ModuleVersionC +struct ModuleVersionC final { int version_major, version_minor, version_patch; }; @@ -170,7 +170,7 @@ struct ModuleVersionC /** Returned by Module::GetVersion, used to see what version of Anope * a module is compiled against. */ -class ModuleVersion +class ModuleVersion final { private: int version_major; @@ -196,7 +196,7 @@ public: int GetPatch() const; }; -class CoreExport NotImplementedException +class CoreExport NotImplementedException final : public CoreException { }; @@ -1113,7 +1113,7 @@ enum Implementation /** Used to manage modules. */ -class CoreExport ModuleManager +class CoreExport ModuleManager final { public: /** Event handler hooks. diff --git a/include/modules/dns.h b/include/modules/dns.h index 25123a504..801b5b2f0 100644 --- a/include/modules/dns.h +++ b/include/modules/dns.h @@ -79,7 +79,7 @@ namespace DNS Question(const Anope::string &n, QueryType t, unsigned short c = 1) : name(n), type(t), qclass(c) { } inline bool operator==(const Question & other) const { return name == other.name && type == other.type && qclass == other.qclass; } - struct hash + struct hash final { size_t operator()(const Question &q) const { @@ -88,7 +88,7 @@ namespace DNS }; }; - struct ResourceRecord + struct ResourceRecord final : Question { unsigned int ttl = 0; diff --git a/include/modules/httpd.h b/include/modules/httpd.h index c755e9dd2..b08ca8bf4 100644 --- a/include/modules/httpd.h +++ b/include/modules/httpd.h @@ -18,7 +18,7 @@ enum HTTPError }; /* A message to someone */ -struct HTTPReply +struct HTTPReply final { HTTPError error = HTTP_ERROR_OK; Anope::string content_type; @@ -46,7 +46,7 @@ struct HTTPReply out.clear(); } - struct Data + struct Data final { char *buf; size_t len; @@ -81,7 +81,7 @@ struct HTTPReply }; /* A message from someone */ -struct HTTPMessage +struct HTTPMessage final { std::map headers; std::map cookies; diff --git a/include/modules/ldap.h b/include/modules/ldap.h index 37087198d..2342bd1ba 100644 --- a/include/modules/ldap.h +++ b/include/modules/ldap.h @@ -16,7 +16,7 @@ public: virtual ~LDAPException() noexcept = default; }; -struct LDAPModification +struct LDAPModification final { enum LDAPOperation { @@ -31,7 +31,7 @@ struct LDAPModification }; typedef std::vector LDAPMods; -struct LDAPAttributes +struct LDAPAttributes final : public std::map> { size_t size(const Anope::string &attr) const @@ -75,7 +75,7 @@ enum QueryType QUERY_MODIFY }; -struct LDAPResult +struct LDAPResult final { std::vector messages; Anope::string error; diff --git a/include/modules/os_news.h b/include/modules/os_news.h index af7619e56..03842946c 100644 --- a/include/modules/os_news.h +++ b/include/modules/os_news.h @@ -15,7 +15,7 @@ enum NewsType NEWS_OPER }; -struct NewsMessages +struct NewsMessages final { NewsType type; Anope::string name; diff --git a/include/modules/os_session.h b/include/modules/os_session.h index 5341b4fe0..7077b0985 100644 --- a/include/modules/os_session.h +++ b/include/modules/os_session.h @@ -8,7 +8,7 @@ #pragma once -struct Session +struct Session final { cidr addr; /* A cidr (sockaddrs + len) representing this session */ unsigned count = 1; /* Number of clients with this host */ @@ -17,7 +17,7 @@ struct Session Session(const sockaddrs &ip, int len) : addr(ip, len) { } }; -struct Exception +struct Exception final : Serializable { Anope::string mask; /* Hosts to which this exception applies */ diff --git a/include/modules/redis.h b/include/modules/redis.h index ec990823e..71ccf6ef7 100644 --- a/include/modules/redis.h +++ b/include/modules/redis.h @@ -10,7 +10,7 @@ namespace Redis { - struct Reply + struct Reply final { enum Type { diff --git a/include/modules/sasl.h b/include/modules/sasl.h index 2b1c6a30d..2e4d990c5 100644 --- a/include/modules/sasl.h +++ b/include/modules/sasl.h @@ -10,7 +10,7 @@ namespace SASL { - struct Message + struct Message final { Anope::string source; Anope::string target; diff --git a/include/modules/sql.h b/include/modules/sql.h index 59cc7a24b..8355fe009 100644 --- a/include/modules/sql.h +++ b/include/modules/sql.h @@ -11,7 +11,7 @@ namespace SQL { - class Data + class Data final : public Serialize::Data { public: @@ -93,13 +93,13 @@ namespace SQL /** A SQL query */ - struct QueryData + struct QueryData final { Anope::string data; bool escape; }; - struct Query + struct Query final { Anope::string query; std::map parameters; diff --git a/include/modules/xmlrpc.h b/include/modules/xmlrpc.h index a12a23c9e..698a8e6ce 100644 --- a/include/modules/xmlrpc.h +++ b/include/modules/xmlrpc.h @@ -10,7 +10,7 @@ #include "httpd.h" -class XMLRPCRequest +class XMLRPCRequest final { std::map replies; diff --git a/include/opertype.h b/include/opertype.h index d1858f270..855dc8afb 100644 --- a/include/opertype.h +++ b/include/opertype.h @@ -40,7 +40,7 @@ struct CoreExport Oper static Oper *Find(const Anope::string &name); }; -class CoreExport OperType +class CoreExport OperType final { private: /** The name of this opertype, e.g. "sra". diff --git a/include/protocol.h b/include/protocol.h index e2bee5317..c21e4ae84 100644 --- a/include/protocol.h +++ b/include/protocol.h @@ -245,7 +245,7 @@ public: virtual Anope::string NormalizeMask(const Anope::string &mask); }; -class CoreExport MessageSource +class CoreExport MessageSource final { Anope::string source; User *u = nullptr; @@ -285,7 +285,7 @@ public: }; /** MessageTokenizer allows tokens in the IRC wire format to be read from a string */ -class CoreExport MessageTokenizer +class CoreExport MessageTokenizer final { private: /** The message we are parsing tokens from. */ diff --git a/include/regchannel.h b/include/regchannel.h index 29c203cf3..9b6a64971 100644 --- a/include/regchannel.h +++ b/include/regchannel.h @@ -21,7 +21,7 @@ typedef Anope::hash_map registered_channel_map; extern CoreExport Serialize::Checker RegisteredChannelList; /* AutoKick data. */ -class CoreExport AutoKick +class CoreExport AutoKick final : public Serializable { public: @@ -44,7 +44,7 @@ public: /* It matters that Base is here before Extensible (it is inherited by Serializable) */ -class CoreExport ChannelInfo +class CoreExport ChannelInfo final : public Serializable , public Extensible { diff --git a/include/regexpr.h b/include/regexpr.h index 536c891c1..e48d2582b 100644 --- a/include/regexpr.h +++ b/include/regexpr.h @@ -15,7 +15,7 @@ #include "anope.h" #include "service.h" -class CoreExport RegexException +class CoreExport RegexException final : public CoreException { public: diff --git a/include/serialize.h b/include/serialize.h index b0739e683..91ced7370 100644 --- a/include/serialize.h +++ b/include/serialize.h @@ -108,7 +108,7 @@ 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 +class CoreExport Serialize::Type final : public Base { typedef Serializable* (*unserialize_func)(Serializable *obj, Serialize::Data &); @@ -242,7 +242,7 @@ public: * destructed. */ template -class Serialize::Reference +class Serialize::Reference final : public ReferenceBase { protected: diff --git a/include/servers.h b/include/servers.h index a2a0bfdfb..8f491fe01 100644 --- a/include/servers.h +++ b/include/servers.h @@ -37,7 +37,7 @@ namespace Servers /** Class representing a server */ -class CoreExport Server +class CoreExport Server final : public Extensible { private: diff --git a/include/service.h b/include/service.h index 5a59fa303..87a04ece1 100644 --- a/include/service.h +++ b/include/service.h @@ -160,7 +160,7 @@ public: } }; -class ServiceAlias +class ServiceAlias final { Anope::string t, f; public: diff --git a/include/socketengine.h b/include/socketengine.h index 88fa329f2..e9d35cd2e 100644 --- a/include/socketengine.h +++ b/include/socketengine.h @@ -14,7 +14,7 @@ #include "services.h" #include "sockets.h" -class CoreExport SocketEngine +class CoreExport SocketEngine final { static const int DefaultSize = 2; // Uplink, mode stacker public: diff --git a/include/sockets.h b/include/sockets.h index e7311e727..b8aacc7e7 100644 --- a/include/sockets.h +++ b/include/sockets.h @@ -103,7 +103,7 @@ union CoreExport sockaddrs void ntop(int type, const void *src); }; -class CoreExport cidr +class CoreExport cidr final { sockaddrs addr; Anope::string cidr_ip; @@ -120,13 +120,13 @@ public: bool operator==(const cidr &other) const; bool operator!=(const cidr &other) const; - struct CoreExport hash + struct CoreExport hash final { size_t operator()(const cidr &s) const; }; }; -class CoreExport SocketException +class CoreExport SocketException final : public CoreException { public: @@ -339,7 +339,7 @@ class CoreExport BinarySocket : public virtual Socket { protected: - struct DataBlock + struct DataBlock final { char *orig; char *buf; diff --git a/include/timers.h b/include/timers.h index 1e94519b4..456666535 100644 --- a/include/timers.h +++ b/include/timers.h @@ -101,7 +101,7 @@ public: * This will ensure timers are not missed, as well as removing timers that have * expired and allowing the addition of new ones. */ -class CoreExport TimerManager +class CoreExport TimerManager final { /** A list of timers */ diff --git a/include/uplink.h b/include/uplink.h index 6646f58cb..72622de7b 100644 --- a/include/uplink.h +++ b/include/uplink.h @@ -20,7 +20,7 @@ namespace Uplink } /* This is the socket to our uplink */ -class UplinkSocket +class UplinkSocket final : public ConnectionSocket , public BufferedSocket { @@ -33,7 +33,7 @@ public: void OnError(const Anope::string &) override; /* A message sent over the uplink socket */ - class CoreExport Message + class CoreExport Message final { MessageSource source; std::stringstream buffer; diff --git a/include/xline.h b/include/xline.h index 19dd0a5c0..1c269e7ac 100644 --- a/include/xline.h +++ b/include/xline.h @@ -13,7 +13,7 @@ #include "sockets.h" /* An Xline, eg, anything added with operserv/akill, or any of the operserv/sxline commands */ -class CoreExport XLine +class CoreExport XLine final : public Serializable { void Init(); diff --git a/modules/bs_autoassign.cpp b/modules/bs_autoassign.cpp index 91a65d70a..a716525f9 100644 --- a/modules/bs_autoassign.cpp +++ b/modules/bs_autoassign.cpp @@ -9,7 +9,7 @@ #include "module.h" -class BSAutoAssign +class BSAutoAssign final : public Module { public: diff --git a/modules/commands/bs_assign.cpp b/modules/commands/bs_assign.cpp index e1e744842..43abdd55f 100644 --- a/modules/commands/bs_assign.cpp +++ b/modules/commands/bs_assign.cpp @@ -11,7 +11,7 @@ #include "module.h" -class CommandBSAssign +class CommandBSAssign final : public Command { public: @@ -83,7 +83,7 @@ public: } }; -class CommandBSUnassign +class CommandBSUnassign final : public Command { public: @@ -147,7 +147,7 @@ public: } }; -class CommandBSSetNoBot +class CommandBSSetNoBot final : public Command { public: @@ -205,7 +205,7 @@ public: } }; -class BSAssign +class BSAssign final : public Module { ExtensibleItem nobot; diff --git a/modules/commands/bs_badwords.cpp b/modules/commands/bs_badwords.cpp index cf863e442..e513170e7 100644 --- a/modules/commands/bs_badwords.cpp +++ b/modules/commands/bs_badwords.cpp @@ -12,7 +12,7 @@ #include "module.h" #include "modules/bs_badwords.h" -struct BadWordImpl +struct BadWordImpl final : BadWord , Serializable { @@ -29,7 +29,7 @@ struct BadWordImpl static Serializable* Unserialize(Serializable *obj, Serialize::Data &); }; -struct BadWordsImpl +struct BadWordsImpl final : BadWords { Serialize::Reference ci; @@ -147,7 +147,7 @@ Serializable* BadWordImpl::Unserialize(Serializable *obj, Serialize::Data &data) return bw; } -class BadwordsDelCallback +class BadwordsDelCallback final : public NumberList { CommandSource &source; @@ -185,7 +185,7 @@ public: } }; -class CommandBSBadwords +class CommandBSBadwords final : public Command { private: @@ -205,7 +205,7 @@ private: } else if (!word.empty() && word.find_first_not_of("1234567890,-") == Anope::string::npos) { - class BadwordsListCallback + class BadwordsListCallback final : public NumberList { ListFormatter &list; @@ -459,7 +459,7 @@ public: } }; -class BSBadwords +class BSBadwords final : public Module { CommandBSBadwords commandbsbadwords; diff --git a/modules/commands/bs_bot.cpp b/modules/commands/bs_bot.cpp index e882d3e04..170e1073a 100644 --- a/modules/commands/bs_bot.cpp +++ b/modules/commands/bs_bot.cpp @@ -11,7 +11,7 @@ #include "module.h" -class CommandBSBot +class CommandBSBot final : public Command { private: @@ -371,7 +371,7 @@ public: } }; -class BSBot +class BSBot final : public Module { CommandBSBot commandbsbot; diff --git a/modules/commands/bs_botlist.cpp b/modules/commands/bs_botlist.cpp index 828b5af99..915117916 100644 --- a/modules/commands/bs_botlist.cpp +++ b/modules/commands/bs_botlist.cpp @@ -11,7 +11,7 @@ #include "module.h" -class CommandBSBotList +class CommandBSBotList final : public Command { public: @@ -66,7 +66,7 @@ public: } }; -class BSBotList +class BSBotList final : public Module { CommandBSBotList commandbsbotlist; diff --git a/modules/commands/bs_control.cpp b/modules/commands/bs_control.cpp index 1230f03e1..32101be6e 100644 --- a/modules/commands/bs_control.cpp +++ b/modules/commands/bs_control.cpp @@ -11,7 +11,7 @@ #include "module.h" -class CommandBSSay +class CommandBSSay final : public Command { public: @@ -72,7 +72,7 @@ public: } }; -class CommandBSAct +class CommandBSAct final : public Command { public: @@ -132,7 +132,7 @@ public: } }; -class BSControl +class BSControl final : public Module { CommandBSSay commandbssay; diff --git a/modules/commands/bs_info.cpp b/modules/commands/bs_info.cpp index f8381836d..e42ad23b8 100644 --- a/modules/commands/bs_info.cpp +++ b/modules/commands/bs_info.cpp @@ -11,7 +11,7 @@ #include "module.h" -class CommandBSInfo +class CommandBSInfo final : public Command { private: @@ -118,7 +118,7 @@ public: } }; -class BSInfo +class BSInfo final : public Module { CommandBSInfo commandbsinfo; diff --git a/modules/commands/bs_kick.cpp b/modules/commands/bs_kick.cpp index e02c6cab8..f6012d07f 100644 --- a/modules/commands/bs_kick.cpp +++ b/modules/commands/bs_kick.cpp @@ -15,7 +15,7 @@ static Module *me; -struct KickerDataImpl +struct KickerDataImpl final : KickerData { KickerDataImpl(Extensible *obj) @@ -38,7 +38,7 @@ struct KickerDataImpl ci->Shrink("kickerdata"); } - struct ExtensibleItem + struct ExtensibleItem final : ::ExtensibleItem { ExtensibleItem(Module *m, const Anope::string &ename) : ::ExtensibleItem(m, ename) { } @@ -117,7 +117,7 @@ struct KickerDataImpl }; }; -class CommandBSKick +class CommandBSKick final : public Command { public: @@ -248,7 +248,7 @@ protected: } }; -class CommandBSKickAMSG +class CommandBSKickAMSG final : public CommandBSKickBase { public: @@ -285,7 +285,7 @@ public: } }; -class CommandBSKickBadwords +class CommandBSKickBadwords final : public CommandBSKickBase { public: @@ -325,7 +325,7 @@ public: } }; -class CommandBSKickBolds +class CommandBSKickBolds final : public CommandBSKickBase { public: @@ -360,7 +360,7 @@ public: } }; -class CommandBSKickCaps +class CommandBSKickCaps final : public CommandBSKickBase { public: @@ -457,7 +457,7 @@ public: } }; -class CommandBSKickColors +class CommandBSKickColors final : public CommandBSKickBase { public: @@ -492,7 +492,7 @@ public: } }; -class CommandBSKickFlood +class CommandBSKickFlood final : public CommandBSKickBase { public: @@ -591,7 +591,7 @@ public: } }; -class CommandBSKickItalics +class CommandBSKickItalics final : public CommandBSKickBase { public: @@ -626,7 +626,7 @@ public: } }; -class CommandBSKickRepeat +class CommandBSKickRepeat final : public CommandBSKickBase { public: @@ -728,7 +728,7 @@ public: } }; -class CommandBSKickReverses +class CommandBSKickReverses final : public CommandBSKickBase { public: @@ -763,7 +763,7 @@ public: } }; -class CommandBSKickUnderlines +class CommandBSKickUnderlines final : public CommandBSKickBase { public: @@ -798,7 +798,7 @@ public: } }; -class CommandBSSetDontKickOps +class CommandBSSetDontKickOps final : public Command { public: @@ -864,7 +864,7 @@ public: } }; -class CommandBSSetDontKickVoices +class CommandBSSetDontKickVoices final : public Command { public: @@ -930,9 +930,9 @@ public: } }; -struct BanData +struct BanData final { - struct Data + struct Data final { Anope::string mask; time_t last_use; @@ -978,7 +978,7 @@ public: } }; -struct UserData +struct UserData final { UserData(Extensible *) { @@ -1001,7 +1001,7 @@ struct UserData Anope::string lastline; }; -class BanDataPurger +class BanDataPurger final : public Timer { public: @@ -1024,7 +1024,7 @@ public: } }; -class BSKick +class BSKick final : public Module { ExtensibleItem bandata; diff --git a/modules/commands/bs_set.cpp b/modules/commands/bs_set.cpp index b2ffa24cb..636313785 100644 --- a/modules/commands/bs_set.cpp +++ b/modules/commands/bs_set.cpp @@ -11,7 +11,7 @@ #include "module.h" -class CommandBSSet +class CommandBSSet final : public Command { public: @@ -65,11 +65,11 @@ public: } }; -class CommandBSSetBanExpire +class CommandBSSetBanExpire final : public Command { public: - class UnbanTimer + class UnbanTimer final : public Timer { Anope::string chname; @@ -154,7 +154,7 @@ public: } }; -class CommandBSSetPrivate +class CommandBSSetPrivate final : public Command { public: @@ -205,7 +205,7 @@ public: } }; -class BSSet +class BSSet final : public Module { CommandBSSet commandbsset; diff --git a/modules/commands/cs_access.cpp b/modules/commands/cs_access.cpp index 939cc9ad4..7625f05aa 100644 --- a/modules/commands/cs_access.cpp +++ b/modules/commands/cs_access.cpp @@ -20,7 +20,7 @@ static inline void reset_levels(ChannelInfo *ci) ci->SetLevel(priv, level); } -class AccessChanAccess +class AccessChanAccess final : public ChanAccess { public: @@ -68,7 +68,7 @@ public: } }; -class AccessAccessProvider +class AccessAccessProvider final : public AccessProvider { public: @@ -86,7 +86,7 @@ public: }; AccessAccessProvider* AccessAccessProvider::me; -class CommandCSAccess +class CommandCSAccess final : public Command { void DoAdd(CommandSource &source, ChannelInfo *ci, const std::vector ¶ms) @@ -260,7 +260,7 @@ class CommandCSAccess source.Reply(_("%s access list is empty."), ci->name.c_str()); else if (isdigit(mask[0]) && mask.find_first_not_of("1234567890,-") == Anope::string::npos) { - class AccessDelCallback + class AccessDelCallback final : public NumberList { CommandSource &source; @@ -365,7 +365,7 @@ class CommandCSAccess source.Reply(_("%s access list is empty."), ci->name.c_str()); else if (!nick.empty() && nick.find_first_not_of("1234567890,-") == Anope::string::npos) { - class AccessListCallback + class AccessListCallback final : public NumberList { ListFormatter &list; @@ -638,7 +638,7 @@ public: } }; -class CommandCSLevels +class CommandCSLevels final : public Command { void DoSet(CommandSource &source, ChannelInfo *ci, const std::vector ¶ms) @@ -863,7 +863,7 @@ public: } }; -class CSAccess +class CSAccess final : public Module { AccessAccessProvider accessprovider; diff --git a/modules/commands/cs_akick.cpp b/modules/commands/cs_akick.cpp index 99c1dd2ee..6457f2856 100644 --- a/modules/commands/cs_akick.cpp +++ b/modules/commands/cs_akick.cpp @@ -11,7 +11,7 @@ #include "module.h" -class CommandCSAKick +class CommandCSAKick final : public Command { void Enforce(CommandSource &source, ChannelInfo *ci) @@ -204,7 +204,7 @@ class CommandCSAKick /* Special case: is it a number/list? Only do search if it isn't. */ if (isdigit(mask[0]) && mask.find_first_not_of("1234567890,-") == Anope::string::npos) { - class AkickDelCallback + class AkickDelCallback final : public NumberList { CommandSource &source; @@ -282,7 +282,7 @@ class CommandCSAKick if (!mask.empty() && isdigit(mask[0]) && mask.find_first_not_of("1234567890,-") == Anope::string::npos) { - class AkickListCallback + class AkickListCallback final : public NumberList { ListFormatter &list; @@ -528,7 +528,7 @@ public: } }; -class CSAKick +class CSAKick final : public Module { CommandCSAKick commandcsakick; diff --git a/modules/commands/cs_ban.cpp b/modules/commands/cs_ban.cpp index 5419ac263..ff019e602 100644 --- a/modules/commands/cs_ban.cpp +++ b/modules/commands/cs_ban.cpp @@ -13,7 +13,7 @@ static Module *me; -class TempBan +class TempBan final : public Timer { private: @@ -32,7 +32,7 @@ public: } }; -class CommandCSBan +class CommandCSBan final : public Command { public: @@ -239,7 +239,7 @@ public: } }; -class CSBan +class CSBan final : public Module { CommandCSBan commandcsban; diff --git a/modules/commands/cs_clone.cpp b/modules/commands/cs_clone.cpp index 5201b332c..79db9fd57 100644 --- a/modules/commands/cs_clone.cpp +++ b/modules/commands/cs_clone.cpp @@ -12,7 +12,7 @@ #include "module.h" #include "modules/bs_badwords.h" -class CommandCSClone +class CommandCSClone final : public Command { void CopySetting(ChannelInfo *ci, ChannelInfo *target_ci, const Anope::string &setting) @@ -247,7 +247,7 @@ public: } }; -class CSClone +class CSClone final : public Module { CommandCSClone commandcsclone; diff --git a/modules/commands/cs_drop.cpp b/modules/commands/cs_drop.cpp index 4f0b3f776..fa613efa7 100644 --- a/modules/commands/cs_drop.cpp +++ b/modules/commands/cs_drop.cpp @@ -11,7 +11,7 @@ #include "module.h" -class CommandCSDrop +class CommandCSDrop final : public Command { public: @@ -82,7 +82,7 @@ public: } }; -class CSDrop +class CSDrop final : public Module { CommandCSDrop commandcsdrop; diff --git a/modules/commands/cs_enforce.cpp b/modules/commands/cs_enforce.cpp index dc60e9c5c..825301cdd 100644 --- a/modules/commands/cs_enforce.cpp +++ b/modules/commands/cs_enforce.cpp @@ -13,7 +13,7 @@ #include "module.h" -class CommandCSEnforce +class CommandCSEnforce final : public Command { private: @@ -263,7 +263,7 @@ public: } }; -class CSEnforce +class CSEnforce final : public Module { CommandCSEnforce commandcsenforce; diff --git a/modules/commands/cs_entrymsg.cpp b/modules/commands/cs_entrymsg.cpp index 43055d5e5..0b5469661 100644 --- a/modules/commands/cs_entrymsg.cpp +++ b/modules/commands/cs_entrymsg.cpp @@ -12,7 +12,7 @@ #include "module.h" #include "modules/cs_entrymsg.h" -struct EntryMsgImpl +struct EntryMsgImpl final : EntryMsg , Serializable { @@ -41,7 +41,7 @@ struct EntryMsgImpl static Serializable* Unserialize(Serializable *obj, Serialize::Data &data); }; -struct EntryMessageListImpl +struct EntryMessageListImpl final : EntryMessageList { EntryMessageListImpl(Extensible *) { } @@ -100,7 +100,7 @@ Serializable* EntryMsgImpl::Unserialize(Serializable *obj, Serialize::Data &data return m; } -class CommandEntryMessage +class CommandEntryMessage final : public Command { private: @@ -264,7 +264,7 @@ public: } }; -class CSEntryMessage +class CSEntryMessage final : public Module { CommandEntryMessage commandentrymsg; diff --git a/modules/commands/cs_flags.cpp b/modules/commands/cs_flags.cpp index 795dfa167..5c0027677 100644 --- a/modules/commands/cs_flags.cpp +++ b/modules/commands/cs_flags.cpp @@ -13,7 +13,7 @@ static std::map defaultFlags; -class FlagsChanAccess +class FlagsChanAccess final : public ChanAccess { public: @@ -60,7 +60,7 @@ public: } }; -class FlagsAccessProvider +class FlagsAccessProvider final : public AccessProvider { public: @@ -78,7 +78,7 @@ public: }; FlagsAccessProvider* FlagsAccessProvider::ap; -class CommandCSFlags +class CommandCSFlags final : public Command { void DoModify(CommandSource &source, ChannelInfo *ci, Anope::string mask, const Anope::string &flags, const Anope::string &description) @@ -478,7 +478,7 @@ public: } }; -class CSFlags +class CSFlags final : public Module { FlagsAccessProvider accessprovider; diff --git a/modules/commands/cs_getkey.cpp b/modules/commands/cs_getkey.cpp index 4cec2f87b..38a782bea 100644 --- a/modules/commands/cs_getkey.cpp +++ b/modules/commands/cs_getkey.cpp @@ -11,7 +11,7 @@ #include "module.h" -class CommandCSGetKey +class CommandCSGetKey final : public Command { public: @@ -60,7 +60,7 @@ public: } }; -class CSGetKey +class CSGetKey final : public Module { CommandCSGetKey commandcsgetkey; diff --git a/modules/commands/cs_info.cpp b/modules/commands/cs_info.cpp index 0c5c91091..685538284 100644 --- a/modules/commands/cs_info.cpp +++ b/modules/commands/cs_info.cpp @@ -11,7 +11,7 @@ #include "module.h" -class CommandCSInfo +class CommandCSInfo final : public Command { public: @@ -84,7 +84,7 @@ public: } }; -class CSInfo +class CSInfo final : public Module { CommandCSInfo commandcsinfo; diff --git a/modules/commands/cs_invite.cpp b/modules/commands/cs_invite.cpp index 79e588f1e..4ab4b9a83 100644 --- a/modules/commands/cs_invite.cpp +++ b/modules/commands/cs_invite.cpp @@ -11,7 +11,7 @@ #include "module.h" -class CommandCSInvite +class CommandCSInvite final : public Command { public: @@ -98,7 +98,7 @@ public: } }; -class CSInvite +class CSInvite final : public Module { CommandCSInvite commandcsinvite; diff --git a/modules/commands/cs_kick.cpp b/modules/commands/cs_kick.cpp index 2756f3a59..27f4dbac9 100644 --- a/modules/commands/cs_kick.cpp +++ b/modules/commands/cs_kick.cpp @@ -11,7 +11,7 @@ #include "module.h" -class CommandCSKick +class CommandCSKick final : public Command { public: @@ -134,7 +134,7 @@ public: } }; -class CSKick +class CSKick final : public Module { CommandCSKick commandcskick; diff --git a/modules/commands/cs_list.cpp b/modules/commands/cs_list.cpp index 6c07db258..29add4596 100644 --- a/modules/commands/cs_list.cpp +++ b/modules/commands/cs_list.cpp @@ -12,7 +12,7 @@ #include "module.h" #include "modules/cs_mode.h" -class CommandCSList +class CommandCSList final : public Command { public: @@ -171,7 +171,7 @@ public: } }; -class CommandCSSetPrivate +class CommandCSSetPrivate final : public Command { public: @@ -240,7 +240,7 @@ public: } }; -class CSList +class CSList final : public Module { CommandCSList commandcslist; diff --git a/modules/commands/cs_log.cpp b/modules/commands/cs_log.cpp index ebc64f8c7..847316db6 100644 --- a/modules/commands/cs_log.cpp +++ b/modules/commands/cs_log.cpp @@ -12,7 +12,7 @@ #include "module.h" #include "modules/cs_log.h" -struct LogSettingImpl +struct LogSettingImpl final : LogSetting , Serializable { @@ -79,7 +79,7 @@ struct LogSettingImpl } }; -struct LogSettingsImpl +struct LogSettingsImpl final : LogSettings { LogSettingsImpl(Extensible *) { } @@ -100,7 +100,7 @@ struct LogSettingsImpl } }; -class CommandCSLog +class CommandCSLog final : public Command { public: @@ -285,7 +285,7 @@ public: } }; -class CSLog +class CSLog final : public Module { ServiceReference MSService; @@ -293,7 +293,7 @@ class CSLog ExtensibleItem logsettings; Serialize::Type logsetting_type; - struct LogDefault + struct LogDefault final { Anope::string service, command, method; }; diff --git a/modules/commands/cs_mode.cpp b/modules/commands/cs_mode.cpp index 1cdec547a..05fb43c33 100644 --- a/modules/commands/cs_mode.cpp +++ b/modules/commands/cs_mode.cpp @@ -12,7 +12,7 @@ #include "module.h" #include "modules/cs_mode.h" -struct ModeLockImpl +struct ModeLockImpl final : ModeLock , Serializable { @@ -35,7 +35,7 @@ struct ModeLockImpl static Serializable* Unserialize(Serializable *obj, Serialize::Data &data); }; -struct ModeLocksImpl +struct ModeLocksImpl final : ModeLocks { Serialize::Reference ci; @@ -244,7 +244,7 @@ Serializable* ModeLockImpl::Unserialize(Serializable *obj, Serialize::Data &data return ml; } -class CommandCSMode +class CommandCSMode final : public Command { bool CanSet(CommandSource &source, ChannelInfo *ci, ChannelMode *cm, bool self) @@ -793,7 +793,7 @@ public: static Anope::map > modes; -class CommandCSModes +class CommandCSModes final : public Command { public: @@ -911,7 +911,7 @@ public: } }; -class CSMode +class CSMode final : public Module { CommandCSMode commandcsmode; diff --git a/modules/commands/cs_register.cpp b/modules/commands/cs_register.cpp index e16413b79..402ae1296 100644 --- a/modules/commands/cs_register.cpp +++ b/modules/commands/cs_register.cpp @@ -11,7 +11,7 @@ #include "module.h" -class CommandCSRegister +class CommandCSRegister final : public Command { public: @@ -111,7 +111,7 @@ public: }; -class CSRegister +class CSRegister final : public Module { CommandCSRegister commandcsregister; diff --git a/modules/commands/cs_seen.cpp b/modules/commands/cs_seen.cpp index 378d78105..99f44e9fd 100644 --- a/modules/commands/cs_seen.cpp +++ b/modules/commands/cs_seen.cpp @@ -22,7 +22,7 @@ static SeenInfo *FindInfo(const Anope::string &nick); typedef Anope::hash_map database_map; database_map database; -struct SeenInfo +struct SeenInfo final : Serializable { Anope::string nick; @@ -110,7 +110,7 @@ static bool ShouldHide(const Anope::string &channel, User *u) return false; } -class CommandOSSeen +class CommandOSSeen final : public Command { public: @@ -182,7 +182,7 @@ public: } }; -class CommandSeen +class CommandSeen final : public Command { void SimpleSeen(CommandSource &source, const std::vector ¶ms) @@ -371,7 +371,7 @@ public: } }; -class CSSeen +class CSSeen final : public Module { Serialize::Type seeninfo_type; diff --git a/modules/commands/cs_set.cpp b/modules/commands/cs_set.cpp index ba44f14e2..72ed3421a 100644 --- a/modules/commands/cs_set.cpp +++ b/modules/commands/cs_set.cpp @@ -12,7 +12,7 @@ #include "module.h" #include "modules/cs_mode.h" -class CommandCSSet +class CommandCSSet final : public Command { public: @@ -65,7 +65,7 @@ public: } }; -class CommandCSSetAutoOp +class CommandCSSetAutoOp final : public Command { public: @@ -129,7 +129,7 @@ public: } }; -class CommandCSSetBanType +class CommandCSSetBanType final : public Command { public: @@ -197,7 +197,7 @@ public: } }; -class CommandCSSetDescription +class CommandCSSetDescription final : public Command { public: @@ -260,7 +260,7 @@ public: } }; -class CommandCSSetFounder +class CommandCSSetFounder final : public Command { public: @@ -330,7 +330,7 @@ public: } }; -class CommandCSSetKeepModes +class CommandCSSetKeepModes final : public Command { public: @@ -396,7 +396,7 @@ public: } }; -class CommandCSSetPeace +class CommandCSSetPeace final : public Command { public: @@ -469,7 +469,7 @@ inline static Anope::string BotModes() ); } -class CommandCSSetPersist +class CommandCSSetPersist final : public Command { public: @@ -619,7 +619,7 @@ public: } }; -class CommandCSSetRestricted +class CommandCSSetRestricted final : public Command { public: @@ -682,7 +682,7 @@ public: } }; -class CommandCSSetSecure +class CommandCSSetSecure final : public Command { public: @@ -746,7 +746,7 @@ public: } }; -class CommandCSSetSecureFounder +class CommandCSSetSecureFounder final : public Command { public: @@ -811,7 +811,7 @@ public: } }; -class CommandCSSetSecureOps +class CommandCSSetSecureOps final : public Command { public: @@ -874,7 +874,7 @@ public: } }; -class CommandCSSetSignKick +class CommandCSSetSignKick final : public Command { public: @@ -952,7 +952,7 @@ public: } }; -class CommandCSSetSuccessor +class CommandCSSetSuccessor final : public Command { public: @@ -1047,7 +1047,7 @@ public: } }; -class CommandCSSetNoexpire +class CommandCSSetNoexpire final : public Command { public: @@ -1106,14 +1106,14 @@ public: } }; -class CSSet +class CSSet final : public Module { SerializableExtensibleItem noautoop, peace, securefounder, restricted, secure, secureops, signkick, signkick_level, noexpire, persist; - struct KeepModes + struct KeepModes final : SerializableExtensibleItem { KeepModes(Module *m, const Anope::string &n) : SerializableExtensibleItem(m, n) { } diff --git a/modules/commands/cs_set_misc.cpp b/modules/commands/cs_set_misc.cpp index 7a8030d57..9a2c8d70e 100644 --- a/modules/commands/cs_set_misc.cpp +++ b/modules/commands/cs_set_misc.cpp @@ -31,7 +31,7 @@ static ExtensibleItem *GetItem(const Anope::string &name) return it; } -struct CSMiscData +struct CSMiscData final : MiscData , Serializable { @@ -90,7 +90,7 @@ static Anope::string GetAttribute(const Anope::string &command) return command; } -class CommandCSSetMisc +class CommandCSSetMisc final : public Command { public: @@ -167,7 +167,7 @@ public: } }; -class CSSetMisc +class CSSetMisc final : public Module { CommandCSSetMisc commandcssetmisc; diff --git a/modules/commands/cs_status.cpp b/modules/commands/cs_status.cpp index 492e30a49..41c3590be 100644 --- a/modules/commands/cs_status.cpp +++ b/modules/commands/cs_status.cpp @@ -11,7 +11,7 @@ #include "module.h" -class CommandCSStatus +class CommandCSStatus final : public Command { public: @@ -111,7 +111,7 @@ public: } }; -class CSStatus +class CSStatus final : public Module { CommandCSStatus commandcsstatus; diff --git a/modules/commands/cs_suspend.cpp b/modules/commands/cs_suspend.cpp index 6d5322753..28f0debf4 100644 --- a/modules/commands/cs_suspend.cpp +++ b/modules/commands/cs_suspend.cpp @@ -12,7 +12,7 @@ #include "module.h" #include "modules/suspend.h" -struct CSSuspendInfo +struct CSSuspendInfo final : SuspendInfo , Serializable { @@ -52,7 +52,7 @@ struct CSSuspendInfo } }; -class CommandCSSuspend +class CommandCSSuspend final : public Command { public: @@ -145,7 +145,7 @@ public: } }; -class CommandCSUnSuspend +class CommandCSUnSuspend final : public Command { public: @@ -197,7 +197,7 @@ public: } }; -class CSSuspend +class CSSuspend final : public Module { CommandCSSuspend commandcssuspend; @@ -206,7 +206,7 @@ class CSSuspend Serialize::Type suspend_type; std::vector show; - struct trim + struct trim final { Anope::string operator()(Anope::string s) const { diff --git a/modules/commands/cs_sync.cpp b/modules/commands/cs_sync.cpp index 7a7140944..b76d2cef2 100644 --- a/modules/commands/cs_sync.cpp +++ b/modules/commands/cs_sync.cpp @@ -11,7 +11,7 @@ #include "module.h" -class CommandCSSync +class CommandCSSync final : public Command { public: @@ -53,7 +53,7 @@ public: } }; -class CSSync +class CSSync final : public Module { CommandCSSync commandcssync; diff --git a/modules/commands/cs_topic.cpp b/modules/commands/cs_topic.cpp index 582c6a1e7..f774dca65 100644 --- a/modules/commands/cs_topic.cpp +++ b/modules/commands/cs_topic.cpp @@ -12,7 +12,7 @@ #include "module.h" #include "modules/cs_mode.h" -class CommandCSSetKeepTopic +class CommandCSSetKeepTopic final : public Command { public: @@ -77,7 +77,7 @@ public: } }; -class CommandCSTopic +class CommandCSTopic final : public Command { ExtensibleRef topiclock; @@ -204,7 +204,7 @@ public: } }; -class CSTopic +class CSTopic final : public Module { CommandCSTopic commandcstopic; diff --git a/modules/commands/cs_unban.cpp b/modules/commands/cs_unban.cpp index 763af5533..c214136eb 100644 --- a/modules/commands/cs_unban.cpp +++ b/modules/commands/cs_unban.cpp @@ -11,7 +11,7 @@ #include "module.h" -class CommandCSUnban +class CommandCSUnban final : public Command { public: @@ -116,7 +116,7 @@ public: } }; -class CSUnban +class CSUnban final : public Module { CommandCSUnban commandcsunban; diff --git a/modules/commands/cs_updown.cpp b/modules/commands/cs_updown.cpp index 90bb882e2..24242a0c3 100644 --- a/modules/commands/cs_updown.cpp +++ b/modules/commands/cs_updown.cpp @@ -11,7 +11,7 @@ #include "module.h" -class CommandCSUp +class CommandCSUp final : public Command { void SetModes(User *u, Channel *c) @@ -130,7 +130,7 @@ public: } }; -class CommandCSDown +class CommandCSDown final : public Command { void RemoveAll(User *u, Channel *c) @@ -228,7 +228,7 @@ public: } }; -class CSUpDown +class CSUpDown final : public Module { CommandCSUp commandcsup; diff --git a/modules/commands/cs_xop.cpp b/modules/commands/cs_xop.cpp index 7b0b8fd0c..835768849 100644 --- a/modules/commands/cs_xop.cpp +++ b/modules/commands/cs_xop.cpp @@ -17,7 +17,7 @@ namespace std::map > permissions; } -class XOPChanAccess +class XOPChanAccess final : public ChanAccess { public: @@ -85,7 +85,7 @@ public: } }; -class XOPAccessProvider +class XOPAccessProvider final : public AccessProvider { public: @@ -99,7 +99,7 @@ public: } }; -class CommandCSXOP +class CommandCSXOP final : public Command { private: @@ -294,7 +294,7 @@ private: /* Special case: is it a number/list? Only do search if it isn't. */ if (isdigit(mask[0]) && mask.find_first_not_of("1234567890,-") == Anope::string::npos) { - class XOPDelCallback + class XOPDelCallback final : public NumberList { CommandSource &source; @@ -398,7 +398,7 @@ private: if (!nick.empty() && nick.find_first_not_of("1234567890,-") == Anope::string::npos) { - class XOPListCallback + class XOPListCallback final : public NumberList { ListFormatter &list; @@ -600,7 +600,7 @@ public: } }; -class CSXOP +class CSXOP final : public Module { XOPAccessProvider accessprovider; diff --git a/modules/commands/gl_global.cpp b/modules/commands/gl_global.cpp index 3bea27e4d..edfaa21a5 100644 --- a/modules/commands/gl_global.cpp +++ b/modules/commands/gl_global.cpp @@ -11,7 +11,7 @@ #include "module.h" -class CommandGLGlobal +class CommandGLGlobal final : public Command { ServiceReference GService; @@ -52,7 +52,7 @@ public: } }; -class GLGlobal +class GLGlobal final : public Module { CommandGLGlobal commandglglobal; diff --git a/modules/commands/greet.cpp b/modules/commands/greet.cpp index 81a5e9c6d..1260b3a28 100644 --- a/modules/commands/greet.cpp +++ b/modules/commands/greet.cpp @@ -11,7 +11,7 @@ #include "module.h" -class CommandBSSetGreet +class CommandBSSetGreet final : public Command { public: @@ -138,7 +138,7 @@ public: } }; -class CommandNSSASetGreet +class CommandNSSASetGreet final : public CommandNSSetGreet { public: @@ -165,7 +165,7 @@ public: } }; -class Greet +class Greet final : public Module { /* channel setting for whether or not greet should be shown */ diff --git a/modules/commands/help.cpp b/modules/commands/help.cpp index 3d6dc47c3..66c22a589 100644 --- a/modules/commands/help.cpp +++ b/modules/commands/help.cpp @@ -11,7 +11,7 @@ #include "module.h" -class CommandHelp +class CommandHelp final : public Command { static const unsigned help_wrap_len = 40; @@ -183,7 +183,7 @@ public: } }; -class Help +class Help final : public Module { CommandHelp commandhelp; diff --git a/modules/commands/hs_del.cpp b/modules/commands/hs_del.cpp index 81fcf3e68..eb60afc00 100644 --- a/modules/commands/hs_del.cpp +++ b/modules/commands/hs_del.cpp @@ -11,7 +11,7 @@ #include "module.h" -class CommandHSDel +class CommandHSDel final : public Command { public: @@ -52,7 +52,7 @@ public: } }; -class CommandHSDelAll +class CommandHSDelAll final : public Command { public: @@ -98,7 +98,7 @@ public: } }; -class HSDel +class HSDel final : public Module { CommandHSDel commandhsdel; diff --git a/modules/commands/hs_group.cpp b/modules/commands/hs_group.cpp index c05c467c0..9db0bbb00 100644 --- a/modules/commands/hs_group.cpp +++ b/modules/commands/hs_group.cpp @@ -11,7 +11,7 @@ #include "module.h" -class CommandHSGroup +class CommandHSGroup final : public Command { bool setting = false; @@ -76,7 +76,7 @@ public: } }; -class HSGroup +class HSGroup final : public Module { CommandHSGroup commandhsgroup; diff --git a/modules/commands/hs_list.cpp b/modules/commands/hs_list.cpp index bacd4b367..8cda26c38 100644 --- a/modules/commands/hs_list.cpp +++ b/modules/commands/hs_list.cpp @@ -11,7 +11,7 @@ #include "module.h" -class CommandHSList +class CommandHSList final : public Command { public: @@ -143,7 +143,7 @@ public: } }; -class HSList +class HSList final : public Module { CommandHSList commandhslist; diff --git a/modules/commands/hs_off.cpp b/modules/commands/hs_off.cpp index cb65c7035..8e4036726 100644 --- a/modules/commands/hs_off.cpp +++ b/modules/commands/hs_off.cpp @@ -11,7 +11,7 @@ #include "module.h" -class CommandHSOff +class CommandHSOff final : public Command { public: @@ -54,7 +54,7 @@ public: } }; -class HSOff +class HSOff final : public Module { CommandHSOff commandhsoff; diff --git a/modules/commands/hs_on.cpp b/modules/commands/hs_on.cpp index 7f14e3406..c