X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_hidelist.cpp;h=2d3f0be7c4b5b3c4bd6947459f448b3b812f5659;hb=a0f7d012791d79b67b56b62415f7901d5e48870f;hp=cde8371fc6293d681fbb48774dd84931d3b5f2f8;hpb=02158b649035ba9d1e6fb36895d393580972b1e1;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_hidelist.cpp b/src/modules/m_hidelist.cpp index cde8371fc..2d3f0be7c 100644 --- a/src/modules/m_hidelist.cpp +++ b/src/modules/m_hidelist.cpp @@ -31,7 +31,7 @@ class ListWatcher : public ModeWatcher { } - bool BeforeMode(User* user, User* destuser, Channel* chan, std::string& param, bool adding) + bool BeforeMode(User* user, User* destuser, Channel* chan, std::string& param, bool adding) CXX11_OVERRIDE { // Only handle listmode list requests if (!param.empty()) @@ -46,7 +46,7 @@ class ListWatcher : public ModeWatcher if (user->HasPrivPermission("channels/auspex")) return true; - user->WriteNumeric(ERR_CHANOPRIVSNEEDED, "%s :You do not have access to view the %s list", chan->name.c_str(), GetModeName().c_str()); + user->WriteNumeric(ERR_CHANOPRIVSNEEDED, chan->name, InspIRCd::Format("You do not have access to view the %s list", GetModeName().c_str())); return false; } }; @@ -68,7 +68,7 @@ class ModuleHideList : public Module std::string modename = tag->getString("mode"); // If rank is set to 0 everyone inside the channel can view the list, // but non-members may not - unsigned int rank = tag->getInt("rank", HALFOP_VALUE, 0); + unsigned int rank = tag->getUInt("rank", HALFOP_VALUE); watchers.push_back(new ListWatcher(this, modename, rank)); } }