summaryrefslogtreecommitdiff
path: root/include/xline.h
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-11-02 12:35:18 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-11-02 12:35:18 +0000
commit786093b7515e923921f65125ab5bf18f2279f923 (patch)
treeabb6d9fe100b2fcb9d1543077a276ec291670243 /include/xline.h
parentbc6c0898c5d3899e0fbb2171b14c2e23f172d954 (diff)
xline gutting, once more. There is no longer an active_lines vector, and no requirement for sorting. Expiry will be cheked on a per-line basis for each positive hit on that line,
saving on cpu time. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8457 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/xline.h')
-rw-r--r--include/xline.h40
1 files changed, 9 insertions, 31 deletions
diff --git a/include/xline.h b/include/xline.h
index 5de773aaf..7efc6a744 100644
--- a/include/xline.h
+++ b/include/xline.h
@@ -392,16 +392,10 @@ class CoreExport XLineManager
*/
InspIRCd* ServerInstance;
- /** This functor is used by the std::sort() function to keep all lines in order
- */
- static bool XSortComparison (const XLine *one, const XLine *two);
-
/** Used to hold XLines which have not yet been applied.
*/
std::vector<XLine *> pending_lines;
- std::vector<XLine *> active_lines;
-
std::map<char, XLineFactory*> line_factory;
GLineFactory* GFact;
@@ -469,35 +463,19 @@ class CoreExport XLineManager
*/
XLineFactory* GetFactory(const char type);
- /** Check if a nickname matches a QLine
- * @return nick The nick to check against
+ /** Check if a user matches an XLine
+ * @param type The type of line to look up
+ * @param user The user to match against (what is checked is specific to the xline type)
* @return The reason for the line if there is a match, or NULL if there is no match
*/
- QLine* matches_qline(const char* nick);
+ XLine* MatchesLine(const char type, User* user);
- /** Check if a hostname matches a GLine
- * @param user The user to check against
- * @return The reason for the line if there is a match, or NULL if there is no match
- */
- GLine* matches_gline(User* user);
-
- /** Check if a user's IP matches a ZLine
- * @param user The user to check against
- * @return The reason for the line if there is a match, or NULL if there is no match
- */
- ZLine* matches_zline(User *user);
-
- /** Check if a hostname matches a KLine
- * @param user The user to check against
- * @return The reason for the line if there is a match, or NULL if there is no match
- */
- KLine* matches_kline(User* user);
-
- /** Check if a hostname matches a ELine
- * @param user The user to check against
- * @return The reason for the line if there is a match, or NULL if there is no match
+ /** Check if a pattern matches an XLine
+ * @param type The type of line to look up
+ * @param pattern A pattern string specific to the xline type
+ * @return The matching XLine if there is a match, or NULL if there is no match
*/
- ELine* matches_exception(User* user);
+ XLine* MatchesLine(const char type, const std::string &pattern);
/** Expire any lines that should be expired.
*/