diff options
author | Adam <adam@sigterm.info> | 2015-01-11 19:38:35 -0500 |
---|---|---|
committer | Adam <adam@sigterm.info> | 2015-01-11 19:38:35 -0500 |
commit | 9ac1b4ba014ba3c95dfe1c9149b705e49929dab9 (patch) | |
tree | 30f9a09f4c8e109984f764913b207e8a6277e4b8 /modules/commands/cs_entrymsg.cpp | |
parent | 3055b7272b1cc4d4099e639932d8b84ccef36a37 (diff) | |
parent | 7e0cb6d8ef283d83fcabee131f88ebe85e2ba44f (diff) |
Merge pull request #98 from flotwig/patch-1
cs_entrymsg to use SET permission, not isFounder
Diffstat (limited to 'modules/commands/cs_entrymsg.cpp')
-rw-r--r-- | modules/commands/cs_entrymsg.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
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<EntryMessageList>("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<EntryMessageList>("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; } }; |