diff options
| author | 2021-10-04 17:07:51 +0100 | |
|---|---|---|
| committer | 2021-10-04 17:39:05 +0100 | |
| commit | dec5875aca7a2e0c281388db2f25d195ad9b2a3d (patch) | |
| tree | 0f8f741801677daa23e7f399282b64ecde137ad0 /src/modules | |
| parent | Mark all message tag provider classes as final. (diff) | |
Apply the final keyword to all module classes where appropriate.
Diffstat (limited to 'src/modules')
99 files changed, 330 insertions, 222 deletions
diff --git a/src/modules/extra/m_argon2.cpp b/src/modules/extra/m_argon2.cpp index d8187a66d..b517e3bb2 100644 --- a/src/modules/extra/m_argon2.cpp +++ b/src/modules/extra/m_argon2.cpp @@ -32,7 +32,7 @@ #include <argon2.h> -class ProviderConfig +class ProviderConfig final { private: static Argon2_version SanitizeArgon2Version(unsigned long version) diff --git a/src/modules/extra/m_geo_maxmind.cpp b/src/modules/extra/m_geo_maxmind.cpp index 9ce9cc2eb..d3e00b879 100644 --- a/src/modules/extra/m_geo_maxmind.cpp +++ b/src/modules/extra/m_geo_maxmind.cpp @@ -35,7 +35,8 @@ #include "modules/geolocation.h" #include <maxminddb.h> -class GeolocationExtItem : public ExtensionItem +class GeolocationExtItem final + : public ExtensionItem { public: GeolocationExtItem(Module* parent) @@ -75,7 +76,8 @@ class GeolocationExtItem : public ExtensionItem typedef insp::flat_map<std::string, Geolocation::Location*> LocationMap; -class GeolocationAPIImpl : public Geolocation::APIBase +class GeolocationAPIImpl final + : public Geolocation::APIBase { public: GeolocationExtItem ext; diff --git a/src/modules/extra/m_ldap.cpp b/src/modules/extra/m_ldap.cpp index fba15a416..65aca4348 100644 --- a/src/modules/extra/m_ldap.cpp +++ b/src/modules/extra/m_ldap.cpp @@ -79,7 +79,8 @@ class LDAPRequest virtual std::string info() = 0; }; -class LDAPBind : public LDAPRequest +class LDAPBind final + : public LDAPRequest { std::string who, pass; @@ -96,7 +97,8 @@ class LDAPBind : public LDAPRequest std::string info() override; }; -class LDAPSearch : public LDAPRequest +class LDAPSearch final + : public LDAPRequest { std::string base; int searchscope; @@ -116,7 +118,8 @@ class LDAPSearch : public LDAPRequest std::string info() override; }; -class LDAPAdd : public LDAPRequest +class LDAPAdd final + : public LDAPRequest { std::string dn; LDAPMods attributes; @@ -134,7 +137,8 @@ class LDAPAdd : public LDAPRequest std::string info() override; }; -class LDAPDel : public LDAPRequest +class LDAPDel final + : public LDAPRequest { std::string dn; @@ -150,7 +154,8 @@ class LDAPDel : public LDAPRequest std::string info() override; }; -class LDAPModify : public LDAPRequest +class LDAPModify final + : public LDAPRequest { std::string base; LDAPMods attributes; @@ -168,7 +173,8 @@ class LDAPModify : public LDAPRequest std::string info() override; }; -class LDAPCompare : public LDAPRequest +class LDAPCompare final + : public LDAPRequest { std::string dn, attr, val; @@ -186,7 +192,9 @@ class LDAPCompare : public LDAPRequest std::string info() override; }; -class LDAPService : public LDAPProvider, public SocketThread +class LDAPService final + : public LDAPProvider + , public SocketThread { LDAP* con = nullptr; std::shared_ptr<ConfigTag> config; diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp index a67cae7f9..c3dcb4932 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -90,7 +90,7 @@ class SQLConnection; class MySQLresult; class DispatcherThread; -struct QueryQueueItem +struct QueryQueueItem final { // An SQL database which this query is executed on. SQLConnection* connection; @@ -109,7 +109,7 @@ struct QueryQueueItem } }; -struct ResultQueueItem +struct ResultQueueItem final { // An object which handles the result of the query. SQL::Query* query; @@ -146,7 +146,8 @@ class ModuleSQL final void OnUnloadModule(Module* mod) override; }; -class DispatcherThread : public SocketThread +class DispatcherThread final + : public SocketThread { private: ModuleSQL* const Parent; @@ -158,7 +159,8 @@ class DispatcherThread : public SocketThread /** Represents a mysql result set */ -class MySQLresult : public SQL::Result +class MySQLresult final + : public SQL::Result { public: SQL::Error err; @@ -267,7 +269,8 @@ class MySQLresult : public SQL::Result /** Represents a connection to a mysql database */ -class SQLConnection : public SQL::Provider +class SQLConnection final + : public SQL::Provider { private: bool EscapeString(SQL::Query* query, const std::string& in, std::string& out) diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index faf39d0b6..a6501c44e 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -73,7 +73,8 @@ enum SQLstatus WWRITE }; -class ReconnectTimer : public Timer +class ReconnectTimer final + : public Timer { private: ModulePgSQL* mod; @@ -84,7 +85,7 @@ class ReconnectTimer : public Timer bool Tick(time_t TIME) override; }; -struct QueueItem +struct QueueItem final { SQL::Query* c; std::string q; @@ -98,7 +99,8 @@ struct QueueItem * data is passes to the module nearly as directly as if it was using the API directly itself. */ -class PgSQLresult : public SQL::Result +class PgSQLresult final + : public SQL::Result { PGresult* res; int currentrow = 0; @@ -182,7 +184,9 @@ class PgSQLresult : public SQL::Result /** SQLConn represents one SQL session. */ -class SQLConn : public SQL::Provider, public EventHandler +class SQLConn final + : public SQL::Provider + , public EventHandler { public: std::shared_ptr<ConfigTag> conf; /* The <database> entry */ diff --git a/src/modules/extra/m_sqlite3.cpp b/src/modules/extra/m_sqlite3.cpp index 316306302..2015fb725 100644 --- a/src/modules/extra/m_sqlite3.cpp +++ b/src/modules/extra/m_sqlite3.cpp @@ -93,7 +93,8 @@ class SQLite3Result : public SQL::Result } }; -class SQLConn : public SQL::Provider +class SQLConn final + : public SQL::Provider { sqlite3* conn; std::shared_ptr<ConfigTag> config; diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index f364ff5d0..f62e93b80 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -70,14 +70,15 @@ namespace GnuTLS gnutls_rnd(GNUTLS_RND_RANDOM, buffer, len); } - class Init + class Init final { public: Init() { gnutls_global_init(); } ~Init() { gnutls_global_deinit(); } }; - class Exception : public ModuleException + class Exception final + : public ModuleException { public: Exception(const std::string& reason) @@ -96,7 +97,7 @@ namespace GnuTLS /** Used to create a gnutls_datum_t* from a std::string */ - class Datum + class Datum final { gnutls_datum_t datum; @@ -110,7 +111,7 @@ namespace GnuTLS const gnutls_datum_t* get() const { return &datum; } }; - class Hash + class Hash final { gnutls_digest_algorithm_t hash; @@ -134,7 +135,7 @@ namespace GnuTLS gnutls_digest_algorithm_t get() const { return hash; } }; - class DHParams + class DHParams final { gnutls_dh_params_t dh_params; @@ -165,7 +166,7 @@ namespace GnuTLS { /** Ensure that the key is deinited in case the constructor of X509Key throws */ - class RAIIKey + class RAIIKey final { public: gnutls_x509_privkey_t key; @@ -232,7 +233,7 @@ namespace GnuTLS class X509CRL { - class RAIICRL + class RAIICRL final { public: gnutls_x509_crl_t crl; @@ -259,7 +260,7 @@ namespace GnuTLS gnutls_x509_crl_t& get() { return crl.crl; } }; - class Priority + class Priority final { gnutls_priority_t priority; @@ -415,7 +416,7 @@ namespace GnuTLS } }; - class DataReader + class DataReader final { ssize_t retval; #ifdef INSPIRCD_GNUTLS_HAS_RECV_PACKET @@ -460,7 +461,7 @@ namespace GnuTLS ssize_t ret() const { return retval; } }; - class Profile + class Profile final { /** Name of this profile */ @@ -525,7 +526,7 @@ namespace GnuTLS } public: - struct Config + struct Config final { std::string name; @@ -605,7 +606,8 @@ namespace GnuTLS }; } -class GnuTLSIOHook : public SSLIOHook +class GnuTLSIOHook final + : public SSLIOHook { private: gnutls_session_t sess = nullptr; @@ -1054,7 +1056,8 @@ int GnuTLS::X509Credentials::cert_callback(gnutls_session_t sess, const gnutls_d return 0; } -class GnuTLSIOHookProvider : public SSLIOHookProvider +class GnuTLSIOHookProvider final + : public SSLIOHookProvider { GnuTLS::Profile profile; diff --git a/src/modules/extra/m_ssl_mbedtls.cpp b/src/modules/extra/m_ssl_mbedtls.cpp index 01874db6b..7c36ba95d 100644 --- a/src/modules/extra/m_ssl_mbedtls.cpp +++ b/src/modules/extra/m_ssl_mbedtls.cpp @@ -53,7 +53,8 @@ namespace mbedTLS { - class Exception : public ModuleException + class Exception final + : public ModuleException { public: Exception(const std::string& reason) @@ -99,7 +100,8 @@ namespace mbedTLS typedef RAIIObj<mbedtls_entropy_context, mbedtls_entropy_init, mbedtls_entropy_free> Entropy; - class CTRDRBG : private RAIIObj<mbedtls_ctr_drbg_context, mbedtls_ctr_drbg_init, mbedtls_ctr_drbg_free> + class CTRDRBG final + : private RAIIObj<mbedtls_ctr_drbg_context, mbedtls_ctr_drbg_init, mbedtls_ctr_drbg_free> { public: bool Seed(Entropy& entropy) @@ -113,7 +115,8 @@ namespace mbedTLS } }; - class DHParams : public RAIIObj<mbedtls_dhm_context, mbedtls_dhm_init, mbedtls_dhm_free> + class DHParams final + : public RAIIObj<mbedtls_dhm_context, mbedtls_dhm_init, mbedtls_dhm_free> { public: void set(const std::string& dhstr) @@ -141,7 +144,7 @@ namespace mbedTLS } }; - class Ciphersuites + class Ciphersuites final { std::vector<int> list; @@ -169,7 +172,7 @@ namespace mbedTLS bool empty() const { return (list.size() <= 1); } }; - class Curves + class Curves final { std::vector<mbedtls_ecp_group_id> list; @@ -257,7 +260,7 @@ namespace mbedTLS mbedtls_x509_crt* getcerts() { return certs.get(); } }; - class Context + class Context final { mbedtls_ssl_config conf; @@ -337,7 +340,7 @@ namespace mbedTLS const mbedtls_ssl_config* GetConf() const { return &conf; } }; - class Hash + class Hash final { const mbedtls_md_info_t* md; @@ -363,7 +366,7 @@ namespace mbedTLS } }; - class Profile + class Profile final { /** Name of this profile */ @@ -397,7 +400,7 @@ namespace mbedTLS const unsigned int outrecsize; public: - struct Config + struct Config final { const std::string name; @@ -521,7 +524,8 @@ namespace mbedTLS }; } -class mbedTLSIOHook : public SSLIOHook +class mbedTLSIOHook final + : public SSLIOHook { private: mbedtls_ssl_context sess; @@ -816,7 +820,8 @@ class mbedTLSIOHook : public SSLIOHook mbedTLS::Profile& GetProfile(); }; -class mbedTLSIOHookProvider : public SSLIOHookProvider +class mbedTLSIOHookProvider final + : public SSLIOHookProvider { mbedTLS::Profile profile; diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index f0146bad3..b026716dd 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -65,14 +65,15 @@ static void StaticSSLInfoCallback(const SSL* ssl, int where, int rc); namespace OpenSSL { - class Exception : public ModuleException + class Exception final + : public ModuleException { public: Exception(const std::string& reason) : ModuleException(reason) { } }; - class DHParams + class DHParams final { DH* dh; @@ -101,7 +102,7 @@ namespace OpenSSL } }; - class Context + class Context final { SSL_CTX* const ctx; long ctx_options; @@ -270,7 +271,7 @@ namespace OpenSSL } }; - class Profile + class Profile final { /** Name of this profile */ @@ -495,7 +496,8 @@ static int OnVerify(int preverify_ok, X509_STORE_CTX *ctx) return 1; } -class OpenSSLIOHook : public SSLIOHook +class OpenSSLIOHook final + : public SSLIOHook { private: SSL* sess; @@ -879,7 +881,8 @@ static int OpenSSL::BIOMethod::read(BIO* bio, char* buffer, int size) return static_cast<int>(ret); } -class OpenSSLIOHookProvider : public SSLIOHookProvider +class OpenSSLIOHookProvider final + : public SSLIOHookProvider { OpenSSL::Profile profile; diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp index 8e09bcd50..8ce6a5a9f 100644 --- a/src/modules/m_alias.cpp +++ b/src/modules/m_alias.cpp @@ -29,7 +29,7 @@ /** An alias definition */ -class Alias +class Alias final { public: /** The text of the alias command */ diff --git a/src/modules/m_auditorium.cpp b/src/modules/m_auditorium.cpp index 985ac2eea..052d3fe6d 100644 --- a/src/modules/m_auditorium.cpp +++ b/src/modules/m_auditorium.cpp @@ -63,7 +63,7 @@ class JoinHook final } -class ModuleAuditorium +class ModuleAuditorium final : public Module , public Names::EventListener , public Who::EventListener diff --git a/src/modules/m_banexception.cpp b/src/modules/m_banexception.cpp index 96054a519..f742464fd 100644 --- a/src/modules/m_banexception.cpp +++ b/src/modules/m_banexception.cpp @@ -47,7 +47,7 @@ class BanException final } }; -class ModuleBanException +class ModuleBanException final : public Module , public ExtBan::EventListener , public ISupport::EventListener diff --git a/src/modules/m_blockamsg.cpp b/src/modules/m_blockamsg.cpp index c8a587455..fe3f3c395 100644 --- a/src/modules/m_blockamsg.cpp +++ b/src/modules/m_blockamsg.cpp @@ -35,7 +35,7 @@ enum BlockAction { IBLOCK_KILL, IBLOCK_KILLOPERS, IBLOCK_NOTICE, IBLOCK_NOTICEOP /** Holds a blocked message's details */ -class BlockedMessage +class BlockedMessage final { public: std::string message; diff --git a/src/modules/m_botmode.cpp b/src/modules/m_botmode.cpp index 757efd8d8..d0175369c 100644 --- a/src/modules/m_botmode.cpp +++ b/src/modules/m_botmode.cpp @@ -57,7 +57,7 @@ class BotTag final } }; -class ModuleBotMode +class ModuleBotMode final : public Module , public ISupport::EventListener , public Who::EventListener diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp index efbef02f0..455ddeccd 100644 --- a/src/modules/m_callerid.cpp +++ b/src/modules/m_callerid.cpp @@ -74,7 +74,8 @@ class callerid_data } }; -struct CallerIDExtInfo : public ExtensionItem +struct CallerIDExtInfo final + : public ExtensionItem { CallerIDExtInfo(Module* parent) : ExtensionItem(parent, "callerid_data", ExtensionItem::EXT_USER) @@ -329,7 +330,8 @@ public: } }; -class CallerIDAPIImpl : public CallerID::APIBase +class CallerIDAPIImpl final + : public CallerID::APIBase { private: CallerIDExtInfo& ext; @@ -348,7 +350,7 @@ class CallerIDAPIImpl : public CallerID::APIBase } }; -class ModuleCallerID +class ModuleCallerID final : public Module , public CTCTags::EventListener , public ISupport::EventListener diff --git a/src/modules/m_cap.cpp b/src/modules/m_cap.cpp index 27f8a1a22..1f8742e8d 100644 --- a/src/modules/m_cap.cpp +++ b/src/modules/m_cap.cpp @@ -35,13 +35,15 @@ namespace Cap static Cap::ManagerImpl* managerimpl; -class Cap::ManagerImpl : public Cap::Manager, public ReloadModule::EventListener +class Cap::ManagerImpl final + : public Cap::Manager + , public ReloadModule::EventListener { /** Stores the cap state of a module being reloaded */ - struct CapModData + struct CapModData final { - struct Data + struct Data final { std::string name; std::vector<std::string> users; @@ -341,7 +343,8 @@ void Cap::ExtItem::FromInternal(Extensible* container, const std::string& value) managerimpl->HandleReq(user, caplist); } -class CapMessage : public Cap::MessageBase +class CapMessage final + : public Cap::MessageBase { public: CapMessage(LocalUser* user, const std::string& subcmd, const std::string& result, bool asterisk) @@ -455,7 +458,8 @@ class CommandCap final } }; -class PoisonCap : public Cap::Capability +class PoisonCap final + : public Cap::Capability { public: PoisonCap(Module* mod) diff --git a/src/modules/m_cban.cpp b/src/modules/m_cban.cpp index 2760c8196..0fa971c96 100644 --- a/src/modules/m_cban.cpp +++ b/src/modules/m_cban.cpp @@ -39,7 +39,8 @@ enum /** Holds a CBAN item */ -class CBan : public XLine +class CBan final + : public XLine { private: std::string matchtext; @@ -70,7 +71,8 @@ public: /** An XLineFactory specialized to generate cban pointers */ -class CBanFactory : public XLineFactory +class CBanFactory final + : public XLineFactory { public: CBanFactory() : XLineFactory("CBAN") { } diff --git a/src/modules/m_chanhistory.cpp b/src/modules/m_chanhistory.cpp index ab94bdfca..ab95da200 100644 --- a/src/modules/m_chanhistory.cpp +++ b/src/modules/m_chanhistory.cpp @@ -30,7 +30,7 @@ typedef insp::flat_map<std::string, std::string> HistoryTagMap; -struct HistoryItem +struct HistoryItem final { time_t ts; std::string text; @@ -50,7 +50,7 @@ struct HistoryItem } }; -struct HistoryList +struct HistoryList final { std::deque<HistoryItem> lines; unsigned long maxlen; @@ -138,7 +138,7 @@ class HistoryMode final } }; -class ModuleChanHistory +class ModuleChanHistory final : public Module , public ServerProtocol::BroadcastEventListener { diff --git a/src/modules/m_channames.cpp b/src/modules/m_channames.cpp index aa729440f..23ccdbe67 100644 --- a/src/modules/m_channames.cpp +++ b/src/modules/m_channames.cpp @@ -26,7 +26,7 @@ static std::bitset<256> allowedmap; -class NewIsChannelHandler +class NewIsChannelHandler final { public: static bool Call(const std::string&); diff --git a/src/modules/m_channelban.cpp b/src/modules/m_channelban.cpp index f2bf9d67d..39235e6ff 100644 --- a/src/modules/m_channelban.cpp +++ b/src/modules/m_channelban.cpp @@ -26,7 +26,7 @@ #include "inspircd.h" #include "modules/extban.h" -class ChannelExtBan +class ChannelExtBan final : public ExtBan::MatchingBase { public: @@ -56,7 +56,7 @@ class ChannelExtBan } }; -class ModuleBadChannelExtban +class ModuleBadChannelExtban final : public Module { private: diff --git a/src/modules/m_check.cpp b/src/modules/m_check.cpp index 8f7e88147..f06355949 100644 --- a/src/modules/m_check.cpp +++ b/src/modules/m_check.cpp @@ -34,7 +34,7 @@ enum RPL_CHECK = 802 }; -class CheckContext +class CheckContext final { private: User* const user; @@ -105,7 +105,8 @@ class CheckContext extlist.Flush(); } - class List : public Numeric::GenericBuilder<' ', false, Numeric::WriteRemoteNumericSink> + class List final + : public Numeric::GenericBuilder<' ', false, Numeric::WriteRemoteNumericSink> { public: List(CheckContext& context, const char* checktype) diff --git a/src/modules/m_classban.cpp b/src/modules/m_classban.cpp index 88ce54c34..faa9edb6e 100644 --- a/src/modules/m_classban.cpp +++ b/src/modules/m_classban.cpp @@ -21,7 +21,7 @@ #include "inspircd.h" #include "modules/extban.h" -class ClassExtBan +class ClassExtBan final : public ExtBan::MatchingBase { private: @@ -49,7 +49,7 @@ class ClassExtBan } }; -class ModuleClassBan +class ModuleClassBan final : public Module { private: diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index e9c85e21b..946f4a230 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -49,7 +49,7 @@ static const char base32[] = "0123456789abcdefghijklmnopqrstuv"; // The minimum length of a cloak key. static const size_t minkeylen = 30; -struct CloakInfo +struct CloakInfo final { // The method used for cloaking users. CloakMode mode; @@ -82,7 +82,8 @@ struct CloakInfo typedef std::vector<std::string> CloakList; -class CloakExtItem : public SimpleExtItem<CloakList> +class CloakExtItem final + : public SimpleExtItem<CloakList> { public: CloakExtItem(Module* Creator) diff --git a/src/modules/m_commonchans.cpp b/src/modules/m_commonchans.cpp index 74a80fca6..41d674862 100644 --- a/src/modules/m_commonchans.cpp +++ b/src/modules/m_commonchans.cpp @@ -24,7 +24,7 @@ #include "inspircd.h" #include "modules/ctctags.h" -class ModuleCommonChans +class ModuleCommonChans final : public Module , public CTCTags::EventListener { diff --git a/src/modules/m_conn_join.cpp b/src/modules/m_conn_join.cpp index d6fb83d30..b6d4e68a7 100644 --- a/src/modules/m_conn_join.cpp +++ b/src/modules/m_conn_join.cpp @@ -39,7 +39,8 @@ static void JoinChannels(LocalUser* u, const std::string& chanlist) } } -class JoinTimer : public Timer +class JoinTimer final + : public Timer { private: LocalUser* const user; diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp index f93716c7f..285313d25 100644 --- a/src/modules/m_customtitle.cpp +++ b/src/modules/m_customtitle.cpp @@ -27,7 +27,7 @@ #include "inspircd.h" #include "modules/whois.h" -struct CustomTitle +struct CustomTitle final { const std::string name; const std::string password; diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp index fe1c2f0de..06f7b1176 100644 --- a/src/modules/m_dccallow.cpp +++ b/src/modules/m_dccallow.cpp @@ -72,14 +72,14 @@ static const char* const helptext[] = " Your DCCALLOW list will be deleted when you leave IRC." }; -class BannedFileList +class BannedFileList final { public: std::string filemask; std::string action; }; -class DCCAllow +class DCCAllow final { public: std::string nickname; @@ -105,7 +105,8 @@ dccallowlist* dl; typedef std::vector<BannedFileList> bannedfilelist; bannedfilelist bfl; -class DCCAllowExt : public SimpleExtItem<dccallowlist> +class DCCAllowExt final + : public SimpleExtItem<dccallowlist> { public: unsigned long maxentries; diff --git a/src/modules/m_deaf.cpp b/src/modules/m_deaf.cpp index 7702e2225..8559c359d 100644 --- a/src/modules/m_deaf.cpp +++ b/src/modules/m_deaf.cpp @@ -72,7 +72,7 @@ class PrivDeafMode final } }; -class ModuleDeaf +class ModuleDeaf final : public Module , public CTCTags::EventListener { diff --git a/src/modules/m_delaymsg.cpp b/src/modules/m_delaymsg.cpp index 8070b497c..f162f00fe 100644 --- a/src/modules/m_delaymsg.cpp +++ b/src/modules/m_delaymsg.cpp @@ -50,7 +50,7 @@ class DelayMsgMode final } }; -class ModuleDelayMsg +class ModuleDelayMsg final : public Module , public CTCTags::EventListener { diff --git a/src/modules/m_denychans.cpp b/src/modules/m_denychans.cpp index 8787f2cae..30541920b 100644 --- a/src/modules/m_denychans.cpp +++ b/src/modules/m_denychans.cpp @@ -33,7 +33,7 @@ enum ERR_BADCHANNEL = 926 }; -struct BadChannel +struct BadChannel final { bool allowopers; std::string name; diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index 9c52132b2..a94d53058 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -156,7 +156,8 @@ public: } }; -class DNSBLResolver : public DNS::Request +class DNSBLResolver final + : public DNS::Request { private: irc::sockets::sockaddrs theirsa; diff --git a/src/modules/m_exemptchanops.cpp b/src/modules/m_exemptchanops.cpp index 1ab6e7584..457fadb75 100644 --- a/src/modules/m_exemptchanops.cpp +++ b/src/modules/m_exemptchanops.cpp @@ -113,7 +113,8 @@ class ExemptChanOps final } }; -class ExemptHandler : public CheckExemption::EventListener +class ExemptHandler final + : public CheckExemption::EventListener { public: ExemptChanOps ec; diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp index 0f1a2ffbd..8f56fbe43 100644 --- a/src/modules/m_filter.cpp +++ b/src/modules/m_filter.cpp @@ -62,7 +62,7 @@ enum FilterAction FA_NONE }; -class FilterResult +class FilterResult final { public: Regex::PatternPtr regex; @@ -186,7 +186,7 @@ class CommandFilter final } }; -class ModuleFilter +class ModuleFilter final : public Module , public ServerProtocol::SyncEventListener , public Stats::EventListener diff --git a/src/modules/m_gateway.cpp b/src/modules/m_gateway.cpp index 76e753683..d6d25179a 100644 --- a/src/modules/m_gateway.cpp +++ b/src/modules/m_gateway.cpp @@ -38,7 +38,7 @@ typedef std::vector<std::string> MaskList; // Encapsulates information about an ident host. -class IdentHost +class IdentHost final { private: MaskList hostmasks; @@ -75,7 +75,7 @@ class IdentHost }; // Encapsulates information about a WebIRC host. -class WebIRCHost +class WebIRCHost final { private: MaskList hostmasks; @@ -202,7 +202,7 @@ class CommandHexIP final } }; -class GatewayExtBan +class GatewayExtBan final : public ExtBan::MatchingBase { public: @@ -314,7 +314,7 @@ class CommandWebIRC final } }; -class ModuleGateway +class ModuleGateway final : public Module , public WebIRC::EventListener , public Whois::EventListener diff --git a/src/modules/m_geoban.cpp b/src/modules/m_geoban.cpp index 99d30e60b..a0de1e4da 100644 --- a/src/modules/m_geoban.cpp +++ b/src/modules/m_geoban.cpp @@ -23,7 +23,7 @@ #include "modules/geolocation.h" #include "modules/whois.h" -class CountryExtBan +class CountryExtBan final : public ExtBan::MatchingBase { private: @@ -46,7 +46,7 @@ class CountryExtBan } }; -class ModuleGeoBan +class ModuleGeoBan final : public Module , public Whois::EventListener { diff --git a/src/modules/m_geoclass.cpp b/src/modules/m_geoclass.cpp index b3872c477..1c570807f 100644 --- a/src/modules/m_geoclass.cpp +++ b/src/modules/m_geoclass.cpp @@ -27,7 +27,7 @@ enum RPL_STATSCOUNTRY = 801 }; -class ModuleGeoClass +class ModuleGeoClass final : public Module , public Stats::EventListener { diff --git a/src/modules/m_haproxy.cpp b/src/modules/m_haproxy.cpp index 02b80ac50..83635394d 100644 --- a/src/modules/m_haproxy.cpp +++ b/src/modules/m_haproxy.cpp @@ -92,7 +92,7 @@ enum HAProxyCommand HPC_PROXY = 0x01 }; -struct HAProxyHeader +struct HAProxyHeader final { // The signature used to identify the HAProxy protocol. uint8_t signature[PP2_SIGNATURE_LENGTH]; @@ -107,7 +107,8 @@ struct HAProxyHeader uint16_t length; }; -class HAProxyHookProvider : public IOHookProvider +class HAProxyHookProvider final + : public IOHookProvider { private: UserCertificateAPI sslapi; @@ -130,7 +131,8 @@ class HAProxyHookProvider : public IOHookProvider // The signature for a HAProxy PROXY protocol header. static const char proxy_signature[13] = "\x0D\x0A\x0D\x0A\x00\x0D\x0A\x51\x55\x49\x54\x0A"; -class HAProxyHook : public IOHookMiddle +class HAProxyHook final + : public IOHookMiddle { private: // The length of the address section. diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp index 9081214f2..4ad952479 100644 --- a/src/modules/m_helpop.cpp +++ b/src/modules/m_helpop.cpp @@ -38,7 +38,7 @@ enum typedef std::vector<std::string> HelpMessage; -struct HelpTopic +struct HelpTopic final { // The body of the help topic. const HelpMessage body; @@ -91,7 +91,7 @@ class CommandHelpop final } }; -class ModuleHelpop +class ModuleHelpop final : public Module , public Whois::EventListener { diff --git a/src/modules/m_hidemode.cpp b/src/modules/m_hidemode.cpp index 128db3a8e..f5d7c0c6a 100644 --- a/src/modules/m_hidemode.cpp +++ b/src/modules/m_hidemode.cpp @@ -24,7 +24,7 @@ namespace { -class Settings +class Settings final { typedef insp::flat_map<std::string, unsigned int> RanksToSeeMap; RanksToSeeMap rankstosee; diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp index 9db109df8..ae30221dc 100644 --- a/src/modules/m_hideoper.cpp +++ b/src/modules/m_hideoper.cpp @@ -58,7 +58,7 @@ class HideOper final } }; -class ModuleHideOper +class ModuleHideOper final : public Module , public Stats::EventListener , public Who::EventListener diff --git a/src/modules/m_hostchange.cpp b/src/modules/m_hostchange.cpp index 250b76a90..d1f3426b2 100644 --- a/src/modules/m_hostchange.cpp +++ b/src/modules/m_hostchange.cpp @@ -27,7 +27,7 @@ #include "modules/account.h" // Holds information about a <hostchange> rule. -class HostRule +class HostRule final { public: enum HostChangeAction diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index 3ead3cd28..149fcf513 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -58,7 +58,10 @@ static http_parser_settings parser_settings; /** A socket used for HTTP transport */ -class HttpServerSocket : public BufferedSocket, public Timer, public insp::intrusive_list_node<HttpServerSocket> +class HttpServerSocket final + : public BufferedSocket + , public Timer + , public insp::intrusive_list_node<HttpServerSocket> { private: friend class ModuleHttpServer; @@ -388,7 +391,8 @@ class HttpServerSocket : public BufferedSocket, public Timer, public insp::intru } }; -class HTTPdAPIImpl : public HTTPdAPIBase +class HTTPdAPIImpl final + : public HTTPdAPIBase { public: HTTPdAPIImpl(Module* parent) diff --git a/src/modules/m_httpd_acl.cpp b/src/modules/m_httpd_acl.cpp index e2b0958f0..afdbf2c08 100644 --- a/src/modules/m_httpd_acl.cpp +++ b/src/modules/m_httpd_acl.cpp @@ -26,7 +26,7 @@ #include "inspircd.h" #include "modules/httpd.h" -class HTTPACL +class HTTPACL final { public: std::string path; diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp index 4e787ff7e..bcbcfba81 100644 --- a/src/modules/m_httpd_stats.cpp +++ b/src/modules/m_httpd_stats.cpp @@ -39,7 +39,7 @@ static ISupport::EventProvider* isevprov; namespace Stats { - struct Entities + struct Entities final { static const insp::flat_map<char, char const*>& entities; }; @@ -291,7 +291,7 @@ namespace Stats OB_NONE }; - struct UserSorter + struct UserSorter final { OrderBy order; bool desc; diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp index 3ceeb88c9..881bb13cb 100644 --- a/src/modules/m_ident.cpp +++ b/src/modules/m_ident.cpp @@ -100,7 +100,8 @@ enum * -------------------------------------------------------------- */ -class IdentRequestSocket : public EventHandler +class IdentRequestSocket final + : public EventHandler { public: LocalUser *user; /* User we are attached to */ diff --git a/src/modules/m_inviteexception.cpp b/src/modules/m_inviteexception.cpp index 6643fe9be..2e1052577 100644 --- a/src/modules/m_inviteexception.cpp +++ b/src/modules/m_inviteexception.cpp @@ -44,7 +44,7 @@ class InviteException final } }; -class ModuleInviteException +class ModuleInviteException final : public Module , public ISupport::EventListener { diff --git a/src/modules/m_ircv3.cpp b/src/modules/m_ircv3.cpp index e258ffe0d..2a2be97d9 100644 --- a/src/modules/m_ircv3.cpp +++ b/src/modules/m_ircv3.cpp @@ -24,7 +24,8 @@ #include "modules/cap.h" #include "modules/ircv3.h" -class AwayMessage : public ClientProtocol::Message +class AwayMessage final + : public ClientProtocol::Message { public: AwayMessage(User* user) diff --git a/src/modules/m_ircv3_batch.cpp b/src/modules/m_ircv3_batch.cpp index 8296a4851..4914dafba 100644 --- a/src/modules/m_ircv3_batch.cpp +++ b/src/modules/m_ircv3_batch.cpp @@ -22,7 +22,8 @@ #include "modules/cap.h" #include "modules/ircv3_batch.h" -class BatchMessage : public ClientProtocol::Message +class BatchMessage final + : public ClientProtocol::Message { public: BatchMessage(const IRCv3::Batch::Batch& batch, bool start) diff --git a/src/modules/m_ircv3_capnotify.cpp b/src/modules/m_ircv3_capnotify.cpp index f0994ec46..519505ce5 100644 --- a/src/modules/m_ircv3_capnotify.cpp +++ b/src/modules/m_ircv3_capnotify.cpp @@ -22,7 +22,8 @@ #include "modules/cap.h" #include "modules/reload.h" -class CapNotify : public Cap::Capability +class CapNotify final + : public Cap::Capability { bool OnRequest(LocalUser* user, bool add) override { @@ -47,7 +48,8 @@ class CapNotify : public Cap::Capability } }; -class CapNotifyMessage : public Cap::MessageBase +class CapNotifyMessage final + : public Cap::MessageBase { public: CapNotifyMessage(bool add, const std::string& capname) @@ -57,7 +59,8 @@ class CapNotifyMessage : public Cap::MessageBase } }; -class CapNotifyValueMessage : public Cap::MessageBase +class CapNotifyValueMessage final + : public Cap::MessageBase { std::string s; const std::string::size_type pos; diff --git a/src/modules/m_ircv3_msgid.cpp b/src/modules/m_ircv3_msgid.cpp index cdeef8d11..2a47a0dcb 100644 --- a/src/modules/m_ircv3_msgid.cpp +++ b/src/modules/m_ircv3_msgid.cpp @@ -48,7 +48,7 @@ class MsgIdTag final } }; -class MsgIdGenerator +class MsgIdGenerator final { uint64_t counter = 0; std::string strid; @@ -69,7 +69,7 @@ class MsgIdGenerator } }; -class ModuleMsgId +class ModuleMsgId final : public Module , public CTCTags::EventListener { diff --git a/src/modules/m_ircv3_sts.cpp b/src/modules/m_ircv3_sts.cpp index b46bc1168..b59025130 100644 --- a/src/modules/m_ircv3_sts.cpp +++ b/src/modules/m_ircv3_sts.cpp @@ -22,7 +22,8 @@ #include "modules/cap.h" #include "modules/ssl.h" -class STSCap : public Cap::Capability +class STSCap final + : public Cap::Capability { private: std::string host; diff --git a/src/modules/m_joinflood.cpp b/src/modules/m_joinflood.cpp index 4857b2b78..ae29811e3 100644 --- a/src/modules/m_joinflood.cpp +++ b/src/modules/m_joinflood.cpp @@ -134,7 +134,7 @@ class JoinFlood final } }; -class ModuleJoinFlood +class ModuleJoinFlood final : public Module , public ServerProtocol::LinkEventListener { diff --git a/src/modules/m_kicknorejoin.cpp b/src/modules/m_kicknorejoin.cpp index 31c443a6a..714a832a4 100644 --- a/src/modules/m_kicknorejoin.cpp +++ b/src/modules/m_kicknorejoin.cpp @@ -35,9 +35,9 @@ enum ERR_UNAVAILRESOURCE = 437 }; -class KickRejoinData +class KickRejoinData final { - struct KickedUser + struct KickedUser final { std::string uuid; time_t expire; diff --git a/src/modules/m_ldapauth.cpp b/src/modules/m_ldapauth.cpp index 28165cb20..b127cb63f 100644 --- a/src/modules/m_ldapauth.cpp +++ b/src/modules/m_ldapauth.cpp @@ -36,7 +36,8 @@ namespace std::vector<std::pair<std::string, std::string> > requiredattributes; } -class BindInterface : public LDAPInterface +class BindInterface + : public LDAPInterface { const std::string provider; const std::string uid; @@ -206,7 +207,8 @@ class BindInterface : public LDAPInterface } }; -class SearchInterface : public LDAPInterface +class SearchInterface final + : public LDAPInterface { const std::string provider; const std::string uid; @@ -259,7 +261,8 @@ class SearchInterface : public LDAPInterface } }; -class AdminBindInterface : public LDAPInterface +class AdminBindInterface final + : public LDAPInterface { const std::string provider; const std::string uuid; diff --git a/src/modules/m_ldapoper.cpp b/src/modules/m_ldapoper.cpp index b3cf3f084..3c2e944e6 100644 --- a/src/modules/m_ldapoper.cpp +++ b/src/modules/m_ldapoper.cpp @@ -28,7 +28,8 @@ namespace Module* me; } -class LDAPOperBase : public LDAPInterface +class LDAPOperBase + : public LDAPInterface { protected: const std::string uid; @@ -72,7 +73,8 @@ class LDAPOperBase : public LDAPInterface } }; -class BindInterface : public LDAPOperBase +class BindInterface final + : public LDAPOperBase { public: BindInterface(Module* mod, const std::string& uuid, const std::string& oper, const std::string& pass) @@ -97,7 +99,8 @@ class BindInterface : public LDAPOperBase } }; -class SearchInterface : public LDAPOperBase +class SearchInterface final + : public LDAPOperBase { const std::string provider; @@ -139,7 +142,8 @@ class SearchInterface : public LDAPOperBase } }; -class AdminBindInterface : public LDAPInterface +class AdminBindInterface final + : public LDAPInterface { const std::string provider; const std::string user; diff --git a/src/modules/m_messageflood.cpp b/src/modules/m_messageflood.cpp index 799516800..cab7a9879 100644 --- a/src/modules/m_messageflood.cpp +++ b/src/modules/m_messageflood.cpp @@ -110,7 +110,7 @@ class MsgFlood final } }; -class ModuleMsgFlood +class ModuleMsgFlood final : public Module , public CTCTags::EventListener { diff --git a/src/modules/m_monitor.cpp b/src/modules/m_monitor.cpp index 6dcb0e3dc..22377f0a6 100644 --- a/src/modules/m_monitor.cpp +++ b/src/modules/m_monitor.cpp @@ -36,7 +36,7 @@ namespace IRCv3 } } -struct IRCv3::Monitor::Entry +struct IRCv3::Monitor::Entry final { WatcherList watchers; std::string nick; @@ -53,12 +53,13 @@ struct IRCv3::Monitor::Entry class IRCv3::Monitor::Manager { - struct ExtData + struct ExtData final { WatchedList list; }; - class ExtItem : public ExtensionItem + class ExtItem final + : public ExtensionItem { Manager& manager; @@ -363,7 +364,7 @@ class CommandMonitor final } }; -class ModuleMonitor +class ModuleMonitor final : public Module , public ISupport::EventListener { diff --git a/src/modules/m_muteban.cpp b/src/modules/m_muteban.cpp index 11a86c79f..0208bec77 100644 --- a/src/modules/m_muteban.cpp +++ b/src/modules/m_muteban.cpp @@ -26,7 +26,7 @@ #include "modules/ctctags.h" #include "modules/extban.h" -class ModuleQuietBan +class ModuleQuietBan final : public Module , public CTCTags::EventListener { diff --git a/src/modules/m_nationalchars.cpp b/src/modules/m_nationalchars.cpp index 2cb2ede4e..c673078c7 100644 --- a/src/modules/m_nationalchars.cpp +++ b/src/modules/m_nationalchars.cpp @@ -35,7 +35,7 @@ #include "inspircd.h" #include <fstream> -class lwbNickHandler +class lwbNickHandler final { public: static bool Call(const std::string&); diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp index 1f7aaee8e..ba4c48767 100644 --- a/src/modules/m_operchans.cpp +++ b/src/modules/m_operchans.cpp @@ -32,7 +32,7 @@ enum ERR_CANTJOINOPERSONLY = 520 }; -class OperExtBan +class OperExtBan final : public ExtBan::MatchingBase { private: @@ -60,7 +60,7 @@ class OperExtBan } }; -class ModuleOperChans +class ModuleOperChans final : public Module { private: diff --git a/src/modules/m_operlog.cpp b/src/modules/m_operlog.cpp index da25ee432..6477caa69 100644 --- a/src/modules/m_operlog.cpp +++ b/src/modules/m_operlog.cpp @@ -26,7 +26,7 @@ #include "inspircd.h" #include "modules/isupport.h" -class ModuleOperLog +class ModuleOperLog final : public Module { private: diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp index 01289d3a8..07fa760da 100644 --- a/src/modules/m_override.cpp +++ b/src/modules/m_override.cpp @@ -35,7 +35,7 @@ #include "modules/invite.h" #include "modules/isupport.h" -class ModuleOverride +class ModuleOverride final : public Module , public ISupport::EventListener { diff --git a/src/modules/m_pbkdf2.cpp b/src/modules/m_pbkdf2.cpp index d01258843..4823cd9a0 100644 --- a/src/modules/m_pbkdf2.cpp +++ b/src/modules/m_pbkdf2.cpp @@ -143,7 +143,7 @@ class PBKDF2Provider final } }; -struct ProviderConfig +struct ProviderConfig final { unsigned long dkey_length; unsigned long iterations; diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp index 104768339..b02dd870a 100644 --- a/src/modules/m_permchannels.cpp +++ b/src/modules/m_permchannels.cpp @@ -160,7 +160,7 @@ static bool WriteDatabase(PermChannel& permchanmode, Module* mod, bool save_list return true; } -class ModulePermanentChannels +class ModulePermanentChannels final : public Module , public Timer diff --git a/src/modules/m_realnameban.cpp b/src/modules/m_realnameban.cpp index bfaa7cd53..18b5513f4 100644 --- a/src/modules/m_realnameban.cpp +++ b/src/modules/m_realnameban.cpp @@ -26,7 +26,7 @@ #include "inspircd.h" #include "modules/extban.h" -class RealMaskExtBan +class RealMaskExtBan final : public ExtBan::MatchingBase { public: @@ -51,7 +51,7 @@ class RealMaskExtBan } }; -class RealNameExtBan +class RealNameExtBan final : public ExtBan::MatchingBase { public: @@ -66,7 +66,7 @@ class RealNameExtBan } }; -class ModuleGecosBan +class ModuleGecosBan final : public Module { private: diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp index 46a39d3e2..767073094 100644 --- a/src/modules/m_remove.cpp +++ b/src/modules/m_remove.cpp @@ -39,7 +39,8 @@ /** Base class for /FPART and /REMOVE */ -class RemoveBase : public Command +class RemoveBase + : public Command { bool& supportnokicks; ChanModeReference& nokicksmode; @@ -164,7 +165,8 @@ class RemoveBase : public Command } }; -class CommandRemove : public RemoveBase +class CommandRemove final + : public RemoveBase { public: CommandRemove(Module* Creator, bool& snk, ChanModeReference& nkm) @@ -180,7 +182,8 @@ class CommandRemove : public RemoveBase } }; -class CommandFpart : public RemoveBase +class CommandFpart final + : public RemoveBase { public: CommandFpart(Module* Creator, bool& snk, ChanModeReference& nkm) @@ -196,7 +199,7 @@ class CommandFpart : public RemoveBase } }; -class ModuleRemove +class ModuleRemove final : public Module , public ISupport::EventListener { diff --git a/src/modules/m_repeat.cpp b/src/modules/m_repeat.cpp index f36894249..f88f2552b 100644 --- a/src/modules/m_repeat.cpp +++ b/src/modules/m_repeat.cpp @@ -69,7 +69,7 @@ class RepeatMode final : public ParamMode<RepeatMode, SimpleExtItem<ChannelSettings>> { private: - struct RepeatItem + struct RepeatItem final { time_t ts; std::string line; @@ -78,13 +78,13 @@ class RepeatMode final typedef std::deque<RepeatItem> RepeatItemList; - struct MemberInfo + struct MemberInfo final { RepeatItemList ItemList; unsigned int Counter = 0; }; - struct ModuleSettings + struct ModuleSettings final { unsigned long MaxLines = 0; unsigned long MaxSecs = 0; diff --git a/src/modules/m_restrictmsg.cpp b/src/modules/m_restrictmsg.cpp index cd30247aa..10cb21382 100644 --- a/src/modules/m_restrictmsg.cpp +++ b/src/modules/m_restrictmsg.cpp @@ -26,7 +26,7 @@ #include "inspircd.h" #include "modules/ctctags.h" -class ModuleRestrictMsg +class ModuleRestrictMsg final : public Module , public CTCTags::EventListener { diff --git a/src/modules/m_rline.cpp b/src/modules/m_rline.cpp index de4f1c7c7..78a94cbbb 100644 --- a/src/modules/m_rline.cpp +++ b/src/modules/m_rline.cpp @@ -34,7 +34,8 @@ static bool ZlineOnMatch = false; static bool added_zline = false; -class RLine : public XLine +class RLine final + : public XLine { public: RLine(time_t s_time, unsigned long d, const std::string& src, const std::string& re, const std::string& regexs, Regex::EngineReference& rxfactory) @@ -93,7 +94,8 @@ class RLine : public XLine /** An XLineFactory specialized to generate RLine* pointers */ -class RLineFactory : public XLineFactory +class RLineFactory final + : public XLineFactory { public: Regex::EngineReference& rxfactory; @@ -194,7 +196,7 @@ class CommandRLine final } }; -class ModuleRLine +class ModuleRLine final : public Module , public Stats::EventListener { diff --git a/src/modules/m_sasl.cpp b/src/modules/m_sasl.cpp index 9dcf4bb12..b2c2beaf2 100644 --- a/src/modules/m_sasl.cpp +++ b/src/modules/m_sasl.cpp @@ -44,7 +44,7 @@ enum static std::string sasl_target; -class ServerTracker +class ServerTracker final : public ServerProtocol::LinkEventListener { private: @@ -104,7 +104,8 @@ class ServerTracker bool IsOnline() const { return online; } }; -class SASLCap : public Cap::Capability +class SASLCap final + : public Cap::Capability { private: std::string mechlist; @@ -173,7 +174,7 @@ static ClientProtocol::EventProvider* g_protoev; /** * Tracks SASL authentication state like charybdis does. --nenolod */ -class SaslAuthenticator +class SaslAuthenticator final { private: std::string agent; diff --git a/src/modules/m_serverban.cpp b/src/modules/m_serverban.cpp index dd404a205..d42da1e23 100644 --- a/src/modules/m_serverban.cpp +++ b/src/modules/m_serverban.cpp @@ -26,7 +26,7 @@ #include "inspircd.h" #include "modules/extban.h" -class ServerExtBan +class ServerExtBan final : public ExtBan::MatchingBase { public: @@ -41,7 +41,7 @@ class ServerExtBan } }; -class ModuleServerBan +class ModuleServerBan final : public Module { private: diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp index d5f1bd2d7..2c7627421 100644 --- a/src/modules/m_services_account.cpp +++ b/src/modules/m_services_account.cpp @@ -91,7 +91,8 @@ class RegisteredUser final } }; -class AccountExtItemImpl : public AccountExtItem +class AccountExtItemImpl final + : public AccountExtItem { Events::ModuleEventProvider eventprov; @@ -130,7 +131,7 @@ class AccountExtItemImpl : public AccountExtItem } }; -class AccountExtBan +class AccountExtBan final : public ExtBan::MatchingBase { private: @@ -150,7 +151,7 @@ private: } }; -class UnauthedExtBan +class UnauthedExtBan final : public ExtBan::MatchingBase { private: @@ -170,7 +171,7 @@ private: } }; -class ModuleServicesAccount +class ModuleServicesAccount final : public Module , public CTCTags::EventListener , public Whois::EventListener diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp index 029a62d4d..76f26020b 100644 --- a/src/modules/m_shun.cpp +++ b/src/modules/m_shun.cpp @@ -36,7 +36,8 @@ /** An XLineFactory specialized to generate shun pointers */ -class ShunFactory : public XLineFactory +class ShunFactory final + : public XLineFactory { public: ShunFactory() : XLineFactory("SHUN") { } diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp index 16f3f94b5..12c61c526 100644 --- a/src/modules/m_silence.cpp +++ b/src/modules/m_silence.cpp @@ -35,7 +35,7 @@ enum ERR_SILENCE = 952 }; -class SilenceEntry +class SilenceEntry final { public: enum SilenceFlags @@ -184,7 +184,8 @@ class SilenceEntry typedef insp::flat_set<SilenceEntry> SilenceList; -class SilenceExtItem : public SimpleExtItem<SilenceList> +class SilenceExtItem final + : public SimpleExtItem<SilenceList> { public: unsigned long maxsilence; @@ -262,7 +263,8 @@ class SilenceExtItem : public SimpleExtItem<SilenceList> } }; -class SilenceMessage : public ClientProtocol::Message +class SilenceMessage final + : public ClientProtocol::Message { public: SilenceMessage(const std::string& mask, const std::string& flags) @@ -389,7 +391,7 @@ class CommandSilence final } }; -class ModuleSilence +class ModuleSilence final : public Module , public CTCTags::EventListener , public ISupport::EventListener diff --git a/src/modules/m_spanningtree/cachetimer.h b/src/modules/m_spanningtree/cachetimer.h index cda294371..83eb09596 100644 --- a/src/modules/m_spanningtree/cachetimer.h +++ b/src/modules/m_spanningtree/cachetimer.h @@ -26,7 +26,8 @@ /** Timer that fires when we need to refresh the IP cache of servers */ -class CacheRefreshTimer : public Timer +class CacheRefreshTimer final + : public Timer { public: CacheRefreshTimer(); diff --git a/src/modules/m_spanningtree/commands.h b/src/modules/m_spanningtree/commands.h index 2050898a6..45be032f1 100644 --- a/src/modules/m_spanningtree/commands.h +++ b/src/modules/m_spanningtree/commands.h @@ -104,7 +104,8 @@ class CommandMetadata final CommandMetadata(Module* Creator) : ServerCommand(Creator, "METADATA", 2) { } CmdResult Handle(User* user, Params& params) override; - class Builder : public CmdBuilder + class Builder final + : public CmdBuilder { public: Builder(const User* user, const std::string& key, const std::string& val); @@ -121,7 +122,8 @@ class CommandUID final CommandUID(Module* Creator) : ServerOnlyServerCommand<CommandUID>(Creator, "UID", 10) { } CmdResult HandleServer(TreeServer* server, CommandBase::Params& params); - class Builder : public CmdBuilder + class Builder final + : public CmdBuilder { public: Builder(User* user); @@ -135,7 +137,8 @@ class CommandOpertype final CommandOpertype(Module* Creator) : UserOnlyServerCommand<CommandOpertype>(Creator, "OPERTYPE", 1) { } CmdResult HandleRemote(RemoteUser* user, Params& params); - class Builder : public CmdBuilder + class Builder final + : public CmdBuilder { public: Builder(User* user); @@ -166,7 +169,8 @@ class CommandFJoin final CmdResult Handle(User* user, Params& params) override; RouteDescriptor GetRouting(User* user, const Params& parameters) override { return ROUTE_LOCALONLY; } - class Builder : public CmdBuilder + class Builder + : public CmdBuilder { /** Maximum possible Membership::Id length in decimal digits, used for determining whether a user will fit into * a message or not @@ -207,7 +211,8 @@ class CommandFTopic final CommandFTopic(Module* Creator) : ServerCommand(Creator, "FTOPIC", 4, 5) { } CmdResult Handle(User* user, Params& params) override; - class Builder : public CmdBuilder + class Builder final + : public CmdBuilder { public: Builder(Channel* chan); @@ -278,7 +283,8 @@ class SpanningTree::CommandAway final } CmdResult HandleRemote(::RemoteUser* user, Params& parameters); - class Builder : public CmdBuilder + class Builder final + : public CmdBuilder { public: Builder(User* user); @@ -293,7 +299,8 @@ class CommandAddLine final CommandAddLine(Module* Creator) : ServerCommand(Creator, "ADDLINE", 6, 6) { } CmdResult Handle(User* user, Params& parameters) override; - class Builder : public CmdBuilder + class Builder final + : public CmdBuilder { public: Builder(XLine* xline, User* user = ServerInstance->FakeClient); @@ -373,7 +380,8 @@ class SpanningTree::CommandServer final CommandServer(Module* Creator) : ServerOnlyServerCommand<SpanningTree::CommandServer>(Creator, "SERVER", 3) { } CmdResult HandleServer(TreeServer* server, Params& parameters); - class Builder : public CmdBuilder + class Builder final + : public CmdBuilder { void push_property(const char* key, const std::string& val) { @@ -415,7 +423,8 @@ class CommandSInfo final CommandSInfo(Module* Creator) : ServerOnlyServerCommand<CommandSInfo>(Creator, "SINFO", 2) { } CmdResult HandleServer(TreeServer* server, Params& parameters); - class Builder : public CmdBuilder + class Builder final + : public CmdBuilder { public: Builder(TreeServer* server, const char* type, const std::string& value); @@ -430,7 +439,8 @@ class CommandNum final CmdResult HandleServer(TreeServer* server, Params& parameters); RouteDescriptor GetRouting(User* user, const Params& parameters) override; - class Builder : public CmdBuilder + class Builder final + : public CmdBuilder { public: Builder(SpanningTree::RemoteUser* target, const Numeric::Numeric& numeric); @@ -445,7 +455,7 @@ class CommandLMode final CmdResult Handle(User* user, Params& params) override; }; -class SpanningTreeCommands +class SpanningTreeCommands final { public: CommandSVSJoin svsjoin; diff --git a/src/modules/m_spanningtree/fjoin.cpp b/src/modules/m_spanningtree/fjoin.cpp index 5b2f83384..c945240f1 100644 --- a/src/modules/m_spanningtree/fjoin.cpp +++ b/src/modules/m_spanningtree/fjoin.cpp @@ -29,7 +29,8 @@ /** FJOIN builder for rebuilding incoming FJOINs and splitting them up into multiple messages if necessary */ -class FwdFJoinBuilder : public CommandFJoin::Builder +class FwdFJoinBuilder final + : public CommandFJoin::Builder { public: FwdFJoinBuilder(Channel* chan, TreeServer* server) diff --git a/src/modules/m_spanningtree/link.h b/src/modules/m_spanningtree/link.h index 7ca868fcf..a4d7dc558 100644 --- a/src/modules/m_spanningtree/link.h +++ b/src/modules/m_spanningtree/link.h @@ -26,7 +26,7 @@ #pragma once -class Link +class Link final { public: std::shared_ptr<ConfigTag> tag; @@ -48,7 +48,7 @@ class Link } }; -class Autoconnect +class Autoconnect final { public: std::shared_ptr<ConfigTag> tag; diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h index 160ee01f5..417beed7f 100644 --- a/src/modules/m_spanningtree/main.h +++ b/src/modules/m_spanningtree/main.h @@ -70,7 +70,7 @@ class Autoconnect; /** This is the main class for the spanningtree module */ -class ModuleSpanningTree +class ModuleSpanningTree final : public Module , public Away::EventListener , public Stats::EventListener diff --git a/src/modules/m_spanningtree/netburst.cpp b/src/modules/m_spanningtree/netburst.cpp index 6d1738041..3ca58221e 100644 --- a/src/modules/m_spanningtree/netburst.cpp +++ b/src/modules/m_spanningtree/netburst.cpp @@ -35,7 +35,8 @@ /** * Creates FMODE messages, used only when syncing channels */ -class FModeBuilder : public CmdBuilder +class FModeBuilder final + : public CmdBuilder { static const size_t maxline = 480; std::string params; @@ -84,7 +85,7 @@ class FModeBuilder : public CmdBuilder } }; -struct TreeSocket::BurstState +struct TreeSocket::BurstState final { SpanningTreeProtocolInterface::Server server; BurstState(TreeSocket* sock) : server(sock) { } diff --git a/src/modules/m_spanningtree/pingtimer.h b/src/modules/m_spanningtree/pingtimer.h index 9529d9b52..043a1bd93 100644 --- a/src/modules/m_spanningtree/pingtimer.h +++ b/src/modules/m_spanningtree/pingtimer.h @@ -23,7 +23,8 @@ class TreeServer; /** Handles PINGing servers and killing them on timeout */ -class PingTimer : public Timer +class PingTimer final + : public Timer { enum State { diff --git a/src/modules/m_spanningtree/protocolinterface.h b/src/modules/m_spanningtree/protocolinterface.h index e4cda3c84..e0204c93e 100644 --- a/src/modules/m_spanningtree/protocolinterface.h +++ b/src/modules/m_spanningtree/protocolinterface.h @@ -23,10 +23,12 @@ #pragma once -class SpanningTreeProtocolInterface : public ProtocolInterface +class SpanningTreeProtocolInterface final + : public ProtocolInterface { public: - class Server : public ProtocolInterface::Server + class Server final + : public ProtocolInterface::Server { TreeSocket* const sock; diff --git a/src/modules/m_spanningtree/remoteuser.h b/src/modules/m_spanningtree/remoteuser.h index c08168b98..fbf639be0 100644 --- a/src/modules/m_spanningtree/remoteuser.h +++ b/src/modules/m_spanningtree/remoteuser.h @@ -24,7 +24,8 @@ namespace SpanningTree class RemoteUser; } -class SpanningTree::RemoteUser : public ::RemoteUser +class SpanningTree::RemoteUser final + : public ::RemoteUser { public: RemoteUser(const std::string& uid, Server* srv); diff --git a/src/modules/m_spanningtree/resolvers.h b/src/modules/m_spanningtree/resolvers.h index 1c6f098e1..1bf3ce14a 100644 --- a/src/modules/m_spanningtree/resolvers.h +++ b/src/modules/m_spanningtree/resolvers.h @@ -33,7 +33,8 @@ /** Handle resolving of server IPs for the cache */ -class SecurityIPResolver : public DNS::Request +class SecurityIPResolver final + : public DNS::Request { private: std::shared_ptr<Link> MyLink; @@ -52,7 +53,8 @@ class SecurityIPResolver : public DNS::Request * callback to OnLookupComplete or OnError when completed. Once it has completed we * will have an IP address which we can then use to continue our connection. */ -class ServernameResolver : public DNS::Request +class ServernameResolver final + : public DNS::Request { private: DNS::QueryType query; diff --git a/src/modules/m_spanningtree/servercommand.h b/src/modules/m_spanningtree/servercommand.h index 7d350fc63..379dbbc19 100644 --- a/src/modules/m_spanningtree/servercommand.h +++ b/src/modules/m_spanningtree/servercommand.h @@ -23,7 +23,8 @@ #include "utils.h" #include "treeserver.h" -class ProtocolException : public ModuleException +class ProtocolException final + : public ModuleException { public: ProtocolException(const std::string& msg) @@ -34,7 +35,8 @@ class ProtocolException : public ModuleException /** Base class for server-to-server commands that may have a (remote) user source or server source. */ -class ServerCommand : public CommandBase +class ServerCommand + : public CommandBase { public: ServerCommand(Module* Creator, const std::string& Name, unsigned int MinPara = 0, unsigned int MaxPara = 0); @@ -60,7 +62,8 @@ class ServerCommand : public CommandBase * When a server sends a command of this type and the source is a server (sid), the link is aborted. */ template <class T> -class UserOnlyServerCommand : public ServerCommand +class UserOnlyServerCommand + : public ServerCommand { public: UserOnlyServerCommand(Module* Creator, const std::string& Name, unsigned int MinPara = 0, unsigned int MaxPara = 0) @@ -79,7 +82,8 @@ class UserOnlyServerCommand : public ServerCommand * When a server sends a command of this type and the source is a user (uuid), the link is aborted. */ template <class T> -class ServerOnlyServerCommand : public ServerCommand +class ServerOnlyServerCommand + : public ServerCommand { public: ServerOnlyServerCommand(Module* Creator, const std::string& Name, unsigned int MinPara = 0, unsigned int MaxPara = 0) @@ -94,7 +98,7 @@ class ServerOnlyServerCommand : public ServerCommand } }; -class ServerCommandManager +class ServerCommandManager final { typedef std::unordered_map<std::string, ServerCommand*> ServerCommandMap; ServerCommandMap commands; diff --git a/src/modules/m_spanningtree/treeserver.h b/src/modules/m_spanningtree/treeserver.h index 2ea983555..82aaa1f3c 100644 --- a/src/modules/m_spanningtree/treeserver.h +++ b/src/modules/m_spanningtree/treeserver.h @@ -43,7 +43,8 @@ * TreeServer items, deleting and inserting them as they * are created and destroyed. */ -class TreeServer : public Server +class TreeServer final + : public Server { TreeServer* Parent; /* Parent entry */ TreeServer* Route; /* Route entry */ diff --git a/src/modules/m_spanningtree/treesocket.h b/src/modules/m_spanningtree/treesocket.h index 41dd75979..fcdda2831 100644 --- a/src/modules/m_spanningtree/treesocket.h +++ b/src/modules/m_spanningtree/treesocket.h @@ -66,7 +66,7 @@ */ enum ServerState { CONNECTING, WAIT_AUTH_1, WAIT_AUTH_2, CONNECTED, DYING }; -struct CapabData +struct CapabData final { // A map of module names to their link data. typedef std::map<std::string, std::string, irc::insensitive_swo> ModuleMap; @@ -107,7 +107,8 @@ struct CapabData * type TreeSocket. During setup, the object can be found in Utils->timeoutlist; * after setup, MyRoot will have been created as a child of Utils->TreeRoot */ -class TreeSocket : public BufferedSocket +class TreeSocket final + : public BufferedSocket { struct BurstState; diff --git a/src/modules/m_spanningtree/utils.h b/src/modules/m_spanningtree/utils.h index 126d69fcb..99a89d4e2 100644 --- a/src/modules/m_spanningtree/utils.h +++ b/src/modules/m_spanningtree/utils.h @@ -45,7 +45,8 @@ typedef std::unordered_map<std::string, TreeServer*, irc::insensitive, irc::StrH /** Contains helper functions and variables for this module, * and keeps them out of the global namespace */ -class SpanningTreeUtilities : public Cullable +class SpanningTreeUtilities final + : public Cullable { CacheRefreshTimer RefreshTimer; diff --git a/src/modules/m_sqlauth.cpp b/src/modules/m_sqlauth.cpp index ba90b5cbe..817de5876 100644 --- a/src/modules/m_sqlauth.cpp +++ b/src/modules/m_sqlauth.cpp @@ -35,7 +35,8 @@ enum AuthState { AUTH_STATE_FAIL = 2 }; -class AuthQuery : public SQL::Query +class AuthQuery final + : public SQL::Query { public: const std::string uid; diff --git a/src/modules/m_sqloper.cpp b/src/modules/m_sqloper.cpp index 92f17480a..787f97515 100644 --- a/src/modules/m_sqloper.cpp +++ b/src/modules/m_sqloper.cpp @@ -28,7 +28,8 @@ #include "inspircd.h" #include "modules/sql.h" -class OperQuery : public SQL::Query +class OperQuery final + : public SQL::Query { public: // This variable will store all the OPER blocks from the DB diff --git a/src/modules/m_sslinfo.cpp b/src/modules/m_sslinfo.cpp index de46ffdde..48687be7a 100644 --- a/src/modules/m_sslinfo.cpp +++ b/src/modules/m_sslinfo.cpp @@ -32,7 +32,8 @@ #include "modules/whois.h" #include "modules/who.h" -class SSLCertExt : public ExtensionItem +class SSLCertExt final + : public ExtensionItem { public: SSLCertExt(Module* parent) @@ -114,7 +115,8 @@ class SSLCertExt : public ExtensionItem } }; -class UserCertificateAPIImpl : public UserCertificateAPIBase +class UserCertificateAPIImpl final + : public UserCertificateAPIBase { public: BoolExtItem nosslext; @@ -262,7 +264,7 @@ class CommandSSLInfo final } }; -class ModuleSSLInfo +class ModuleSSLInfo final : public Module , public WebIRC::EventListener , public Whois::EventListener diff --git a/src/modules/m_sslmodes.cpp b/src/modules/m_sslmodes.cpp index 0bee56a3f..353d6e485 100644 --- a/src/modules/m_sslmodes.cpp +++ b/src/modules/m_sslmodes.cpp @@ -40,7 +40,7 @@ enum ERR_ALLMUSTSSL = 490 }; -class SSLFPExtBan +class SSLFPExtBan final : public ExtBan::MatchingBase { private: @@ -153,7 +153,7 @@ class SSLModeUser final } }; -class ModuleSSLModes +class ModuleSSLModes final : public Module , public CTCTags::EventListener { diff --git a/src/modules/m_svshold.cpp b/src/modules/m_svshold.cpp index c8914b0bd..bbf19d4dc 100644 --- a/src/modules/m_svshold.cpp +++ b/src/modules/m_svshold.cpp @@ -37,7 +37,8 @@ namespace /** Holds a SVSHold item */ -class SVSHold : public XLine +class SVSHold final + : public XLine { public: std::string nickname; @@ -77,7 +78,8 @@ public: /** An XLineFactory specialized to generate SVSHOLD pointers */ -class SVSHoldFactory : public XLineFactory +class SVSHoldFactory final + : public XLineFactory { public: SVSHoldFactory() : XLineFactory("SVSHOLD") { } diff --git a/src/modules/m_timedbans.cpp b/src/modules/m_timedbans.cpp index 6738781f7..e6a2712d3 100644 --- a/src/modules/m_timedbans.cpp +++ b/src/modules/m_timedbans.cpp @@ -195,7 +195,7 @@ class BanWatcher final } }; -class ChannelMatcher +class ChannelMatcher final { Channel* const chan; diff --git a/src/modules/m_userip.cpp b/src/modules/m_userip.cpp index 79a9cc73f..86785113c 100644 --- a/src/modules/m_userip.cpp +++ b/src/modules/m_userip.cpp @@ -81,7 +81,7 @@ class CommandUserip final } }; -class ModuleUserIP +class ModuleUserIP final : public Module , public ISupport::EventListener { diff --git a/src/modules/m_vhost.cpp b/src/modules/m_vhost.cpp index 36f552c4c..f4d813ce7 100644 --- a/src/modules/m_vhost.cpp +++ b/src/modules/m_vhost.cpp @@ -26,7 +26,7 @@ #include "inspircd.h" -struct CustomVhost +struct CustomVhost final { const std::string name; const std::string password; diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp index e498bf79b..b00727e02 100644 --- a/src/modules/m_watch.cpp +++ b/src/modules/m_watch.cpp @@ -176,7 +176,7 @@ class CommandWatch final } }; -class ModuleWatch +class ModuleWatch final : public Module , public Away::EventListener , public ISupport::EventListener diff --git a/src/modules/m_websocket.cpp b/src/modules/m_websocket.cpp index 8bd82933d..530e4a62d 100644 --- a/src/modules/m_websocket.cpp +++ b/src/modules/m_websocket.cpp @@ -33,7 +33,7 @@ static const char newline[] = "\r\n"; static const char whitespace[] = " \t"; static dynamic_reference_nocheck<HashProvider>* sha1; -struct WebSocketConfig +struct WebSocketConfig final { enum DefaultMode { @@ -60,7 +60,8 @@ struct WebSocketConfig ProxyRanges proxyranges; }; -class WebSocketHookProvider : public IOHookProvider +class WebSocketHookProvider final + : public IOHookProvider { public: WebSocketConfig config; @@ -76,9 +77,10 @@ class WebSocketHookProvider : public IOHookProvider } }; -class WebSocketHook : public IOHookMiddle +class WebSocketHook final + : public IOHookMiddle { - class HTTPHeaderFinder + class HTTPHeaderFinder final { private: std::string::size_type bpos; diff --git a/src/modules/m_xline_db.cpp b/src/modules/m_xline_db.cpp index f3c04e127..16bc09dcd 100644 --- a/src/modules/m_xline_db.cpp +++ b/src/modules/m_xline_db.cpp @@ -31,7 +31,7 @@ #include "xline.h" #include <fstream> -class ModuleXLineDB +class ModuleXLineDB final : public Module , public Timer { |
