summaryrefslogtreecommitdiff
path: root/include/mode.h
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-02-20 13:20:21 +0100
committerAttila Molnar <attilamolnar@hush.com>2014-02-20 13:20:21 +0100
commitf66d05dbda78c44b9af40e3e6f4e1a50f802d054 (patch)
treeee3b9d0ee3e574b93d284f526baac49b398d94ef /include/mode.h
parent7bcb703bca4af019e94b87bc6a6b4ecb52424485 (diff)
Create a name -> ModeHandler* map
Diffstat (limited to 'include/mode.h')
-rw-r--r--include/mode.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/mode.h b/include/mode.h
index 2e40badca..4b8aa0935 100644
--- a/include/mode.h
+++ b/include/mode.h
@@ -479,6 +479,10 @@ class CoreExport ModeParser
*/
static const unsigned int MODETYPE_LAST = 2;
+ /** Type of the container that maps mode names to ModeHandlers
+ */
+ typedef TR1NS::unordered_map<std::string, ModeHandler*, irc::insensitive, irc::StrHashComp> ModeHandlerMap;
+
/** Mode handlers for each mode, to access a handler subtract
* 65 from the ascii value of the mode letter.
* The upper bit of the value indicates if its a usermode
@@ -486,6 +490,10 @@ class CoreExport ModeParser
*/
ModeHandler* modehandlers[MODETYPE_LAST][128];
+ /** A map of mode handlers keyed by their name
+ */
+ ModeHandlerMap modehandlersbyname[MODETYPE_LAST];
+
/** Lists of mode handlers by type
*/
struct