diff options
Diffstat (limited to 'src/listmode.cpp')
-rw-r--r-- | src/listmode.cpp | 11 |
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 ¶meter, bool adding) { // Try and grab the list |