diff options
| author | 2017-07-24 14:44:36 +0100 | |
|---|---|---|
| committer | 2017-07-24 14:44:36 +0100 | |
| commit | 60658d0bdbc8d047c3dbfc19abb005e147b5b2b9 (patch) | |
| tree | ea49869ba451ebbeb824ee1f6496a55f75ebfaff /src/listmode.cpp | |
| parent | Add DEFAULT_LIST_SIZE for the default list mode size. (diff) | |
Replace the deprecated MAXBANS token with MAXLIST.
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 |
