summaryrefslogtreecommitdiff
path: root/include/mode.h
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-07-23 15:17:01 +0100
committerPeter Powell <petpow@saberuk.com>2019-07-23 15:17:01 +0100
commitabdc47a61538231ad1d5e077cf2a84f414c87454 (patch)
tree0d1b9dc2951e5fb54d282b68a82e1f584dd2807a /include/mode.h
parent438a088b5176068c753aebe860e2d89fefe09eb4 (diff)
Add a constant for the maximum length of a mode parameter.
Diffstat (limited to 'include/mode.h')
-rw-r--r--include/mode.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/mode.h b/include/mode.h
index 683f4b55b..b357de03d 100644
--- a/include/mode.h
+++ b/include/mode.h
@@ -544,8 +544,12 @@ class CoreExport ModeWatcher : public classbase
class CoreExport ModeParser : public fakederef<ModeParser>
{
public:
+ /** The maximum number of modes which can be created. */
static const ModeHandler::Id MODEID_MAX = 64;
+ /** The maximum length of a mode parameter. */
+ static const size_t MODE_PARAM_MAX = 250;
+
/** Type of the container that maps mode names to ModeHandlers
*/
typedef TR1NS::unordered_map<std::string, ModeHandler*, irc::insensitive, irc::StrHashComp> ModeHandlerMap;