+ const std::string mname = c->getString("mode");
+ if (!mname.empty() && !stdalgo::string::equalsci(mname, name) && !(mname.length() == 1 && GetModeChar() == mname[0]))
+ continue;
+
+ ListLimit limit(c->getString("chan", "*"), c->getUInt("limit", 0));
+
+ if (limit.mask.empty())
+ throw ModuleException(InspIRCd::Format("<maxlist:chan> is empty, at %s", c->getTagLocation().c_str()));
+
+ if (limit.limit <= 0)
+ throw ModuleException(InspIRCd::Format("<maxlist:limit> must be non-zero, at %s", c->getTagLocation().c_str()));
+
+ newlimits.push_back(limit);