summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAdam <Adam@Anope.org>2010-05-25 13:50:17 -0500
committerAdam <Adam@anope.org>2010-06-18 21:04:08 -0400
commitf0a44ba89471e006ab10e398e9635adbc73eb674 (patch)
treed7607fd1f8678660b0fba625850786e94dd940c1 /include
parent4a2b9ebcf38d6c0a2860b966421b3af125438488 (diff)
Made NumberList take an arg to determin if it should pass numbers in descending order, fixes listing specific ranges being returned in descending order
Diffstat (limited to 'include')
-rw-r--r--include/services.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/services.h b/include/services.h
index a84e6ae8c..9a7356bd2 100644
--- a/include/services.h
+++ b/include/services.h
@@ -1130,19 +1130,23 @@ class ChanServTimer : public Timer
/** A class to process numbered lists (passed to most DEL/LIST/VIEW commands).
* The function HandleNumber is called for every number in the list. Note that
- * it *always* gets called in descending order. This is so deleting the index passed
- * to the function from an array will not cause the other indexes passed to the function
- * to be incorrect. This keeps us from having to have an 'in use' flag on everything.
+ * if descending is true it gets called in descending order. This is so deleting
+ * the index passed to the function from an array will not cause the other indexes
+ * passed to the function to be incorrect. This keeps us from having to have an
+ * 'in use' flag on everything.
*/
class NumberList
{
private:
std::set<unsigned> numbers;
+
+ bool desc;
public:
/** Processes a numbered list
* @param list The list
+ * @param descending True to make HandleNumber get called with numbers in descending order
*/
- NumberList(const std::string &list);
+ NumberList(const std::string &list, bool descending);
/** Destructor, does nothing
*/
@@ -1160,7 +1164,7 @@ class NumberList
/** Called when there is an error with the numbered list
* Return false to immediatly stop processing the list and return
* This is all done before we start calling HandleNumber, so no numbers will have been processed yet
- * @param The list
+ * @param list The list
* @return false to stop processing
*/
virtual bool InvalidRange(const std::string &list);