diff options
Diffstat (limited to 'src/mode.cpp')
-rw-r--r-- | src/mode.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index 3a0937d91..281fb6ac8 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -642,6 +642,20 @@ std::string ModeParser::ParaModeList() return modestr; } +ModeHandler* ModeParser::FindPrefix(unsigned const char pfxletter) +{ + for (unsigned char mode = 'A'; mode <= 'z'; mode++) + { + unsigned char pos = (mode-65) | MASK_CHANNEL; + + if ((modehandlers[pos]) && (modehandlers[pos]->GetPrefix() == pfxletter)) + { + return modehandlers[pos]; + } + } + return NULL; +} + bool ModeParser::PrefixComparison(const prefixtype one, const prefixtype two) { return one.second > two.second; |