summaryrefslogtreecommitdiff
path: root/src/listmode.cpp
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2017-07-24 14:44:36 +0100
committerPeter Powell <petpow@saberuk.com>2017-07-24 14:44:36 +0100
commit60658d0bdbc8d047c3dbfc19abb005e147b5b2b9 (patch)
treeea49869ba451ebbeb824ee1f6496a55f75ebfaff /src/listmode.cpp
parentd2b5c7d1fcda74a72c93937cc58b5b7ff80e2a0a (diff)
Replace the deprecated MAXBANS token with MAXLIST.
Diffstat (limited to 'src/listmode.cpp')
-rw-r--r--src/listmode.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/listmode.cpp b/src/listmode.cpp
index b416d4a69..23f98bf3f 100644
--- a/src/listmode.cpp
+++ b/src/listmode.cpp
@@ -121,6 +121,17 @@ unsigned int ListModeBase::GetLimit(Channel* channel)
return GetLimitInternal(channel->name, cd);
}
+unsigned int ListModeBase::GetLowerLimit()
+{
+ unsigned int limit = UINT_MAX;
+ for (limitlist::iterator iter = chanlimits.begin(); iter != chanlimits.end(); ++iter)
+ {
+ if (iter->limit < limit)
+ limit = iter->limit;
+ }
+ return limit == UINT_MAX ? DEFAULT_LIST_SIZE : limit;
+}
+
ModeAction ListModeBase::OnModeChange(User* source, User*, Channel* channel, std::string &parameter, bool adding)
{
// Try and grab the list