diff options
| author | Sadie Powell <sadie@witchery.services> | 2024-01-23 15:28:23 +0000 |
|---|---|---|
| committer | Sadie Powell <sadie@witchery.services> | 2024-01-23 15:28:23 +0000 |
| commit | a6a0f6c44780c839b2269f4f29a26ecfdbd95544 (patch) | |
| tree | d4d1fded5c14350eb003a665ca8de500a0440cea /modules/extra | |
| parent | 398d674cf40c0dba4e4cd2edd0f325ace15128c2 (diff) | |
Improve the layout of types that inherit from another type.
Diffstat (limited to 'modules/extra')
| -rw-r--r-- | modules/extra/m_ldap.cpp | 24 | ||||
| -rw-r--r-- | modules/extra/m_ldap_authentication.cpp | 12 | ||||
| -rw-r--r-- | modules/extra/m_ldap_oper.cpp | 6 | ||||
| -rw-r--r-- | modules/extra/m_mysql.cpp | 15 | ||||
| -rw-r--r-- | modules/extra/m_regex_pcre2.cpp | 9 | ||||
| -rw-r--r-- | modules/extra/m_regex_posix.cpp | 9 | ||||
| -rw-r--r-- | modules/extra/m_regex_tre.cpp | 9 | ||||
| -rw-r--r-- | modules/extra/m_sql_authentication.cpp | 6 | ||||
| -rw-r--r-- | modules/extra/m_sql_log.cpp | 3 | ||||
| -rw-r--r-- | modules/extra/m_sql_oper.cpp | 9 | ||||
| -rw-r--r-- | modules/extra/m_sqlite.cpp | 9 | ||||
| -rw-r--r-- | modules/extra/m_ssl_gnutls.cpp | 9 | ||||
| -rw-r--r-- | modules/extra/m_ssl_openssl.cpp | 9 |
13 files changed, 88 insertions, 41 deletions
diff --git a/modules/extra/m_ldap.cpp b/modules/extra/m_ldap.cpp index 799e15c6a..bdfa243f0 100644 --- a/modules/extra/m_ldap.cpp +++ b/modules/extra/m_ldap.cpp @@ -72,7 +72,8 @@ public: virtual int run() = 0; }; -class LDAPBind : public LDAPRequest +class LDAPBind + : public LDAPRequest { Anope::string who, pass; @@ -88,7 +89,8 @@ public: int run() override; }; -class LDAPSearchRequest : public LDAPRequest +class LDAPSearchRequest + : public LDAPRequest { Anope::string base; Anope::string filter; @@ -105,7 +107,8 @@ public: int run() override; }; -class LDAPAdd : public LDAPRequest +class LDAPAdd + : public LDAPRequest { Anope::string dn; LDAPMods attributes; @@ -122,7 +125,8 @@ public: int run() override; }; -class LDAPDel : public LDAPRequest +class LDAPDel + : public LDAPRequest { Anope::string dn; @@ -137,7 +141,8 @@ public: int run() override; }; -class LDAPModify : public LDAPRequest +class LDAPModify + : public LDAPRequest { Anope::string base; LDAPMods attributes; @@ -154,7 +159,10 @@ public: int run() override; }; -class LDAPService : public LDAPProvider, public Thread, public Condition +class LDAPService + : public LDAPProvider + , public Thread + , public Condition { Anope::string server; Anope::string admin_binddn; @@ -501,7 +509,9 @@ public: } }; -class ModuleLDAP : public Module, public Pipe +class ModuleLDAP + : public Module + , public Pipe { std::map<Anope::string, LDAPService *> LDAPServices; diff --git a/modules/extra/m_ldap_authentication.cpp b/modules/extra/m_ldap_authentication.cpp index 0de029cdf..f3ccb9ba7 100644 --- a/modules/extra/m_ldap_authentication.cpp +++ b/modules/extra/m_ldap_authentication.cpp @@ -36,7 +36,8 @@ struct IdentifyInfo } }; -class IdentifyInterface : public LDAPInterface +class IdentifyInterface + : public LDAPInterface { IdentifyInfo *ii; @@ -127,7 +128,8 @@ public: } }; -class OnIdentifyInterface : public LDAPInterface +class OnIdentifyInterface + : public LDAPInterface { Anope::string uid; @@ -172,7 +174,8 @@ public: } }; -class OnRegisterInterface : public LDAPInterface +class OnRegisterInterface + : public LDAPInterface { public: OnRegisterInterface(Module *m) : LDAPInterface(m) { } @@ -188,7 +191,8 @@ public: } }; -class ModuleLDAPAuthentication : public Module +class ModuleLDAPAuthentication + : public Module { ServiceReference<LDAPProvider> ldap; OnRegisterInterface orinterface; diff --git a/modules/extra/m_ldap_oper.cpp b/modules/extra/m_ldap_oper.cpp index e077215a3..b949782e1 100644 --- a/modules/extra/m_ldap_oper.cpp +++ b/modules/extra/m_ldap_oper.cpp @@ -12,7 +12,8 @@ static std::set<Oper *> my_opers; static Anope::string opertype_attribute; -class IdentifyInterface : public LDAPInterface +class IdentifyInterface + : public LDAPInterface { Reference<User> u; @@ -75,7 +76,8 @@ public: } }; -class LDAPOper : public Module +class LDAPOper + : public Module { ServiceReference<LDAPProvider> ldap; diff --git a/modules/extra/m_mysql.cpp b/modules/extra/m_mysql.cpp index 7a7adc943..2ccc36d76 100644 --- a/modules/extra/m_mysql.cpp +++ b/modules/extra/m_mysql.cpp @@ -59,7 +59,8 @@ struct QueryResult /** A MySQL result */ -class MySQLResult : public Result +class MySQLResult + : public Result { MYSQL_RES *res = nullptr; @@ -107,7 +108,8 @@ public: /** A MySQL connection, there can be multiple */ -class MySQLService : public Provider +class MySQLService + : public Provider { std::map<Anope::string, std::set<Anope::string> > active_schema; @@ -156,7 +158,9 @@ public: /** The SQL thread used to execute queries */ -class DispatcherThread : public Thread, public Condition +class DispatcherThread + : public Thread + , public Condition { public: DispatcherThread() : Thread() { } @@ -166,7 +170,10 @@ public: class ModuleSQL; static ModuleSQL *me; -class ModuleSQL : public Module, public Pipe + +class ModuleSQL + : public Module + , public Pipe { /* SQL connections */ std::map<Anope::string, MySQLService *> MySQLServices; diff --git a/modules/extra/m_regex_pcre2.cpp b/modules/extra/m_regex_pcre2.cpp index f4fa89d90..f573adaf3 100644 --- a/modules/extra/m_regex_pcre2.cpp +++ b/modules/extra/m_regex_pcre2.cpp @@ -14,7 +14,8 @@ #define PCRE2_CODE_UNIT_WIDTH 8 #include <pcre2.h> -class PCRERegex : public Regex +class PCRERegex + : public Regex { pcre2_code *regex; @@ -47,7 +48,8 @@ public: } }; -class PCRERegexProvider : public RegexProvider +class PCRERegexProvider + : public RegexProvider { public: PCRERegexProvider(Module *creator) : RegexProvider(creator, "regex/pcre") { } @@ -58,7 +60,8 @@ public: } }; -class ModuleRegexPCRE : public Module +class ModuleRegexPCRE + : public Module { PCRERegexProvider pcre_regex_provider; diff --git a/modules/extra/m_regex_posix.cpp b/modules/extra/m_regex_posix.cpp index 9569a3b46..c4217a5c4 100644 --- a/modules/extra/m_regex_posix.cpp +++ b/modules/extra/m_regex_posix.cpp @@ -10,7 +10,8 @@ #include <sys/types.h> #include <regex.h> -class POSIXRegex : public Regex +class POSIXRegex + : public Regex { regex_t regbuf; @@ -38,7 +39,8 @@ public: } }; -class POSIXRegexProvider : public RegexProvider +class POSIXRegexProvider + : public RegexProvider { public: POSIXRegexProvider(Module *creator) : RegexProvider(creator, "regex/posix") { } @@ -49,7 +51,8 @@ public: } }; -class ModuleRegexPOSIX : public Module +class ModuleRegexPOSIX + : public Module { POSIXRegexProvider posix_regex_provider; diff --git a/modules/extra/m_regex_tre.cpp b/modules/extra/m_regex_tre.cpp index 5c1745e10..61a5a79ec 100644 --- a/modules/extra/m_regex_tre.cpp +++ b/modules/extra/m_regex_tre.cpp @@ -11,7 +11,8 @@ #include "module.h" #include <tre/regex.h> -class TRERegex : public Regex +class TRERegex + : public Regex { regex_t regbuf; @@ -39,7 +40,8 @@ public: } }; -class TRERegexProvider : public RegexProvider +class TRERegexProvider + : public RegexProvider { public: TRERegexProvider(Module *creator) : RegexProvider(creator, "regex/tre") { } @@ -50,7 +52,8 @@ public: } }; -class ModuleRegexTRE : public Module +class ModuleRegexTRE + : public Module { TRERegexProvider tre_regex_provider; diff --git a/modules/extra/m_sql_authentication.cpp b/modules/extra/m_sql_authentication.cpp index 5e0ca33c2..829cf37fb 100644 --- a/modules/extra/m_sql_authentication.cpp +++ b/modules/extra/m_sql_authentication.cpp @@ -11,7 +11,8 @@ static Module *me; -class SQLAuthenticationResult : public SQL::Interface +class SQLAuthenticationResult + : public SQL::Interface { Reference<User> user; IdentifyRequest *req; @@ -73,7 +74,8 @@ public: } }; -class ModuleSQLAuthentication : public Module +class ModuleSQLAuthentication + : public Module { Anope::string engine; Anope::string query; diff --git a/modules/extra/m_sql_log.cpp b/modules/extra/m_sql_log.cpp index 7dd294898..bd8f81320 100644 --- a/modules/extra/m_sql_log.cpp +++ b/modules/extra/m_sql_log.cpp @@ -9,7 +9,8 @@ #include "module.h" #include "modules/sql.h" -class SQLLog : public Module +class SQLLog + : public Module { std::set<Anope::string> inited; Anope::string table; diff --git a/modules/extra/m_sql_oper.cpp b/modules/extra/m_sql_oper.cpp index 13a3b8521..931d1eeed 100644 --- a/modules/extra/m_sql_oper.cpp +++ b/modules/extra/m_sql_oper.cpp @@ -9,12 +9,14 @@ #include "module.h" #include "modules/sql.h" -struct SQLOper : Oper +struct SQLOper + : Oper { SQLOper(const Anope::string &n, OperType *o) : Oper(n, o) { } }; -class SQLOperResult : public SQL::Interface +class SQLOperResult + : public SQL::Interface { Reference<User> user; @@ -123,7 +125,8 @@ public: } }; -class ModuleSQLOper : public Module +class ModuleSQLOper + : public Module { Anope::string engine; Anope::string query; diff --git a/modules/extra/m_sqlite.cpp b/modules/extra/m_sqlite.cpp index 7abfc2f52..9905d2073 100644 --- a/modules/extra/m_sqlite.cpp +++ b/modules/extra/m_sqlite.cpp @@ -19,7 +19,8 @@ using namespace SQL; /** A SQLite result */ -class SQLiteResult : public Result +class SQLiteResult + : public Result { public: SQLiteResult(unsigned int i, const Query &q, const Anope::string &fq) : Result(i, q, fq) @@ -38,7 +39,8 @@ public: /** A SQLite database, there can be multiple */ -class SQLiteService : public Provider +class SQLiteService + : public Provider { std::map<Anope::string, std::set<Anope::string> > active_schema; @@ -68,7 +70,8 @@ public: Anope::string FromUnixtime(time_t) override; }; -class ModuleSQLite : public Module +class ModuleSQLite + : public Module { /* SQL connections */ std::map<Anope::string, SQLiteService *> SQLiteServices; diff --git a/modules/extra/m_ssl_gnutls.cpp b/modules/extra/m_ssl_gnutls.cpp index 87b182285..6daad09db 100644 --- a/modules/extra/m_ssl_gnutls.cpp +++ b/modules/extra/m_ssl_gnutls.cpp @@ -22,7 +22,8 @@ static GnuTLSModule *me; namespace GnuTLS { class X509CertCredentials; } -class MySSLService : public SSLService +class MySSLService + : public SSLService { public: MySSLService(Module *o, const Anope::string &n); @@ -33,7 +34,8 @@ public: void Init(Socket *s) override; }; -class SSLSocketIO : public SocketIO +class SSLSocketIO + : public SocketIO { public: gnutls_session_t sess = nullptr; @@ -284,7 +286,8 @@ namespace GnuTLS }; } -class GnuTLSModule : public Module +class GnuTLSModule + : public Module { GnuTLS::Init libinit; diff --git a/modules/extra/m_ssl_openssl.cpp b/modules/extra/m_ssl_openssl.cpp index 12cff478b..470f5f43f 100644 --- a/modules/extra/m_ssl_openssl.cpp +++ b/modules/extra/m_ssl_openssl.cpp @@ -23,7 +23,8 @@ static SSL_CTX *server_ctx, *client_ctx; -class MySSLService : public SSLService +class MySSLService + : public SSLService { public: MySSLService(Module *o, const Anope::string &n); @@ -34,7 +35,8 @@ public: void Init(Socket *s) override; }; -class SSLSocketIO : public SocketIO +class SSLSocketIO + : public SocketIO { public: /* The SSL socket for this socket */ @@ -91,7 +93,8 @@ public: class SSLModule; static SSLModule *me; -class SSLModule : public Module +class SSLModule + : public Module { Anope::string certfile, keyfile; |
