From 60658d0bdbc8d047c3dbfc19abb005e147b5b2b9 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Mon, 24 Jul 2017 14:44:36 +0100 Subject: Replace the deprecated MAXBANS token with MAXLIST. --- src/listmode.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/listmode.cpp') 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 ¶meter, bool adding) { // Try and grab the list -- cgit v1.3.1-10-gc9f91