]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/listmode.cpp
Convert IsNick to std::function.
[user/henk/code/inspircd.git] / src / listmode.cpp
index b416d4a69e6c09dc23821c7255faadcbd7884426..23f98bf3fb616ed56347f895edd2b9f42220fccf 100644 (file)
@@ -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