From 3d2a89504ac933c87e92032c27be84b24dc4bdff Mon Sep 17 00:00:00 2001 From: om Date: Wed, 25 Jan 2006 15:35:40 +0000 Subject: remove redundant variable and fix log output git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2886 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/u_listmode.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/u_listmode.h b/include/u_listmode.h index b6cac9c50..233dd5310 100644 --- a/include/u_listmode.h +++ b/include/u_listmode.h @@ -45,7 +45,6 @@ typedef std::vector limitlist; class ListModeBaseModule : public Module { protected: - int maxlist; char mode; std::string infokey; std::string listnumeric; @@ -147,12 +146,15 @@ public: } } + unsigned int maxsize = 0; + for(limitlist::iterator it = chanlimits.begin(); it != chanlimits.end(); it++) { if(Srv->MatchText(chan->name, it->mask)) { // We have a pattern matching the channel... - if(el->size() < it->limit) + maxsize = el->size(); + if(maxsize < it->limit) { // And now add the mask onto the list... ListItem e; @@ -169,7 +171,7 @@ public: // List is full WriteServ(user->fd, "478 %s %s %s :Channel ban/ignore list is full", user->nick, chan->name, params[0].c_str()); - log(DEBUG, "m_exceptionbase.so: %s tried to set mask %s on %s but the list is full (max %d)", user->nick, params[0].c_str(), chan->name, maxlist); + log(DEBUG, "m_exceptionbase.so: %s tried to set mask %s on %s but the list is full (max %d)", user->nick, params[0].c_str(), chan->name, maxsize); return -1; } else -- cgit v1.2.3