diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-23 21:34:04 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-23 21:34:04 +0000 |
commit | ea3ba4bfd1b072b4f14fb588286eedd0ea8c1d22 (patch) | |
tree | 6f31e715d182c4045f61fd69658c5ca092ae264a /src/mode.cpp | |
parent | 9f9e49509ea6d4c4ab0b70e15356d50e1376fdba (diff) |
Multi-prefix FJOIN, and allowing module-defined prefixes across the network
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5002 e03df62e-2008-0410-955e-edbf42e46eb7
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; |