diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/lists.h | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/include/lists.h b/include/lists.h index c40d97e7d..2ca681453 100644 --- a/include/lists.h +++ b/include/lists.h @@ -24,39 +24,16 @@ */ class CoreExport NumberList { - private: - bool is_valid; - - std::set<unsigned> numbers; + std::function<void(void)> endf; - 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 Anope::string &list, bool descending); - - /** Destructor, does nothing - */ - virtual ~NumberList(); - - /** Should be called after the constructors are done running. This calls the callbacks. - */ - void Process(); - - /** Called with a number from the list - * @param number The number + * @param descending True to call the number handler callback with the numbers in descending order */ - virtual void HandleNumber(unsigned number); + NumberList(const Anope::string &list, bool descending, std::function<void(unsigned int)> nf, std::function<void(void)> ef); - /** 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 list The list - * @return false to stop processing - */ - virtual bool InvalidRange(const Anope::string &list); + ~NumberList(); }; /** This class handles formatting LIST/VIEW replies. |
