diff options
-rw-r--r-- | include/listmode.h | 3 | ||||
-rw-r--r-- | src/listmode.cpp | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/include/listmode.h b/include/listmode.h index 94af1d524..96a13a519 100644 --- a/include/listmode.h +++ b/include/listmode.h @@ -63,6 +63,9 @@ class CoreExport ListModeBase : public ModeHandler */ typedef std::vector<ListLimit> limitlist; + /** The default maximum list size. */ + static const unsigned int DEFAULT_LIST_SIZE = 64; + /** Finds the limit of modes that can be placed on the given channel name according to the config * @param channame The channel name to find the limit for * @return The maximum number of modes of this type that we allow to be set on the given channel name diff --git a/src/listmode.cpp b/src/listmode.cpp index cd034688c..b416d4a69 100644 --- a/src/listmode.cpp +++ b/src/listmode.cpp @@ -77,7 +77,7 @@ void ListModeBase::DoRehash() // Add the default entry. This is inserted last so if the user specifies a // wildcard record in the config it will take precedence over this entry. - chanlimits.push_back(ListLimit("*", 64)); + chanlimits.push_back(ListLimit("*", DEFAULT_LIST_SIZE)); // Most of the time our settings are unchanged, so we can avoid iterating the chanlist if (oldlimits == chanlimits) @@ -102,7 +102,7 @@ unsigned int ListModeBase::FindLimit(const std::string& channame) return it->limit; } } - return 64; + return DEFAULT_LIST_SIZE; } unsigned int ListModeBase::GetLimitInternal(const std::string& channame, ChanData* cd) |