From d67f0923b5502ac20b8327b98cce21e015123493 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 29 Oct 2007 00:15:10 +0000 Subject: This commit is untested and breaks a lot of xline stuff. work in progress. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8418 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/xline.h | 64 +++++++++++++++++++-------------------------------------- 1 file changed, 21 insertions(+), 43 deletions(-) (limited to 'include') diff --git a/include/xline.h b/include/xline.h index c2c5e54d7..6e32944fe 100644 --- a/include/xline.h +++ b/include/xline.h @@ -70,6 +70,10 @@ class CoreExport XLine : public classbase virtual void Apply(User* u); + virtual void Unset() { }; + + virtual void DisplayExpiry() = 0; + /** The time the line was added. */ time_t set_time; @@ -127,6 +131,8 @@ class CoreExport KLine : public XLine virtual void Apply(User* u); + virtual void DisplayExpiry(); + /** Ident mask */ char* identmask; @@ -167,6 +173,8 @@ class CoreExport GLine : public XLine virtual void Apply(User* u); + virtual void DisplayExpiry(); + /** Ident mask */ char* identmask; @@ -203,6 +211,10 @@ class CoreExport ELine : public XLine virtual bool Matches(User *u); + virtual void Unset(); + + virtual void DisplayExpiry(); + /** Ident mask */ char* identmask; @@ -242,6 +254,8 @@ class CoreExport ZLine : public XLine virtual void Apply(User* u); + virtual void DisplayExpiry(); + /** IP mask */ char* ipaddr; @@ -278,6 +292,8 @@ class CoreExport QLine : public XLine virtual void Apply(User* u); + virtual void DisplayExpiry(); + /** Nickname mask */ char* nick; @@ -338,23 +354,12 @@ class CoreExport XLineManager /** Used to hold XLines which have not yet been applied. */ std::vector pending_lines; - public: - /* Lists for temporary lines with an expiry time */ - - /** Temporary KLines */ - std::vector klines; - /** Temporary Glines */ - std::vector glines; + std::vector active_lines; - /** Temporary Zlines */ - std::vector zlines; - - /** Temporary QLines */ - std::vector qlines; + public: - /** Temporary ELines */ - std::vector elines; + std::map elines; /** Constructor * @param Instance A pointer to the creator object @@ -413,38 +418,11 @@ class CoreExport XLineManager /** Delete a GLine * @param hostmask The host to remove + * @param type Type of line to remove * @param simulate If this is true, don't actually remove the line, just return * @return True if the line was deleted successfully */ - bool DelGLine(const char* hostmask, bool simulate = false); - - /** Delete a QLine - * @param nickname The nick to remove - * @param simulate If this is true, don't actually remove the line, just return - * @return True if the line was deleted successfully - */ - bool DelQLine(const char* nickname, bool simulate = false); - - /** Delete a ZLine - * @param ipaddr The IP to remove - * @param simulate If this is true, don't actually remove the line, just return - * @return True if the line was deleted successfully - */ - bool DelZLine(const char* ipaddr, bool simulate = false); - - /** Delete a KLine - * @param hostmask The host to remove - * @param simulate If this is true, don't actually remove the line, just return - * @return True if the line was deleted successfully - */ - bool DelKLine(const char* hostmask, bool simulate = false); - - /** Delete a ELine - * @param hostmask The host to remove - * @param simulate If this is true, don't actually remove the line, just return - * @return True if the line was deleted successfully - */ - bool DelELine(const char* hostmask, bool simulate = false); + bool DelLine(const char* hostmask, char type, bool simulate = false); /** Check if a nickname matches a QLine * @return nick The nick to check against -- cgit v1.2.3