summaryrefslogtreecommitdiff
path: root/include/modules/os_session.h
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-05-20 21:10:49 -0400
committerAdam <Adam@anope.org>2014-05-20 21:16:00 -0400
commit866f3f32ab3713e9867747f150df3698e456744e (patch)
tree20aabb18d88ee72a4fd412e17ebe30585496bd97 /include/modules/os_session.h
parent20ce170024779aebbc1462146905c976836a552f (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 'include/modules/os_session.h')
-rw-r--r--include/modules/os_session.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/modules/os_session.h b/include/modules/os_session.h
index 65f1c6f75..957fe6043 100644
--- a/include/modules/os_session.h
+++ b/include/modules/os_session.h
@@ -7,7 +7,7 @@ struct Session
unsigned count; /* Number of clients with this host */
unsigned hits; /* Number of subsequent kills for a host */
- Session(const Anope::string &ip, int len) : addr(ip, len), count(1), hits(0) { }
+ Session(const sockaddrs &ip, int len) : addr(ip, len), count(1), hits(0) { }
};
struct Exception : Serializable