From 5a64433015f5a25af133a136468093a140595bc5 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Sun, 23 Feb 2014 12:24:14 +0100 Subject: Throw an exception if ModeParser::AddMode() fails --- include/mode.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/mode.h') diff --git a/include/mode.h b/include/mode.h index c257226c9..7c5682135 100644 --- a/include/mode.h +++ b/include/mode.h @@ -637,10 +637,12 @@ class CoreExport ModeParser const std::string& GetLastParse() const { return LastParse; } const std::vector& GetLastParseParams() { return LastParseParams; } const std::vector& GetLastParseTranslate() { return LastParseTranslate; } + /** Add a mode to the mode parser. - * @return True if the mode was successfully added. + * Throws a ModuleException if the mode cannot be added. */ - bool AddMode(ModeHandler* mh); + void AddMode(ModeHandler* mh); + /** Delete a mode from the mode parser. * When a mode is deleted, the mode handler will be called * for every user (if it is a user mode) or for every channel -- cgit v1.2.3