diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-10-31 21:09:35 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-10-31 21:09:35 +0000 |
commit | a60b8e0d560404815a1587eb1d0f2b37f23db935 (patch) | |
tree | c8430d478d69dda6d256579bae6ede5b133ab55a /src/xline.cpp | |
parent | 78f7265d8d33452820f9f7642f449681a1557f75 (diff) |
More debug in here
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8446 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/xline.cpp')
-rw-r--r-- | src/xline.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/xline.cpp b/src/xline.cpp index 3c1259eac..bfa6fe446 100644 --- a/src/xline.cpp +++ b/src/xline.cpp @@ -348,11 +348,10 @@ KLine* XLineManager::matches_kline(User* user) bool XLineManager::XSortComparison(const XLine *one, const XLine *two) { - // account for permanent lines + // account for permanent lines, move to bottom if (one->expiry == 0) - { return false; - } + return (one->expiry) < (two->expiry); } @@ -361,6 +360,8 @@ void XLineManager::expire_lines() { time_t current = ServerInstance->Time(); + ServerInstance->Log(DEBUG,"expire_lines() running. Time %ld active_lines.size() %u", current, active_lines.size()); + /* Because we now store all our XLines in sorted order using ((*i)->duration + (*i)->set_time) as a key, this * means that to expire the XLines we just need to do a while, picking off the top few until there are * none left at the head of the queue that are after the current time. @@ -368,6 +369,7 @@ void XLineManager::expire_lines() while ((active_lines.size()) && (current > (*active_lines.begin())->expiry) && ((*active_lines.begin())->duration != 0)) { + ServerInstance->Log(DEBUG,"Remove one"); std::vector<XLine*>::iterator i = active_lines.begin(); (*i)->DisplayExpiry(); (*i)->Unset(); @@ -382,6 +384,11 @@ void XLineManager::expire_lines() delete *i; } + + for (std::vector<XLine*>::iterator n = active_lines.begin(); n != active_lines.end(); n++) + { + ServerInstance->Log(DEBUG,"n->expiry=%ld n->duration=%ld", (*n)->expiry, (*n)->duration); + } } // applies lines, removing clients and changing nicks etc as applicable |