diff options
| author | Adam <Adam@anope.org> | 2014-05-20 21:10:49 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2014-05-20 21:16:00 -0400 |
| commit | 866f3f32ab3713e9867747f150df3698e456744e (patch) | |
| tree | 20aabb18d88ee72a4fd412e17ebe30585496bd97 /modules/extra | |
| parent | 20ce170024779aebbc1462146905c976836a552f (diff) | |
Speed up akill xline checks
Cache xline nick, user, host, etc instead of rebuilding it everytime its
requested. Store users ip in sockaddr form and not string form to
prevent having to rebuild sockaddrs when checking xlines.
Also do not try to convert empty config values in Config::Get as this
can be rather common if a non string configuration value is not set, and
the cost of the ConvertException is great.
Diffstat (limited to 'modules/extra')
| -rw-r--r-- | modules/extra/m_sql_authentication.cpp | 2 | ||||
| -rw-r--r-- | modules/extra/m_sql_oper.cpp | 2 | ||||
| -rw-r--r-- | modules/extra/stats/irc2sql/irc2sql.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/modules/extra/m_sql_authentication.cpp b/modules/extra/m_sql_authentication.cpp index 0710a6e20..c718f3c2b 100644 --- a/modules/extra/m_sql_authentication.cpp +++ b/modules/extra/m_sql_authentication.cpp @@ -122,7 +122,7 @@ class ModuleSQLAuthentication : public Module if (u) { q.SetValue("n", u->nick); - q.SetValue("i", u->ip); + q.SetValue("i", u->ip.addr()); } else { diff --git a/modules/extra/m_sql_oper.cpp b/modules/extra/m_sql_oper.cpp index 68a6d9084..3203021bc 100644 --- a/modules/extra/m_sql_oper.cpp +++ b/modules/extra/m_sql_oper.cpp @@ -135,7 +135,7 @@ class ModuleSQLOper : public Module SQL::Query q(this->query); q.SetValue("a", u->Account()->display); - q.SetValue("i", u->ip); + q.SetValue("i", u->ip.addr()); this->SQL->Run(new SQLOperResult(this, u), q); diff --git a/modules/extra/stats/irc2sql/irc2sql.cpp b/modules/extra/stats/irc2sql/irc2sql.cpp index d20e1a420..fd0ca5890 100644 --- a/modules/extra/stats/irc2sql/irc2sql.cpp +++ b/modules/extra/stats/irc2sql/irc2sql.cpp @@ -95,7 +95,7 @@ void IRC2SQL::OnUserConnect(User *u, bool &exempt) query.SetValue("vhost", u->vhost); query.SetValue("chost", u->chost); query.SetValue("realname", u->realname); - query.SetValue("ip", u->ip); + query.SetValue("ip", u->ip.addr()); query.SetValue("ident", u->GetIdent()); query.SetValue("vident", u->GetVIdent()); query.SetValue("secure", u->HasMode("SSL") || u->HasExt("ssl") ? "Y" : "N"); |
