From 7e0cb6d8ef283d83fcabee131f88ebe85e2ba44f Mon Sep 17 00:00:00 2001 From: Zach Bloomquist Date: Fri, 2 Jan 2015 21:09:05 -0500 Subject: cs_entrymsg to use SET permission, not isFounder Correcting syntax error (i don't actually know c++) --- modules/commands/cs_entrymsg.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'modules/commands/cs_entrymsg.cpp') diff --git a/modules/commands/cs_entrymsg.cpp b/modules/commands/cs_entrymsg.cpp index 6df6918da..89b66a977 100644 --- a/modules/commands/cs_entrymsg.cpp +++ b/modules/commands/cs_entrymsg.cpp @@ -143,7 +143,7 @@ class CommandEntryMessage : public Command else { (*messages)->push_back(new EntryMsgImpl(ci, source.GetNick(), message)); - Log(source.IsFounder(ci) ? LOG_COMMAND : LOG_OVERRIDE, source, this, ci) << "to add a message"; + Log(source.AccessFor(ci).HasPriv("SET") ? LOG_COMMAND : LOG_OVERRIDE, source, this, ci) << "to add a message"; source.Reply(_("Entry message added to \002%s\002"), ci->name.c_str()); } } @@ -166,7 +166,7 @@ class CommandEntryMessage : public Command delete (*messages)->at(i - 1); if ((*messages)->empty()) ci->Shrink("entrymsg"); - Log(source.IsFounder(ci) ? LOG_COMMAND : LOG_OVERRIDE, source, this, ci) << "to remove a message"; + Log(source.AccessFor(ci).HasPriv("SET") ? LOG_COMMAND : LOG_OVERRIDE, source, this, ci) << "to remove a message"; source.Reply(_("Entry message \002%i\002 for \002%s\002 deleted."), i, ci->name.c_str()); } else @@ -183,7 +183,7 @@ class CommandEntryMessage : public Command { ci->Shrink("entrymsg"); - Log(source.IsFounder(ci) ? LOG_COMMAND : LOG_OVERRIDE, source, this, ci) << "to remove all messages"; + Log(source.AccessFor(ci).HasPriv("SET") ? LOG_COMMAND : LOG_OVERRIDE, source, this, ci) << "to remove all messages"; source.Reply(_("Entry messages for \002%s\002 have been cleared."), ci->name.c_str()); } @@ -212,7 +212,7 @@ class CommandEntryMessage : public Command return; } - if (!source.IsFounder(ci) && !source.HasPriv("chanserv/administration")) + if (!source.AccessFor(ci).HasPriv("SET") && !source.HasPriv("chanserv/administration")) { source.Reply(ACCESS_DENIED); return; @@ -253,6 +253,9 @@ class CommandEntryMessage : public Command source.Reply(_("The \002ENTRYMSG CLEAR\002 command clears all entries from\n" "the list of messages shown to users when they join\n" "the channel, effectively disabling entry messages.")); + source.Reply(" "); + source.Reply(_("Adding, deleting, or clearing entry messages requires the\n" + "SET permission.")); return true; } }; -- cgit