1
0
mirror of https://github.com/anope/anope.git synced 2026-06-29 22:26:38 +02:00

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.
This commit is contained in:
Adam
2014-05-20 21:10:49 -04:00
parent 20ce170024
commit 866f3f32ab
20 changed files with 115 additions and 112 deletions
+1 -1
View File
@@ -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