diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-10-28 18:33:06 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-10-28 18:33:06 +0000 |
commit | 4840d5e77572f42b710501912d59b5dbb6d2c2af (patch) | |
tree | 6ff11fbb04dd9a78ae9befdc66bcdb4ea03aa2a4 /include/xline.h | |
parent | f35e50f35c0174973802721dc6aef980e2eb8196 (diff) |
- Tear out a useless load of XLine clutters that did nothing much except confuse things
- Revert back to early 1.0 design of using a single list for line storage. We'll make this work more efficiently than 1.0 though of course. This simplifies the code for expiry, checking, etc.
- Merge a bunch of sort callbacks into a single sort callback for class XLine.
- Horribly break apply_lines() for the time being.
.. and that's probably it.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8398 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/xline.h')
-rw-r--r-- | include/xline.h | 56 |
1 files changed, 10 insertions, 46 deletions
diff --git a/include/xline.h b/include/xline.h index 5853e13c4..12b60ee6c 100644 --- a/include/xline.h +++ b/include/xline.h @@ -286,25 +286,9 @@ class CoreExport XLineManager */ InspIRCd* ServerInstance; - /** This functor is used by the std::sort() function to keep glines in order + /** This functor is used by the std::sort() function to keep all lines in order */ - static bool GSortComparison ( const GLine* one, const GLine* two ); - - /** This functor is used by the std::sort() function to keep elines in order - */ - static bool ESortComparison ( const ELine* one, const ELine* two ); - - /** This functor is used by the std::sort() function to keep zlines in order - */ - static bool ZSortComparison ( const ZLine* one, const ZLine* two ); - - /** This functor is used by the std::sort() function to keep klines in order - */ - static bool KSortComparison ( const KLine* one, const KLine* two ); - - /** This functor is used by the std::sort() function to keep qlines in order - */ - static bool QSortComparison ( const QLine* one, const QLine* two ); + static bool XSortComparison (const XLine *one, const XLine *two); public: /* Lists for temporary lines with an expiry time */ @@ -323,23 +307,6 @@ class CoreExport XLineManager /** Temporary ELines */ std::vector<ELine*> elines; - /* Seperate lists for perm XLines that isnt checked by expiry functions */ - - /** Permenant KLines */ - std::vector<KLine*> pklines; - - /** Permenant GLines */ - std::vector<GLine*> pglines; - - /** Permenant ZLines */ - std::vector<ZLine*> pzlines; - - /** Permenant QLines */ - std::vector<QLine*> pqlines; - - /** Permenant ELines */ - std::vector<ELine*> pelines; - /** Constructor * @param Instance A pointer to the creator object */ @@ -434,42 +401,39 @@ class CoreExport XLineManager * @return nick The nick to check against * @return The reason for the line if there is a match, or NULL if there is no match */ - QLine* matches_qline(const char* nick, bool permonly = false); + QLine* matches_qline(const char* nick); /** 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, bool permonly = false); + GLine* matches_gline(User* user); /** Check if a IP matches a ZLine * @param ipaddr The IP to check against * @return The reason for the line if there is a match, or NULL if there is no match */ - ZLine* matches_zline(const char* ipaddr, bool permonly = false); + ZLine* matches_zline(const char* ipaddr); /** 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, bool permonly = false); + 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 */ - ELine* matches_exception(User* user, bool permonly = false); + ELine* matches_exception(User* user); - /** Expire any pending non-permenant lines + /** Expire any lines that should be expired. */ void expire_lines(); - /** Apply any new lines - * @param What The types of lines to apply, from the set - * APPLY_GLINES | APPLY_KLINES | APPLY_QLINES | APPLY_ZLINES | APPLY_ALL - * | APPLY_LOCAL_ONLY + /** Apply any new lines that are pending to be applied */ - void apply_lines(const int What); + void apply_lines(); /** Handle /STATS K * @param user The username making the query |