diff options
Diffstat (limited to 'modules/m_dnsbl.cpp')
-rw-r--r-- | modules/m_dnsbl.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/modules/m_dnsbl.cpp b/modules/m_dnsbl.cpp index d6a3f6524..79fa92a73 100644 --- a/modules/m_dnsbl.cpp +++ b/modules/m_dnsbl.cpp @@ -18,20 +18,18 @@ struct Blacklist { struct Reply { - int code; + int code = 0; Anope::string reason; - bool allow_account; + bool allow_account = false; - Reply() : code(0), allow_account(false) { } + Reply() = default; }; Anope::string name; - time_t bantime; + time_t bantime = 0; Anope::string reason; std::vector<Reply> replies; - Blacklist() : bantime(0) { } - Reply *Find(int code) { for (unsigned int i = 0; i < replies.size(); ++i) @@ -50,7 +48,7 @@ class DNSBLResolver : public Request public: DNSBLResolver(Module *c, User *u, const Blacklist &b, const Anope::string &host, bool add_akill) : Request(dnsmanager, c, host, QUERY_A, true), user(u), blacklist(b), add_to_akill(add_akill) { } - void OnLookupComplete(const Query *record) anope_override + void OnLookupComplete(const Query *record) override { if (!user || user->Quitting()) return; @@ -110,7 +108,7 @@ class ModuleDNSBL : public Module } - void OnReload(Configuration::Conf *conf) anope_override + void OnReload(Configuration::Conf *conf) override { Configuration::Block *block = conf->GetModule(this); this->check_on_connect = block->Get<bool>("check_on_connect"); @@ -152,7 +150,7 @@ class ModuleDNSBL : public Module } } - void OnUserConnect(User *user, bool &exempt) anope_override + void OnUserConnect(User *user, bool &exempt) override { if (exempt || user->Quitting() || (!this->check_on_connect && !Me->IsSynced()) || !dnsmanager) return; |