aboutsummaryrefslogtreecommitdiffstats
path: root/include/modules
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-12-20 20:00:03 +0000
committerGravatar Sadie Powell2021-12-20 20:19:40 +0000
commit421e8c8c793740aaf34feff761716c1c51d8f04e (patch)
treeb3bf0e3e8c3b7fd2beeefbe89fff8f25b12f2846 /include/modules
parentDeduplicate xline adding code in the dnsbl module. (diff)
Add the final keyword to all remaining classes that can have it.
Diffstat (limited to 'include/modules')
-rw-r--r--include/modules/account.h3
-rw-r--r--include/modules/away.h2
-rw-r--r--include/modules/callerid.h6
-rw-r--r--include/modules/ctctags.h8
-rw-r--r--include/modules/exemption.h2
-rw-r--r--include/modules/extban.h2
-rw-r--r--include/modules/geolocation.h9
-rw-r--r--include/modules/hash.h3
-rw-r--r--include/modules/httpd.h23
-rw-r--r--include/modules/invite.h9
-rw-r--r--include/modules/ircv3.h6
-rw-r--r--include/modules/ircv3_batch.h12
-rw-r--r--include/modules/ircv3_replies.h8
-rw-r--r--include/modules/ircv3_servertime.h6
-rw-r--r--include/modules/isupport.h2
-rw-r--r--include/modules/ldap.h13
-rw-r--r--include/modules/names.h3
-rw-r--r--include/modules/shun.h3
-rw-r--r--include/modules/sql.h11
-rw-r--r--include/modules/ssl.h17
-rw-r--r--include/modules/stats.h8
-rw-r--r--include/modules/who.h3
-rw-r--r--include/modules/whois.h6
23 files changed, 104 insertions, 61 deletions
diff --git a/include/modules/account.h b/include/modules/account.h
index eb478b948..6fedd889f 100644
--- a/include/modules/account.h
+++ b/include/modules/account.h
@@ -36,7 +36,8 @@ inline AccountExtItem* GetAccountExtItem()
return static_cast<AccountExtItem*>(ServerInstance->Extensions.GetItem("accountname"));
}
-class AccountEventListener : public Events::ModuleEventListener
+class AccountEventListener
+ : public Events::ModuleEventListener
{
public:
AccountEventListener(Module* mod)
diff --git a/include/modules/away.h b/include/modules/away.h
index 563b599fe..c99ea18e5 100644
--- a/include/modules/away.h
+++ b/include/modules/away.h
@@ -71,7 +71,7 @@ class Away::EventListener
virtual void OnUserBack(User* user) = 0;
};
-class Away::EventProvider
+class Away::EventProvider final
: public Events::ModuleEventProvider
{
public:
diff --git a/include/modules/callerid.h b/include/modules/callerid.h
index 989a5918c..7b69d137f 100644
--- a/include/modules/callerid.h
+++ b/include/modules/callerid.h
@@ -25,7 +25,8 @@ namespace CallerID
class API;
}
-class CallerID::APIBase : public DataProvider
+class CallerID::APIBase
+ : public DataProvider
{
public:
APIBase(Module* parent)
@@ -41,7 +42,8 @@ class CallerID::APIBase : public DataProvider
virtual bool IsOnAcceptList(User* source, User* target) = 0;
};
-class CallerID::API : public dynamic_reference<CallerID::APIBase>
+class CallerID::API final
+ : public dynamic_reference<CallerID::APIBase>
{
public:
API(Module* parent)
diff --git a/include/modules/ctctags.h b/include/modules/ctctags.h
index fc8f952ce..bf7d373e4 100644
--- a/include/modules/ctctags.h
+++ b/include/modules/ctctags.h
@@ -30,7 +30,8 @@ namespace CTCTags
class TagMessageDetails;
}
-class CTCTags::CapReference : public Cap::Reference
+class CTCTags::CapReference final
+ : public Cap::Reference
{
public:
CapReference(Module* mod)
@@ -39,7 +40,8 @@ class CTCTags::CapReference : public Cap::Reference
}
};
-class CTCTags::TagMessage : public ClientProtocol::Message
+class CTCTags::TagMessage final
+ : public ClientProtocol::Message
{
private:
void PushTarget(const char* target, char status)
@@ -87,7 +89,7 @@ private:
}
};
-class CTCTags::TagMessageDetails
+class CTCTags::TagMessageDetails final
{
public:
/** Whether to echo the tags at all. */
diff --git a/include/modules/exemption.h b/include/modules/exemption.h
index a0e32e9e0..9fa059f7b 100644
--- a/include/modules/exemption.h
+++ b/include/modules/exemption.h
@@ -57,7 +57,7 @@ class CheckExemption::EventListener
virtual ModResult OnCheckExemption(User* user, Channel* chan, const std::string& restriction) = 0;
};
-class CheckExemption::EventProvider
+class CheckExemption::EventProvider final
: public Events::ModuleEventProvider
{
public:
diff --git a/include/modules/extban.h b/include/modules/extban.h
index 4f0031aef..5bf491d13 100644
--- a/include/modules/extban.h
+++ b/include/modules/extban.h
@@ -188,7 +188,7 @@ class ExtBan::Base
};
/** Base class for acting extbans. */
-class ExtBan::Acting
+class ExtBan::Acting final
: public Base
{
public:
diff --git a/include/modules/geolocation.h b/include/modules/geolocation.h
index f6363ba40..b40ee8074 100644
--- a/include/modules/geolocation.h
+++ b/include/modules/geolocation.h
@@ -26,7 +26,8 @@ namespace Geolocation
class Location;
}
-class Geolocation::APIBase : public DataProvider
+class Geolocation::APIBase
+ : public DataProvider
{
public:
APIBase(Module* parent)
@@ -47,7 +48,8 @@ class Geolocation::APIBase : public DataProvider
virtual Location* GetLocation(irc::sockets::sockaddrs& sa) = 0;
};
-class Geolocation::API : public dynamic_reference<Geolocation::APIBase>
+class Geolocation::API final
+ : public dynamic_reference<Geolocation::APIBase>
{
public:
API(Module* parent)
@@ -56,7 +58,8 @@ class Geolocation::API : public dynamic_reference<Geolocation::APIBase>
}
};
-class Geolocation::Location : public usecountbase
+class Geolocation::Location final
+ : public usecountbase
{
private:
/** The two character country code for this location. */
diff --git a/include/modules/hash.h b/include/modules/hash.h
index 5799b9160..2c176868f 100644
--- a/include/modules/hash.h
+++ b/include/modules/hash.h
@@ -26,7 +26,8 @@
#include "modules.h"
-class HashProvider : public DataProvider
+class HashProvider
+ : public DataProvider
{
public:
const unsigned int out_size;
diff --git a/include/modules/httpd.h b/include/modules/httpd.h
index 145dd70b3..92b2d855f 100644
--- a/include/modules/httpd.h
+++ b/include/modules/httpd.h
@@ -33,7 +33,8 @@
#include <sstream>
#include <map>
-class HTTPQueryParameters : public insp::flat_multimap<std::string, std::string>
+class HTTPQueryParameters final
+ : public insp::flat_multimap<std::string, std::string>
{
public:
bool get(const std::string& key, std::string& value) const
@@ -80,7 +81,7 @@ class HTTPQueryParameters : public insp::flat_multimap<std::string, std::string>
}
};
-struct HTTPRequestURI
+struct HTTPRequestURI final
{
std::string path;
HTTPQueryParameters query_params;
@@ -89,7 +90,7 @@ struct HTTPRequestURI
/** A modifiable list of HTTP header fields
*/
-class HTTPHeaders
+class HTTPHeaders final
{
protected:
std::map<std::string,std::string> headers;
@@ -163,7 +164,7 @@ class HttpServerSocket;
/** This class represents a HTTP request.
*/
-class HTTPRequest
+class HTTPRequest final
{
protected:
std::string type;
@@ -245,7 +246,7 @@ class HTTPRequest
* form a valid HTTP response: the document data and a response code.
* You can add additional HTTP headers, if you want.
*/
-class HTTPDocumentResponse
+class HTTPDocumentResponse final
{
public:
/** Module that generated this reply
@@ -274,7 +275,8 @@ class HTTPDocumentResponse
}
};
-class HTTPdAPIBase : public DataProvider
+class HTTPdAPIBase
+ : public DataProvider
{
public:
HTTPdAPIBase(Module* parent)
@@ -291,7 +293,8 @@ class HTTPdAPIBase : public DataProvider
/** The API provided by the httpd module that allows other modules to respond to incoming
* HTTP requests
*/
-class HTTPdAPI : public dynamic_reference<HTTPdAPIBase>
+class HTTPdAPI final
+ : public dynamic_reference<HTTPdAPIBase>
{
public:
HTTPdAPI(Module* parent)
@@ -300,7 +303,8 @@ class HTTPdAPI : public dynamic_reference<HTTPdAPIBase>
}
};
-class HTTPACLEventListener : public Events::ModuleEventListener
+class HTTPACLEventListener
+ : public Events::ModuleEventListener
{
public:
HTTPACLEventListener(Module* mod)
@@ -311,7 +315,8 @@ class HTTPACLEventListener : public Events::ModuleEventListener
virtual ModResult OnHTTPACLCheck(HTTPRequest& req) = 0;
};
-class HTTPRequestEventListener : public Events::ModuleEventListener
+class HTTPRequestEventListener
+ : public Events::ModuleEventListener
{
public:
HTTPRequestEventListener(Module* mod)
diff --git a/include/modules/invite.h b/include/modules/invite.h
index 5786f7dc3..1e8f417c4 100644
--- a/include/modules/invite.h
+++ b/include/modules/invite.h
@@ -29,7 +29,8 @@ namespace Invite
typedef insp::intrusive_list<Invite, LocalUser> List;
}
-class Invite::APIBase : public DataProvider
+class Invite::APIBase
+ : public DataProvider
{
public:
APIBase(Module* parent);
@@ -72,7 +73,8 @@ class Invite::APIBase : public DataProvider
virtual bool Remove(LocalUser* user, Channel* chan) = 0;
};
-class Invite::API : public dynamic_reference<APIBase>
+class Invite::API final
+ : public dynamic_reference<APIBase>
{
public:
API(Module* parent)
@@ -85,7 +87,8 @@ class Invite::API : public dynamic_reference<APIBase>
* The Invite class contains all data about a pending invite.
* Invite objects are referenced from the user and the channel they belong to.
*/
-class Invite::Invite : public insp::intrusive_list_node<Invite, LocalUser>, public insp::intrusive_list_node<Invite, Channel>
+class Invite::Invite final
+ : public insp::intrusive_list_node<Invite, LocalUser>, public insp::intrusive_list_node<Invite, Channel>
{
public:
/** User the invite is for
diff --git a/include/modules/ircv3.h b/include/modules/ircv3.h
index 06144835f..35be3a4ea 100644
--- a/include/modules/ircv3.h
+++ b/include/modules/ircv3.h
@@ -29,7 +29,8 @@ namespace IRCv3
class CapTag;
}
-class IRCv3::WriteNeighborsWithCap : public User::ForEachNeighborHandler
+class IRCv3::WriteNeighborsWithCap final
+ : public User::ForEachNeighborHandler
{
private:
const Cap::Capability& cap;
@@ -70,7 +71,8 @@ class IRCv3::WriteNeighborsWithCap : public User::ForEachNeighborHandler
* Template parameter T is the derived class.
*/
template <typename T>
-class IRCv3::CapTag : public ClientProtocol::MessageTagProvider
+class IRCv3::CapTag
+ : public ClientProtocol::MessageTagProvider
{
protected:
Cap::Capability cap;
diff --git a/include/modules/ircv3_batch.h b/include/modules/ircv3_batch.h
index 073fb535f..27cbe1d9b 100644
--- a/include/modules/ircv3_batch.h
+++ b/include/modules/ircv3_batch.h
@@ -43,7 +43,9 @@ namespace IRCv3
* Implements batch starting and stopping. When it becomes unavailable (due to e.g. module unload)
* all running batches are stopped.
*/
-class IRCv3::Batch::Manager : public DataProvider, public ClientProtocol::MessageTagProvider
+class IRCv3::Batch::Manager
+ : public DataProvider
+ , public ClientProtocol::MessageTagProvider
{
public:
/** Constructor.
@@ -81,7 +83,7 @@ class IRCv3::Batch::Manager : public DataProvider, public ClientProtocol::Messag
* batch message for B.
* A message may only be part of a single batch at any given time.
*/
-class IRCv3::Batch::Batch
+class IRCv3::Batch::Batch final
{
Manager* manager = nullptr;
const std::string type;
@@ -171,7 +173,8 @@ class IRCv3::Batch::Batch
/** Batch API. Use this to access the Manager.
*/
-class IRCv3::Batch::API : public dynamic_reference_nocheck<Manager>
+class IRCv3::Batch::API final
+ : public dynamic_reference_nocheck<Manager>
{
public:
API(Module* mod)
@@ -183,7 +186,8 @@ class IRCv3::Batch::API : public dynamic_reference_nocheck<Manager>
/** Reference to the batch cap.
* Can be used to check whether a user has the batch client cap enabled.
*/
-class IRCv3::Batch::CapReference : public Cap::Reference
+class IRCv3::Batch::CapReference final
+ : public Cap::Reference
{
public:
CapReference(Module* mod)
diff --git a/include/modules/ircv3_replies.h b/include/modules/ircv3_replies.h
index fc4c7f5dd..7bf594170 100644
--- a/include/modules/ircv3_replies.h
+++ b/include/modules/ircv3_replies.h
@@ -34,7 +34,7 @@ namespace IRCv3
}
/** Reference to the inspircd.org/standard-replies cap. */
-class IRCv3::Replies::CapReference
+class IRCv3::Replies::CapReference final
: public Cap::Reference
{
public:
@@ -128,7 +128,7 @@ class IRCv3::Replies::Reply
};
/** Sends a FAIL standard reply. */
-class IRCv3::Replies::Fail
+class IRCv3::Replies::Fail final
: public IRCv3::Replies::Reply
{
public:
@@ -142,7 +142,7 @@ public:
};
/** Sends a NOTE standard reply. */
-class IRCv3::Replies::Note
+class IRCv3::Replies::Note final
: public IRCv3::Replies::Reply
{
public:
@@ -156,7 +156,7 @@ public:
};
/** Sends a WARN standard reply. */
-class IRCv3::Replies::Warn
+class IRCv3::Replies::Warn final
: public IRCv3::Replies::Reply
{
public:
diff --git a/include/modules/ircv3_servertime.h b/include/modules/ircv3_servertime.h
index 4befbaaba..7737b35d4 100644
--- a/include/modules/ircv3_servertime.h
+++ b/include/modules/ircv3_servertime.h
@@ -46,7 +46,8 @@ namespace IRCv3
* was generated by us. If a message has server time attached then recipient clients who have negotiated
* the appropriate protocol extension will receive it.
*/
-class IRCv3::ServerTime::Manager : public DataProvider
+class IRCv3::ServerTime::Manager
+ : public DataProvider
{
protected:
ClientProtocol::MessageTagProvider* tagprov;
@@ -82,7 +83,8 @@ class IRCv3::ServerTime::Manager : public DataProvider
/** Server time API. Use this to access the Manager.
*/
-class IRCv3::ServerTime::API : public dynamic_reference_nocheck<Manager>
+class IRCv3::ServerTime::API final
+ : public dynamic_reference_nocheck<Manager>
{
public:
API(Module* mod)
diff --git a/include/modules/isupport.h b/include/modules/isupport.h
index 3b9d4b3c5..ad92a9a30 100644
--- a/include/modules/isupport.h
+++ b/include/modules/isupport.h
@@ -43,7 +43,7 @@ class ISupport::EventListener
virtual void OnBuildISupport(TokenMap& tokens) = 0;
};
-class ISupport::EventProvider
+class ISupport::EventProvider final
: public Events::ModuleEventProvider
{
public:
diff --git a/include/modules/ldap.h b/include/modules/ldap.h
index ce3f750a9..760cc4ec2 100644
--- a/include/modules/ldap.h
+++ b/include/modules/ldap.h
@@ -20,7 +20,8 @@
typedef int LDAPQuery;
-class LDAPException : public ModuleException
+class LDAPException final
+ : public ModuleException
{
public:
LDAPException(const std::string& reason) : ModuleException(reason) { }
@@ -28,7 +29,7 @@ class LDAPException : public ModuleException
virtual ~LDAPException() noexcept = default;
};
-struct LDAPModification
+struct LDAPModification final
{
enum LDAPOperation
{
@@ -44,7 +45,8 @@ struct LDAPModification
typedef std::vector<LDAPModification> LDAPMods;
-struct LDAPAttributes : public std::map<std::string, std::vector<std::string> >
+struct LDAPAttributes final
+ : public std::map<std::string, std::vector<std::string> >
{
size_t size(const std::string& attr) const
{
@@ -88,7 +90,7 @@ enum QueryType
QUERY_COMPARE
};
-struct LDAPResult
+struct LDAPResult final
{
std::vector<LDAPAttributes> messages;
std::string error;
@@ -136,7 +138,8 @@ class LDAPInterface
virtual void OnError(const LDAPResult& err) = 0;
};
-class LDAPProvider : public DataProvider
+class LDAPProvider
+ : public DataProvider
{
public:
LDAPProvider(Module* Creator, const std::string& Name)
diff --git a/include/modules/names.h b/include/modules/names.h
index de21ffade..6f21221ac 100644
--- a/include/modules/names.h
+++ b/include/modules/names.h
@@ -26,7 +26,8 @@ namespace Names
class EventListener;
}
-class Names::EventListener : public Events::ModuleEventListener
+class Names::EventListener
+ : public Events::ModuleEventListener
{
public:
EventListener(Module* mod)
diff --git a/include/modules/shun.h b/include/modules/shun.h
index f4f7b8010..d49c141da 100644
--- a/include/modules/shun.h
+++ b/include/modules/shun.h
@@ -24,7 +24,8 @@
/** Shun class
*/
-class Shun : public XLine
+class Shun final
+ : public XLine
{
public:
/** Create a Shun.
diff --git a/include/modules/sql.h b/include/modules/sql.h
index 46b074862..3447dc8e4 100644
--- a/include/modules/sql.h
+++ b/include/modules/sql.h
@@ -69,7 +69,8 @@ namespace SQL
}
/** Represents the result of an SQL query. */
-class SQL::Result : public Cullable
+class SQL::Result
+ : public Cullable
{
public:
/**
@@ -108,7 +109,7 @@ class SQL::Result : public Cullable
* The error string varies from database software to database software
* and should be used to display informational error messages to users.
*/
-class SQL::Error
+class SQL::Error final
{
private:
/** The custom error message if one has been specified. */
@@ -166,7 +167,8 @@ class SQL::Error
* You should store whatever information is needed to have the callbacks work in
* this object (UID of user, channel name, etc).
*/
-class SQL::Query : public Cullable
+class SQL::Query
+ : public Cullable
{
protected:
/** Creates a new SQL query. */
@@ -195,7 +197,8 @@ class SQL::Query : public Cullable
/**
* Provider object for SQL servers
*/
-class SQL::Provider : public DataProvider
+class SQL::Provider
+ : public DataProvider
{
private:
/** The name of the database tag in the config. */
diff --git a/include/modules/ssl.h b/include/modules/ssl.h
index 17d76d240..2b812700e 100644
--- a/include/modules/ssl.h
+++ b/include/modules/ssl.h
@@ -39,7 +39,8 @@
* in a unified manner. These classes are attached to ssl-
* connected local users using SSLCertExt
*/
-class ssl_cert : public refcountbase
+class ssl_cert final
+ : public refcountbase
{
public:
std::string dn;
@@ -141,7 +142,8 @@ class ssl_cert : public refcountbase
};
/** I/O hook provider for TLS modules. */
-class SSLIOHookProvider : public IOHookProvider
+class SSLIOHookProvider
+ : public IOHookProvider
{
public:
SSLIOHookProvider(Module* mod, const std::string& Name)
@@ -150,7 +152,8 @@ public:
}
};
-class SSLIOHook : public IOHook
+class SSLIOHook
+ : public IOHook
{
protected:
/** An enumeration of possible TLS socket states. */
@@ -254,7 +257,7 @@ class SSLIOHook : public IOHook
/** Helper functions for obtaining TLS client certificates and key fingerprints
* from StreamSockets
*/
-class SSLClientCert
+class SSLClientCert final
{
public:
/**
@@ -287,7 +290,8 @@ class SSLClientCert
}
};
-class UserCertificateAPIBase : public DataProvider
+class UserCertificateAPIBase
+ : public DataProvider
{
public:
UserCertificateAPIBase(Module* parent)
@@ -325,7 +329,8 @@ class UserCertificateAPIBase : public DataProvider
* information of local and remote users. It can also be used to find out whether a
* user is using TLS or not.
*/
-class UserCertificateAPI : public dynamic_reference<UserCertificateAPIBase>
+class UserCertificateAPI final
+ : public dynamic_reference<UserCertificateAPIBase>
{
public:
UserCertificateAPI(Module* parent)
diff --git a/include/modules/stats.h b/include/modules/stats.h
index 9a55012eb..e6a29a126 100644
--- a/include/modules/stats.h
+++ b/include/modules/stats.h
@@ -29,7 +29,8 @@ namespace Stats
class Row;
}
-class Stats::EventListener : public Events::ModuleEventListener
+class Stats::EventListener
+ : public Events::ModuleEventListener
{
public:
EventListener(Module* mod)
@@ -44,7 +45,8 @@ class Stats::EventListener : public Events::ModuleEventListener
virtual ModResult OnStats(Stats::Context& stats) = 0;
};
-class Stats::Row : public Numeric::Numeric
+class Stats::Row final
+ : public Numeric::Numeric
{
public:
Row(unsigned int num)
@@ -53,7 +55,7 @@ class Stats::Row : public Numeric::Numeric
}
};
-class Stats::Context
+class Stats::Context final
{
/** Source user of the STATS request
*/
diff --git a/include/modules/who.h b/include/modules/who.h
index 1913aeaeb..e74d878be 100644
--- a/include/modules/who.h
+++ b/include/modules/who.h
@@ -28,7 +28,8 @@ namespace Who
class Request;
}
-class Who::EventListener : public Events::ModuleEventListener
+class Who::EventListener
+ : public Events::ModuleEventListener
{
public:
EventListener(Module* mod)
diff --git a/include/modules/whois.h b/include/modules/whois.h
index 891ecd6de..7b066c53a 100644
--- a/include/modules/whois.h
+++ b/include/modules/whois.h
@@ -62,7 +62,8 @@ enum
RPL_WHOISSECURE = 671
};
-class Whois::EventListener : public Events::ModuleEventListener
+class Whois::EventListener
+ : public Events::ModuleEventListener
{
public:
EventListener(Module* mod)
@@ -76,7 +77,8 @@ class Whois::EventListener : public Events::ModuleEventListener
virtual void OnWhois(Context& whois) = 0;
};
-class Whois::LineEventListener : public Events::ModuleEventListener
+class Whois::LineEventListener
+ : public Events::ModuleEventListener
{
public:
LineEventListener(Module* mod)