From 1c70185a534c0acd1f4ce811c1e1b89871e4758b Mon Sep 17 00:00:00 2001 From: Caleb Johnson Date: Mon, 12 Dec 2016 00:26:09 -0600 Subject: [PATCH] [mod] Fix checks on mute subcommands (#525) Security fix --- cogs/mod.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cogs/mod.py b/cogs/mod.py index 911b536e0..cbd0252f4 100644 --- a/cogs/mod.py +++ b/cogs/mod.py @@ -300,6 +300,7 @@ class Mod: await ctx.invoke(self.channel_mute, user=user) @mute.command(name="channel", pass_context=True, no_pm=True) + @checks.mod_or_permissions(administrator=True) async def channel_mute(self, ctx, user : discord.Member): """Mutes user in the current channel""" channel = ctx.message.channel @@ -321,6 +322,7 @@ class Mod: await self.bot.say("User has been muted in this channel.") @mute.command(name="server", pass_context=True, no_pm=True) + @checks.mod_or_permissions(administrator=True) async def server_mute(self, ctx, user : discord.Member): """Mutes user in the server""" server = ctx.message.server @@ -360,6 +362,7 @@ class Mod: await ctx.invoke(self.channel_unmute, user=user) @unmute.command(name="channel", pass_context=True, no_pm=True) + @checks.mod_or_permissions(administrator=True) async def channel_unmute(self, ctx, user : discord.Member): """Unmutes user in the current channel""" channel = ctx.message.channel @@ -395,6 +398,7 @@ class Mod: await self.bot.say("User has been unmuted in this channel.") @unmute.command(name="server", pass_context=True, no_pm=True) + @checks.mod_or_permissions(administrator=True) async def server_unmute(self, ctx, user : discord.Member): """Unmutes user in the server""" server = ctx.message.server