summaryrefslogtreecommitdiff
path: root/include/mode.h
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-02-23 12:24:14 +0100
committerAttila Molnar <attilamolnar@hush.com>2014-02-23 12:24:14 +0100
commit5a64433015f5a25af133a136468093a140595bc5 (patch)
treed9486e1384201441e77ad522534f6225326f3664 /include/mode.h
parent3c9e626d3f497af384b3248065221bf0af3631c5 (diff)
Throw an exception if ModeParser::AddMode() fails
Diffstat (limited to 'include/mode.h')
-rw-r--r--include/mode.h6
1 files changed, 4 insertions, 2 deletions
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<std::string>& GetLastParseParams() { return LastParseParams; }
const std::vector<TranslateType>& 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