diff options
| author | Adam <Adam@anope.org> | 2014-04-01 22:24:50 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2014-04-01 22:24:50 -0400 |
| commit | 44637154da89028a99920bd6ead5d917d8a894a4 (patch) | |
| tree | cb2bd670800efb25beb2c71983b1db49a3f78d49 /modules/extra | |
| parent | b12a51a430b00e857cc5568c9fd994bbd88c8ff7 (diff) | |
Require cmake 2.8 and C++11 support
Diffstat (limited to 'modules/extra')
| -rw-r--r-- | modules/extra/m_ldap.cpp | 18 | ||||
| -rw-r--r-- | modules/extra/m_ldap_authentication.cpp | 22 | ||||
| -rw-r--r-- | modules/extra/m_ldap_oper.cpp | 10 | ||||
| -rw-r--r-- | modules/extra/m_mysql.cpp | 18 | ||||
| -rw-r--r-- | modules/extra/m_regex_pcre.cpp | 2 | ||||
| -rw-r--r-- | modules/extra/m_regex_posix.cpp | 2 | ||||
| -rw-r--r-- | modules/extra/m_regex_tre.cpp | 2 | ||||
| -rw-r--r-- | modules/extra/m_sasl_dh-aes.cpp | 4 | ||||
| -rw-r--r-- | modules/extra/m_sasl_dh-blowfish.cpp | 4 | ||||
| -rw-r--r-- | modules/extra/m_sql_authentication.cpp | 10 | ||||
| -rw-r--r-- | modules/extra/m_sql_log.cpp | 4 | ||||
| -rw-r--r-- | modules/extra/m_sql_oper.cpp | 8 | ||||
| -rw-r--r-- | modules/extra/m_sqlite.cpp | 6 | ||||
| -rw-r--r-- | modules/extra/m_ssl_gnutls.cpp | 20 | ||||
| -rw-r--r-- | modules/extra/m_ssl_openssl.cpp | 20 | ||||
| -rw-r--r-- | modules/extra/stats/cs_fantasy_stats.cpp | 6 | ||||
| -rw-r--r-- | modules/extra/stats/cs_fantasy_top.cpp | 6 | ||||
| -rw-r--r-- | modules/extra/stats/irc2sql/irc2sql.h | 46 | ||||
| -rw-r--r-- | modules/extra/stats/m_chanstats.cpp | 38 |
19 files changed, 123 insertions, 123 deletions
diff --git a/modules/extra/m_ldap.cpp b/modules/extra/m_ldap.cpp index 7dc6bc038..eb5589032 100644 --- a/modules/extra/m_ldap.cpp +++ b/modules/extra/m_ldap.cpp @@ -131,7 +131,7 @@ class LDAPService : public LDAPProvider, public Thread, public Condition return this->Bind(i, this->admin_binddn, this->admin_pass); } - LDAPQuery Bind(LDAPInterface *i, const Anope::string &who, const Anope::string &pass) anope_override + LDAPQuery Bind(LDAPInterface *i, const Anope::string &who, const Anope::string &pass) override { berval cred; cred.bv_val = strdup(pass.c_str()); @@ -162,7 +162,7 @@ class LDAPService : public LDAPProvider, public Thread, public Condition return msgid; } - LDAPQuery Search(LDAPInterface *i, const Anope::string &base, const Anope::string &filter) anope_override + LDAPQuery Search(LDAPInterface *i, const Anope::string &base, const Anope::string &filter) override { if (i == NULL) throw LDAPException("No interface"); @@ -188,7 +188,7 @@ class LDAPService : public LDAPProvider, public Thread, public Condition return msgid; } - LDAPQuery Add(LDAPInterface *i, const Anope::string &dn, LDAPMods &attributes) anope_override + LDAPQuery Add(LDAPInterface *i, const Anope::string &dn, LDAPMods &attributes) override { LDAPMod **mods = this->BuildMods(attributes); LDAPQuery msgid; @@ -217,7 +217,7 @@ class LDAPService : public LDAPProvider, public Thread, public Condition return msgid; } - LDAPQuery Del(LDAPInterface *i, const Anope::string &dn) anope_override + LDAPQuery Del(LDAPInterface *i, const Anope::string &dn) override { LDAPQuery msgid; int ret = ldap_delete_ext(this->con, dn.c_str(), NULL, NULL, &msgid); @@ -244,7 +244,7 @@ class LDAPService : public LDAPProvider, public Thread, public Condition return msgid; } - LDAPQuery Modify(LDAPInterface *i, const Anope::string &base, LDAPMods &attributes) anope_override + LDAPQuery Modify(LDAPInterface *i, const Anope::string &base, LDAPMods &attributes) override { LDAPMod **mods = this->BuildMods(attributes); LDAPQuery msgid; @@ -300,7 +300,7 @@ class LDAPService : public LDAPProvider, public Thread, public Condition } public: - void Run() anope_override + void Run() override { while (!this->GetExitState()) { @@ -466,7 +466,7 @@ class ModuleLDAP : public Module, public Pipe LDAPServices.clear(); } - void OnReload(Configuration::Conf *config) anope_override + void OnReload(Configuration::Conf *config) override { Configuration::Block *conf = config->GetModule(this); @@ -522,7 +522,7 @@ class ModuleLDAP : public Module, public Pipe } } - void OnModuleUnload(User *, Module *m) anope_override + void OnModuleUnload(User *, Module *m) override { for (std::map<Anope::string, LDAPService *>::iterator it = this->LDAPServices.begin(); it != this->LDAPServices.end(); ++it) { @@ -555,7 +555,7 @@ class ModuleLDAP : public Module, public Pipe } } - void OnNotify() anope_override + void OnNotify() override { for (std::map<Anope::string, LDAPService *>::iterator it = this->LDAPServices.begin(); it != this->LDAPServices.end(); ++it) { diff --git a/modules/extra/m_ldap_authentication.cpp b/modules/extra/m_ldap_authentication.cpp index 7c9593dff..1a4feb232 100644 --- a/modules/extra/m_ldap_authentication.cpp +++ b/modules/extra/m_ldap_authentication.cpp @@ -43,7 +43,7 @@ class IdentifyInterface : public LDAPInterface this->requests[id] = ii; } - void OnResult(const LDAPResult &r) anope_override + void OnResult(const LDAPResult &r) override { std::map<LDAPQuery, IdentifyInfo *>::iterator it = this->requests.find(r.id); if (it == this->requests.end()) @@ -124,7 +124,7 @@ class IdentifyInterface : public LDAPInterface delete ii; } - void OnError(const LDAPResult &r) anope_override + void OnError(const LDAPResult &r) override { std::map<LDAPQuery, IdentifyInfo *>::iterator it = this->requests.find(r.id); if (it == this->requests.end()) @@ -147,7 +147,7 @@ class OnIdentifyInterface : public LDAPInterface this->requests[id] = nick; } - void OnResult(const LDAPResult &r) anope_override + void OnResult(const LDAPResult &r) override { std::map<LDAPQuery, Anope::string>::iterator it = this->requests.find(r.id); if (it == this->requests.end()) @@ -178,7 +178,7 @@ class OnIdentifyInterface : public LDAPInterface } } - void OnError(const LDAPResult &r) anope_override + void OnError(const LDAPResult &r) override { this->requests.erase(r.id); Log(this->owner) << r.error; @@ -190,12 +190,12 @@ class OnRegisterInterface : public LDAPInterface public: OnRegisterInterface(Module *m) : LDAPInterface(m) { } - void OnResult(const LDAPResult &r) anope_override + void OnResult(const LDAPResult &r) override { Log(this->owner) << "Successfully added newly created account to LDAP"; } - void OnError(const LDAPResult &r) anope_override + void OnError(const LDAPResult &r) override { Log(this->owner) << "Error adding newly created account to LDAP: " << r.getError(); } @@ -224,7 +224,7 @@ class NSIdentifyLDAP : public Module ModuleManager::SetPriority(this, PRIORITY_FIRST); } - void OnReload(Configuration::Conf *config) anope_override + void OnReload(Configuration::Conf *config) override { Configuration::Block *conf = Config->GetModule(this); @@ -242,7 +242,7 @@ class NSIdentifyLDAP : public Module config->GetModule("nickserv")->Set("forceemail", "false"); } - EventReturn OnPreCommand(CommandSource &source, Command *command, std::vector<Anope::string> ¶ms) anope_override + EventReturn OnPreCommand(CommandSource &source, Command *command, std::vector<Anope::string> ¶ms) override { if (!this->disable_register_reason.empty()) { @@ -262,7 +262,7 @@ class NSIdentifyLDAP : public Module return EVENT_CONTINUE; } - void OnCheckAuthentication(User *u, IdentifyRequest *req) anope_override + void OnCheckAuthentication(User *u, IdentifyRequest *req) override { if (!this->ldap) return; @@ -280,7 +280,7 @@ class NSIdentifyLDAP : public Module } } - void OnNickIdentify(User *u) anope_override + void OnNickIdentify(User *u) override { if (email_attribute.empty() || !this->ldap) return; @@ -300,7 +300,7 @@ class NSIdentifyLDAP : public Module } } - void OnNickRegister(User *, NickAlias *na) anope_override + void OnNickRegister(User *, NickAlias *na) override { if (!this->disable_register_reason.empty() || !this->ldap) return; diff --git a/modules/extra/m_ldap_oper.cpp b/modules/extra/m_ldap_oper.cpp index 3e16d75e6..e265bfd9d 100644 --- a/modules/extra/m_ldap_oper.cpp +++ b/modules/extra/m_ldap_oper.cpp @@ -18,7 +18,7 @@ class IdentifyInterface : public LDAPInterface this->requests[id] = nick; } - void OnResult(const LDAPResult &r) anope_override + void OnResult(const LDAPResult &r) override { std::map<LDAPQuery, Anope::string>::iterator it = this->requests.find(r.id); if (it == this->requests.end()) @@ -69,7 +69,7 @@ class IdentifyInterface : public LDAPInterface } } - void OnError(const LDAPResult &r) anope_override + void OnError(const LDAPResult &r) override { this->requests.erase(r.id); } @@ -91,7 +91,7 @@ class LDAPOper : public Module } - void OnReload(Configuration::Conf *conf) anope_override + void OnReload(Configuration::Conf *conf) override { Configuration::Block *config = Config->GetModule(this); @@ -106,7 +106,7 @@ class LDAPOper : public Module my_opers.clear(); } - void OnNickIdentify(User *u) anope_override + void OnNickIdentify(User *u) override { try { @@ -126,7 +126,7 @@ class LDAPOper : public Module } } - void OnDelCore(NickCore *nc) anope_override + void OnDelCore(NickCore *nc) override { if (nc->o != NULL && my_opers.count(nc->o) > 0) { diff --git a/modules/extra/m_mysql.cpp b/modules/extra/m_mysql.cpp index ceb7af0ef..808cdd264 100644 --- a/modules/extra/m_mysql.cpp +++ b/modules/extra/m_mysql.cpp @@ -122,15 +122,15 @@ class MySQLService : public Provider ~MySQLService(); - void Run(Interface *i, const Query &query) anope_override; + void Run(Interface *i, const Query &query) override; - Result RunQuery(const Query &query) anope_override; + Result RunQuery(const Query &query) override; - std::vector<Query> CreateTable(const Anope::string &table, const Data &data) anope_override; + std::vector<Query> CreateTable(const Anope::string &table, const Data &data) override; - Query BuildInsert(const Anope::string &table, unsigned int id, Data &data) anope_override; + Query BuildInsert(const Anope::string &table, unsigned int id, Data &data) override; - Query GetTables(const Anope::string &prefix) anope_override; + Query GetTables(const Anope::string &prefix) override; void Connect(); @@ -148,7 +148,7 @@ class DispatcherThread : public Thread, public Condition public: DispatcherThread() : Thread() { } - void Run() anope_override; + void Run() override; }; class ModuleSQL; @@ -186,7 +186,7 @@ class ModuleSQL : public Module, public Pipe delete DThread; } - void OnReload(Configuration::Conf *conf) anope_override + void OnReload(Configuration::Conf *conf) override { Configuration::Block *config = conf->GetModule(this); @@ -239,7 +239,7 @@ class ModuleSQL : public Module, public Pipe } } - void OnModuleUnload(User *, Module *m) anope_override + void OnModuleUnload(User *, Module *m) override { this->DThread->Lock(); @@ -264,7 +264,7 @@ class ModuleSQL : public Module, public Pipe this->OnNotify(); } - void OnNotify() anope_override + void OnNotify() override { this->DThread->Lock(); std::deque<QueryResult> finishedRequests = this->FinishedRequests; diff --git a/modules/extra/m_regex_pcre.cpp b/modules/extra/m_regex_pcre.cpp index b6bf88af1..a7c9d4ba8 100644 --- a/modules/extra/m_regex_pcre.cpp +++ b/modules/extra/m_regex_pcre.cpp @@ -33,7 +33,7 @@ class PCRERegexProvider : public RegexProvider public: PCRERegexProvider(Module *creator) : RegexProvider(creator, "regex/pcre") { } - Regex *Compile(const Anope::string &expression) anope_override + Regex *Compile(const Anope::string &expression) override { return new PCRERegex(expression); } diff --git a/modules/extra/m_regex_posix.cpp b/modules/extra/m_regex_posix.cpp index 551d978b8..933ee59af 100644 --- a/modules/extra/m_regex_posix.cpp +++ b/modules/extra/m_regex_posix.cpp @@ -35,7 +35,7 @@ class POSIXRegexProvider : public RegexProvider public: POSIXRegexProvider(Module *creator) : RegexProvider(creator, "regex/posix") { } - Regex *Compile(const Anope::string &expression) anope_override + Regex *Compile(const Anope::string &expression) override { return new POSIXRegex(expression); } diff --git a/modules/extra/m_regex_tre.cpp b/modules/extra/m_regex_tre.cpp index 760097b08..0f5c0eaf7 100644 --- a/modules/extra/m_regex_tre.cpp +++ b/modules/extra/m_regex_tre.cpp @@ -36,7 +36,7 @@ class TRERegexProvider : public RegexProvider public: TRERegexProvider(Module *creator) : RegexProvider(creator, "regex/tre") { } - Regex *Compile(const Anope::string &expression) anope_override + Regex *Compile(const Anope::string &expression) override { return new TRERegex(expression); } diff --git a/modules/extra/m_sasl_dh-aes.cpp b/modules/extra/m_sasl_dh-aes.cpp index a4fc5ea44..0a73f7788 100644 --- a/modules/extra/m_sasl_dh-aes.cpp +++ b/modules/extra/m_sasl_dh-aes.cpp @@ -48,7 +48,7 @@ class DHAES : public Mechanism DH* dh_params; const size_t keysize; - SASL::Session* CreateSession(const Anope::string &uid) anope_override + SASL::Session* CreateSession(const Anope::string &uid) override { return new DHAESSession(this, uid, dh_params); } @@ -70,7 +70,7 @@ class DHAES : public Mechanism DH_free(dh_params); } - void ProcessMessage(SASL::Session *session, const SASL::Message &m) anope_override + void ProcessMessage(SASL::Session *session, const SASL::Message &m) override { DHAESSession *sess = anope_dynamic_static_cast<DHAESSession *>(session); diff --git a/modules/extra/m_sasl_dh-blowfish.cpp b/modules/extra/m_sasl_dh-blowfish.cpp index 1bfd50173..b310c1089 100644 --- a/modules/extra/m_sasl_dh-blowfish.cpp +++ b/modules/extra/m_sasl_dh-blowfish.cpp @@ -48,7 +48,7 @@ class DHBS : public Mechanism DH* dh_params; const size_t keysize; - SASL::Session* CreateSession(const Anope::string &uid) anope_override + SASL::Session* CreateSession(const Anope::string &uid) override { return new DHBSSession(this, uid, dh_params); } @@ -70,7 +70,7 @@ class DHBS : public Mechanism DH_free(dh_params); } - void ProcessMessage(SASL::Session *session, const SASL::Message &m) anope_override + void ProcessMessage(SASL::Session *session, const SASL::Message &m) override { DHBSSession *sess = anope_dynamic_static_cast<DHBSSession *>(session); diff --git a/modules/extra/m_sql_authentication.cpp b/modules/extra/m_sql_authentication.cpp index 2342ef89d..b3c0fd6b7 100644 --- a/modules/extra/m_sql_authentication.cpp +++ b/modules/extra/m_sql_authentication.cpp @@ -19,7 +19,7 @@ class SQLAuthenticationResult : public SQL::Interface req->Release(me); } - void OnResult(const SQL::Result &r) anope_override + void OnResult(const SQL::Result &r) override { if (r.Rows() == 0) { @@ -58,7 +58,7 @@ class SQLAuthenticationResult : public SQL::Interface delete this; } - void OnError(const SQL::Result &r) anope_override + void OnError(const SQL::Result &r) override { Log(this->owner) << "m_sql_authentication: Error executing query " << r.GetQuery().query << ": " << r.GetError(); delete this; @@ -80,7 +80,7 @@ class ModuleSQLAuthentication : public Module } - void OnReload(Configuration::Conf *conf) anope_override + void OnReload(Configuration::Conf *conf) override { Configuration::Block *config = conf->GetModule(this); this->engine = config->Get<const Anope::string>("engine"); @@ -91,7 +91,7 @@ class ModuleSQLAuthentication : public Module this->SQL = ServiceReference<SQL::Provider>("SQL::Provider", this->engine); } - EventReturn OnPreCommand(CommandSource &source, Command *command, std::vector<Anope::string> ¶ms) anope_override + EventReturn OnPreCommand(CommandSource &source, Command *command, std::vector<Anope::string> ¶ms) override { if (!this->disable_reason.empty() && (command->name == "nickserv/register" || command->name == "nickserv/group")) { @@ -108,7 +108,7 @@ class ModuleSQLAuthentication : public Module return EVENT_CONTINUE; } - void OnCheckAuthentication(User *u, IdentifyRequest *req) anope_override + void OnCheckAuthentication(User *u, IdentifyRequest *req) override { if (!this->SQL) { diff --git a/modules/extra/m_sql_log.cpp b/modules/extra/m_sql_log.cpp index 42b5b8924..475ff1253 100644 --- a/modules/extra/m_sql_log.cpp +++ b/modules/extra/m_sql_log.cpp @@ -20,13 +20,13 @@ class SQLLog : public Module { } - void OnReload(Configuration::Conf *conf) anope_override + void OnReload(Configuration::Conf *conf) override { Configuration::Block *config = conf->GetModule(this); this->table = config->Get<const Anope::string>("table", "logs"); } - void OnLogMessage(LogInfo *li, const Log *l, const Anope::string &msg) anope_override + void OnLogMessage(LogInfo *li, const Log *l, const Anope::string &msg) override { Anope::string ref_name; ServiceReference<SQL::Provider> SQL; diff --git a/modules/extra/m_sql_oper.cpp b/modules/extra/m_sql_oper.cpp index 68a6d9084..01d1fa174 100644 --- a/modules/extra/m_sql_oper.cpp +++ b/modules/extra/m_sql_oper.cpp @@ -20,7 +20,7 @@ class SQLOperResult : public SQL::Interface public: SQLOperResult(Module *m, User *u) : SQL::Interface(m), user(u) { } - void OnResult(const SQL::Result &r) anope_override + void OnResult(const SQL::Result &r) override { SQLOperResultDeleter d(this); @@ -82,7 +82,7 @@ class SQLOperResult : public SQL::Interface } } - void OnError(const SQL::Result &r) anope_override + void OnError(const SQL::Result &r) override { SQLOperResultDeleter d(this); Log(this->owner) << "m_sql_oper: Error executing query " << r.GetQuery().query << ": " << r.GetError(); @@ -115,7 +115,7 @@ class ModuleSQLOper : public Module } } - void OnReload(Configuration::Conf *conf) anope_override + void OnReload(Configuration::Conf *conf) override { Configuration::Block *config = conf->GetModule(this); @@ -125,7 +125,7 @@ class ModuleSQLOper : public Module this->SQL = ServiceReference<SQL::Provider>("SQL::Provider", this->engine); } - void OnNickIdentify(User *u) anope_override + void OnNickIdentify(User *u) override { if (!this->SQL) { diff --git a/modules/extra/m_sqlite.cpp b/modules/extra/m_sqlite.cpp index b306ccfcf..1e9fdad7b 100644 --- a/modules/extra/m_sqlite.cpp +++ b/modules/extra/m_sqlite.cpp @@ -44,11 +44,11 @@ class SQLiteService : public Provider ~SQLiteService(); - void Run(Interface *i, const Query &query) anope_override; + void Run(Interface *i, const Query &query) override; Result RunQuery(const Query &query); - std::vector<Query> CreateTable(const Anope::string &table, const Data &data) anope_override; + std::vector<Query> CreateTable(const Anope::string &table, const Data &data) override; Query BuildInsert(const Anope::string &table, unsigned int id, Data &data); @@ -75,7 +75,7 @@ class ModuleSQLite : public Module SQLiteServices.clear(); } - void OnReload(Configuration::Conf *conf) anope_override + void OnReload(Configuration::Conf *conf) override { Configuration::Block *config = conf->GetModule(this); diff --git a/modules/extra/m_ssl_gnutls.cpp b/modules/extra/m_ssl_gnutls.cpp index 011530280..8ad6ee684 100644 --- a/modules/extra/m_ssl_gnutls.cpp +++ b/modules/extra/m_ssl_gnutls.cpp @@ -28,7 +28,7 @@ class MySSLService : public SSLService /** Initialize a socket to use SSL * @param s The socket */ - void Init(Socket *s) anope_override; + void Init(Socket *s) override; }; class SSLSocketIO : public SocketIO @@ -47,43 +47,43 @@ class SSLSocketIO : public SocketIO * @param sz How much to read * @return Number of bytes received */ - int Recv(Socket *s, char *buf, size_t sz) anope_override; + int Recv(Socket *s, char *buf, size_t sz) override; /** Write something to the socket * @param s The socket * @param buf The data to write * @param size The length of the data */ - int Send(Socket *s, const char *buf, size_t sz) anope_override; + int Send(Socket *s, const char *buf, size_t sz) override; /** Accept a connection from a socket * @param s The socket * @return The new socket */ - ClientSocket *Accept(ListenSocket *s) anope_override; + ClientSocket *Accept(ListenSocket *s) override; /** Finished accepting a connection from a socket * @param s The socket * @return SF_ACCEPTED if accepted, SF_ACCEPTING if still in process, SF_DEAD on error */ - SocketFlag FinishAccept(ClientSocket *cs) anope_override; + SocketFlag FinishAccept(ClientSocket *cs) override; /** Connect the socket * @param s THe socket * @param target IP to connect to * @param port to connect to */ - void Connect(ConnectionSocket *s, const Anope::string &target, int port) anope_override; + void Connect(ConnectionSocket *s, const Anope::string &target, int port) override; /** Called to potentially finish a pending connection * @param s The socket * @return SF_CONNECTED on success, SF_CONNECTING if still pending, and SF_DEAD on error. */ - SocketFlag FinishConnect(ConnectionSocket *s) anope_override; + SocketFlag FinishConnect(ConnectionSocket *s) override; /** Called when the socket is destructing */ - void Destroy() anope_override; + void Destroy() override; }; namespace GnuTLS @@ -330,7 +330,7 @@ class GnuTLSModule : public Module } } - void OnReload(Configuration::Conf *conf) anope_override + void OnReload(Configuration::Conf *conf) override { Configuration::Block *config = conf->GetModule(this); @@ -366,7 +366,7 @@ class GnuTLSModule : public Module Log(LOG_DEBUG) << "m_ssl_gnutls: Successfully loaded certificate " << certfile << " and private key " << keyfile; } - void OnPreServerConnect() anope_override + void OnPreServerConnect() override { Configuration::Block *config = Config->GetBlock("uplink", Anope::CurrentUplink); diff --git a/modules/extra/m_ssl_openssl.cpp b/modules/extra/m_ssl_openssl.cpp index a274dc78d..4e35c0dbf 100644 --- a/modules/extra/m_ssl_openssl.cpp +++ b/modules/extra/m_ssl_openssl.cpp @@ -20,7 +20,7 @@ class MySSLService : public SSLService /** Initialize a socket to use SSL * @param s The socket */ - void Init(Socket *s) anope_override; + void Init(Socket *s) override; }; class SSLSocketIO : public SocketIO @@ -39,43 +39,43 @@ class SSLSocketIO : public SocketIO * @param sz How much to read * @return Number of bytes received */ - int Recv(Socket *s, char *buf, size_t sz) anope_override; + int Recv(Socket *s, char *buf, size_t sz) override; /** Write something to the socket * @param s The socket * @param buf The data to write * @param size The length of the data */ - int Send(Socket *s, const char *buf, size_t sz) anope_override; + int Send(Socket *s, const char *buf, size_t sz) override; /** Accept a connection from a socket * @param s The socket * @return The new socket */ - ClientSocket *Accept(ListenSocket *s) anope_override; + ClientSocket *Accept(ListenSocket *s) override; /** Finished accepting a connection from a socket * @param s The socket * @return SF_ACCEPTED if accepted, SF_ACCEPTING if still in process, SF_DEAD on error */ - SocketFlag FinishAccept(ClientSocket *cs) anope_override; + SocketFlag FinishAccept(ClientSocket *cs) override; /** Connect the socket * @param s THe socket * @param target IP to connect to * @param port to connect to */ - void Connect(ConnectionSocket *s, const Anope::string &target, int port) anope_override; + void Connect(ConnectionSocket *s, const Anope::string &target, int port) override; /** Called to potentially finish a pending connection * @param s The socket * @return SF_CONNECTED on success, SF_CONNECTING if still pending, and SF_DEAD on error. */ - SocketFlag FinishConnect(ConnectionSocket *s) anope_override; + SocketFlag FinishConnect(ConnectionSocket *s) override; /** Called when the socket is destructing */ - void Destroy() anope_override; + void Destroy() override; }; class SSLModule; @@ -125,7 +125,7 @@ class SSLModule : public Module SSL_CTX_free(server_ctx); } - void OnReload(Configuration::Conf *conf) anope_override + void OnReload(Configuration::Conf *conf) override { Configuration::Block *config = conf->GetModule(this); @@ -159,7 +159,7 @@ class SSLModule : public Module } - void OnPreServerConnect() anope_override + void OnPreServerConnect() override { Configuration::Block *config = Config->GetBlock("uplink", Anope::CurrentUplink); diff --git a/modules/extra/stats/cs_fantasy_stats.cpp b/modules/extra/stats/cs_fantasy_stats.cpp index 91c1d14a4..b400e23ed 100644 --- a/modules/extra/stats/cs_fantasy_stats.cpp +++ b/modules/extra/stats/cs_fantasy_stats.cpp @@ -17,11 +17,11 @@ class MySQLInterface : public SQL::Interface public: MySQLInterface(Module *o) : SQL::Interface(o) { } - void OnResult(const SQL::Result &r) anope_override + void OnResult(const SQL::Result &r) override { } - void OnError(const SQL::Result &r) anope_override + void OnError(const SQL::Result &r) override { if (!r.GetQuery().query.empty()) Log(LOG_DEBUG) << "Chanstats: Error executing query " << r.finished_query << ": " << r.GetError(); @@ -73,7 +73,7 @@ class CSStats : public Module } - void OnReload(Configuration::Conf *conf) anope_override + void OnReload(Configuration::Conf *conf) override { prefix = conf->GetModule("m_chanstats")->Get<const Anope::string>("prefix", "anope_"); this->sql = ServiceReference<SQL::Provider>("SQL::Provider", conf->GetModule("m_chanstats")->Get<const Anope::string>("engine")); diff --git a/modules/extra/stats/cs_fantasy_top.cpp b/modules/extra/stats/cs_fantasy_top.cpp index 80db66eb9..7f4092fe2 100644 --- a/modules/extra/stats/cs_fantasy_top.cpp +++ b/modules/extra/stats/cs_fantasy_top.cpp @@ -17,11 +17,11 @@ class MySQLInterface : public SQL::Interface public: MySQLInterface(Module *o) : SQL::Interface(o) { } - void OnResult(const SQL::Result &r) anope_override + void OnResult(const SQL::Result &r) override { } - void OnError(const SQL::Result &r) anope_override + void OnError(const SQL::Result &r) override { if (!r.GetQuery().query.empty()) Log(LOG_DEBUG) << "Chanstats: Error executing query " << r.finished_query << ": " << r.GetError(); @@ -98,7 +98,7 @@ class CSTop : public Module } - void OnReload(Configuration::Conf *conf) anope_override + void OnReload(Configuration::Conf *conf) override { prefix = conf->GetModule("m_chanstats")->Get<const Anope::string>("prefix", "anope_"); this->sql = ServiceReference<SQL::Provider>("SQL::Provider", conf->GetModule("m_chanstats")->Get<const Anope::string>("engine")); diff --git a/modules/extra/stats/irc2sql/irc2sql.h b/modules/extra/stats/irc2sql/irc2sql.h index 0c516f5e3..26f907cc3 100644 --- a/modules/extra/stats/irc2sql/irc2sql.h +++ b/modules/extra/stats/irc2sql/irc2sql.h @@ -6,11 +6,11 @@ class MySQLInterface : public SQL::Interface public: MySQLInterface(Module *o) : SQL::Interface(o) { } - void OnResult(const SQL::Result &r) anope_override + void OnResult(const SQL::Result &r) override { } - void OnError(const SQL::Result &r) anope_override + void OnError(const SQL::Result &r) override { if (!r.GetQuery().query.empty()) Log(LOG_DEBUG) << "m_irc2sql: Error executing query " << r.finished_query << ": " << r.GetError(); @@ -48,30 +48,30 @@ class IRC2SQL : public Module introduced_myself = false; } - void OnShutdown() anope_override; - void OnReload(Configuration::Conf *config) anope_override; - void OnNewServer(Server *server) anope_override; - void OnServerQuit(Server *server) anope_override; - void OnUserConnect(User *u, bool &exempt) anope_override; - void OnUserQuit(User *u, const Anope::string &msg) anope_override; - void OnUserNickChange(User *u, const Anope::string &oldnick) anope_override; - void OnFingerprint(User *u) anope_override; - void OnUserModeSet(const MessageSource &setter, User *u, const Anope::string &mname) anope_override; - void OnUserModeUnset(const MessageSource &setter, User *u, const Anope::string &mname) anope_override; - void OnUserLogin(User *u) anope_override; - void OnNickLogout(User *u) anope_override; - void OnSetDisplayedHost(User *u) anope_override; + void OnShutdown() override; + void OnReload(Configuration::Conf *config) override; + void OnNewServer(Server *server) override; + void OnServerQuit(Server *server) override; + void OnUserConnect(User *u, bool &exempt) override; + void OnUserQuit(User *u, const Anope::string &msg) override; + void OnUserNickChange(User *u, const Anope::string &oldnick) override; + void OnFingerprint(User *u) override; + void OnUserModeSet(const MessageSource &setter, User *u, const Anope::string &mname) override; + void OnUserModeUnset(const MessageSource &setter, User *u, const Anope::string &mname) override; + void OnUserLogin(User *u) override; + void OnNickLogout(User *u) override; + void OnSetDisplayedHost(User *u) override; - void OnChannelCreate(Channel *c) anope_override; - void OnChannelDelete(Channel *c) anope_override; - void OnLeaveChannel(User *u, Channel *c) anope_override; - void OnJoinChannel(User *u, Channel *c) anope_override; - EventReturn OnChannelModeSet(Channel *c, MessageSource &setter, ChannelMode *mode, const Anope::string ¶m) anope_override; - EventReturn OnChannelModeUnset(Channel *c, MessageSource &setter, ChannelMode *mode, const Anope::string ¶m) anope_override; + void OnChannelCreate(Channel *c) override; + void OnChannelDelete(Channel *c) override; + void OnLeaveChannel(User *u, Channel *c) override; + void OnJoinChannel(User *u, Channel *c) override; + EventReturn OnChannelModeSet(Channel *c, MessageSource &setter, ChannelMode *mode, const Anope::string ¶m) override; + EventReturn OnChannelModeUnset(Channel *c, MessageSource &setter, ChannelMode *mode, const Anope::string ¶m) override; - void OnTopicUpdated(Channel *c, const Anope::string &user, const Anope::string &topic) anope_override; + void OnTopicUpdated(Channel *c, const Anope::string &user, const Anope::string &topic) override; - void OnBotNotice(User *u, BotInfo *bi, Anope::string &message) anope_override; + void OnBotNotice(User *u, BotInfo *bi, Anope::string &message) override; }; diff --git a/modules/extra/stats/m_chanstats.cpp b/modules/extra/stats/m_chanstats.cpp index 4151c4579..a1674bce3 100644 --- a/modules/extra/stats/m_chanstats.cpp +++ b/modules/extra/stats/m_chanstats.cpp @@ -10,7 +10,7 @@ class CommandCSSetChanstats : public Command this->SetSyntax(_("\037channel\037 {ON | OFF}")); } - void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) override { ChannelInfo *ci = ChannelInfo::Find(params[0]); if (!ci) @@ -46,7 +46,7 @@ class CommandCSSetChanstats : public Command this->OnSyntaxError(source, ""); } - bool OnHelp(CommandSource &source, const Anope::string &) anope_override + bool OnHelp(CommandSource &source, const Anope::string &) override { this->SendSyntax(source); source.Reply(" "); @@ -99,12 +99,12 @@ class CommandNSSetChanstats : public Command this->OnSyntaxError(source, "CHANSTATS"); } - void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) override { this->Run(source, source.nc->display, params[0]); } - bool OnHelp(CommandSource &source, const Anope::string &) anope_override + bool OnHelp(CommandSource &source, const Anope::string &) override { this->SendSyntax(source); source.Reply(" "); @@ -122,12 +122,12 @@ class CommandNSSASetChanstats : public CommandNSSetChanstats this->SetSyntax(_("\037nickname\037 {ON | OFF}")); } - void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) anope_override + void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) override { this->Run(source, params[0], params[1], true); } - bool OnHelp(CommandSource &source, const Anope::string &) anope_override + bool OnHelp(CommandSource &source, const Anope::string &) override { this->SendSyntax(source); source.Reply(" "); @@ -141,11 +141,11 @@ class MySQLInterface : public SQL::Interface public: MySQLInterface(Module *o) : SQL::Interface(o) { } - void OnResult(const SQL::Result &r) anope_override + void OnResult(const SQL::Result &r) override { } - void OnError(const SQL::Result &r) anope_override + void OnError(const SQL::Result &r) override { if (!r.GetQuery().query.empty()) Log(LOG_DEBUG) << "Chanstats: Error executing query " << r.finished_query << ": " << r.GetError(); @@ -484,7 +484,7 @@ class MChanstats : public Module { } - void OnReload(Configuration::Conf *conf) anope_override + void OnReload(Configuration::Conf *conf) override { Configuration::Block *block = conf->GetModule(this); prefix = block->Get<const Anope::string>("prefix", "anope_"); @@ -501,7 +501,7 @@ class MChanstats : public Module Log(this) << "no database connection to " << engine; } - void OnChanInfo(CommandSource &source, ChannelInfo *ci, InfoFormatter &info, bool show_all) anope_override + void OnChanInfo(CommandSource &source, ChannelInfo *ci, InfoFormatter &info, bool show_all) override { if (!show_all) return; @@ -509,7 +509,7 @@ class MChanstats : public Module info.AddOption(_("Chanstats")); } - void OnNickInfo(CommandSource &source, NickAlias *na, InfoFormatter &info, bool show_hidden) anope_override + void OnNickInfo(CommandSource &source, NickAlias *na, InfoFormatter &info, bool show_hidden) override { if (!show_hidden) return; @@ -517,7 +517,7 @@ class MChanstats : public Module info.AddOption(_("Chanstats")); } - void OnTopicUpdated(Channel *c, const Anope::string &user, const Anope::string &topic) anope_override + void OnTopicUpdated(Channel *c, const Anope::string &user, const Anope::string &topic) override { User *u = User::Find(user); if (!u || !u->Account() || !c->ci || !cs_stats.HasExt(c->ci)) @@ -528,13 +528,13 @@ class MChanstats : public Module this->RunQuery(query); } - EventReturn OnChannelModeSet(Channel *c, MessageSource &setter, ChannelMode *mode, const Anope::string ¶m) anope_override + EventReturn OnChannelModeSet(Channel *c, MessageSource &setter, ChannelMode *mode, const Anope::string ¶m) override { this->OnModeChange(c, setter.GetUser()); return EVENT_CONTINUE; } - EventReturn OnChannelModeUnset(Channel *c, MessageSource &setter, ChannelMode *, const Anope::string ¶m) anope_override + EventReturn OnChannelModeUnset(Channel *c, MessageSource &setter, ChannelMode *, const Anope::string ¶m) override { this->OnModeChange(c, setter.GetUser()); return EVENT_CONTINUE; @@ -553,7 +553,7 @@ class MChanstats : public Module } public: - void OnPreUserKicked(const MessageSource &source, ChanUserContainer *cu, const Anope::string &kickmsg) anope_override + void OnPreUserKicked(const MessageSource &source, ChanUserContainer *cu, const Anope::string &kickmsg) override { if (!cu->chan->ci || !cs_stats.HasExt(cu->chan->ci)) return; @@ -569,7 +569,7 @@ class MChanstats : public Module this->RunQuery(query); } - void OnPrivmsg(User *u, Channel *c, Anope::string &msg) anope_override + void OnPrivmsg(User *u, Channel *c, Anope::string &msg) override { if (!c->ci || !cs_stats.HasExt(c->ci)) return; @@ -610,14 +610,14 @@ class MChanstats : public Module this->RunQuery(query); } - void OnDelCore(NickCore *nc) anope_override + void OnDelCore(NickCore *nc) override { query = "DELETE FROM `" + prefix + "chanstats` WHERE `nick` = @nick@;"; query.SetValue("nick", nc->display); this->RunQuery(query); } - void OnChangeCoreDisplay(NickCore *nc, const Anope::string &newdisplay) anope_override + void OnChangeCoreDisplay(NickCore *nc, const Anope::string &newdisplay) override { query = "CALL " + prefix + "chanstats_proc_chgdisplay(@old_display@, @new_display@);"; query.SetValue("old_display", nc->display); @@ -625,7 +625,7 @@ class MChanstats : public Module this->RunQuery(query); } - void OnDelChan(ChannelInfo *ci) anope_override + void OnDelChan(ChannelInfo *ci) override { query = "DELETE FROM `" + prefix + "chanstats` WHERE `chan` = @channel@;"; query.SetValue("channel", ci->name); |
