diff options
| author | Adam <Adam@anope.org> | 2013-01-03 11:41:32 -0500 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2013-01-03 12:34:01 -0500 |
| commit | 098157dca8a4aecc18294cbc31cbe5ee95b35a94 (patch) | |
| tree | 654f00f21e151ba9007ca8eb044a78fef1bd6e39 /modules/extra | |
| parent | 827469600e8cf98fea7aec09ceaa77a097300b72 (diff) | |
Don't delete users immediately when quit or killed, instead wait until message processing is done
Diffstat (limited to 'modules/extra')
| -rw-r--r-- | modules/extra/m_dnsbl.cpp | 4 | ||||
| -rw-r--r-- | modules/extra/m_mysql.cpp | 2 | ||||
| -rw-r--r-- | modules/extra/m_proxyscan.cpp | 9 |
3 files changed, 8 insertions, 7 deletions
diff --git a/modules/extra/m_dnsbl.cpp b/modules/extra/m_dnsbl.cpp index 1d5cdcb2e..007935da4 100644 --- a/modules/extra/m_dnsbl.cpp +++ b/modules/extra/m_dnsbl.cpp @@ -129,9 +129,9 @@ class ModuleDNSBL : public Module } } - void OnUserConnect(Reference<User> &user, bool &exempt) anope_override + void OnUserConnect(User *user, bool &exempt) anope_override { - if (exempt || !user || (!this->check_on_connect && !Me->IsSynced()) || !dnsmanager) + if (exempt || user->Quitting() || (!this->check_on_connect && !Me->IsSynced()) || !dnsmanager) return; if (!this->check_on_netburst && !user->server->IsSynced()) diff --git a/modules/extra/m_mysql.cpp b/modules/extra/m_mysql.cpp index 76a030b2c..e072f8dfe 100644 --- a/modules/extra/m_mysql.cpp +++ b/modules/extra/m_mysql.cpp @@ -406,7 +406,7 @@ std::vector<Query> MySQLService::CreateTable(const Anope::string &table, const D return queries; } -Query MySQLService::BuildInsert(const Anope::string &table, unsigned int id, Data &data) anope_override +Query MySQLService::BuildInsert(const Anope::string &table, unsigned int id, Data &data) { /* Empty columns not present in the data set */ const std::set<Anope::string> &known_cols = this->active_schema[table]; diff --git a/modules/extra/m_proxyscan.cpp b/modules/extra/m_proxyscan.cpp index 6d2a6b7b0..d89d0de56 100644 --- a/modules/extra/m_proxyscan.cpp +++ b/modules/extra/m_proxyscan.cpp @@ -125,9 +125,10 @@ class HTTPProxyConnect : public ProxyConnect, public BufferedSocket return "HTTP"; } - bool Read(const Anope::string &buf) anope_override + bool ProcessRead() anope_override { - if (buf == ProxyCheckString) + BufferedSocket::ProcessRead(); + if (this->GetLine() == ProxyCheckString) { this->Ban(); return false; @@ -341,9 +342,9 @@ class ModuleProxyScan : public Module } } - void OnUserConnect(Reference<User> &user, bool &exempt) anope_override + void OnUserConnect(User *user, bool &exempt) anope_override { - if (exempt || !user || !Me->IsSynced() || !user->server->IsSynced()) + if (exempt || user->Quitting() || !Me->IsSynced() || !user->server->IsSynced()) return; /* At this time we only support IPv4 */ |
