diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-09-10 17:51:03 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-09-10 17:51:03 +0000 |
commit | a9c93027da4901123f9170a654d7c9802c40ea65 (patch) | |
tree | a62c632c4e4ff59891b7e8d51b533b16dd8361f4 /include/xline.h | |
parent | 7ee9ca88a8a4aa0d671d331cee7ae132c7c1e1a3 (diff) |
Split hostmasks into ident and host pairs for matching as g/k/e lines. This allows them to be matched faster and more efficiently
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5203 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/xline.h')
-rw-r--r-- | include/xline.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/xline.h b/include/xline.h index 521035098..34bd0d920 100644 --- a/include/xline.h +++ b/include/xline.h @@ -67,6 +67,7 @@ class KLine : public XLine /** Hostmask (ident@host) to match against * May contain wildcards. */ + char identmask[20]; char hostmask[200]; }; @@ -78,6 +79,7 @@ class GLine : public XLine /** Hostmask (ident@host) to match against * May contain wildcards. */ + char identmask[20]; char hostmask[200]; }; @@ -89,6 +91,7 @@ class ELine : public XLine /** Hostmask (ident@host) to match against * May contain wildcards. */ + char identmask[20]; char hostmask[200]; }; @@ -133,6 +136,8 @@ bool DoQLine(ServerConfig* conf, const char* tag, char** entries, void** values, bool DoKLine(ServerConfig* conf, const char* tag, char** entries, void** values, int* types); bool DoELine(ServerConfig* conf, const char* tag, char** entries, void** values, int* types); +typedef std::pair<std::string, std::string> IdentHostPair; + /** XLineManager is a class used to manage glines, klines, elines, zlines and qlines. */ class XLineManager @@ -201,6 +206,8 @@ class XLineManager */ XLineManager(InspIRCd* Instance); + IdentHostPair XLineManager::IdentSplit(const std::string &ident_and_host); + /** Add a new GLine * @param duration The duration of the line * @param source The source of the line |