summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index e70df5479..17379b620 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -708,6 +708,16 @@ bool ModeParser::DelMode(ModeHandler* mh)
return true;
}
+ModeHandler* ModeParser::FindMode(const std::string& modename, ModeType mt)
+{
+ ModeHandlerMap& mhmap = modehandlersbyname[mt];
+ ModeHandlerMap::const_iterator it = mhmap.find(modename);
+ if (it != mhmap.end())
+ return it->second;
+
+ return NULL;
+}
+
ModeHandler* ModeParser::FindMode(unsigned const char modeletter, ModeType mt)
{
if ((modeletter < 'A') || (modeletter > 'z'))