summaryrefslogtreecommitdiff
path: root/src/modules/m_samode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_samode.cpp')
-rw-r--r--src/modules/m_samode.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/modules/m_samode.cpp b/src/modules/m_samode.cpp
index 9b71992a6..b91b602a6 100644
--- a/src/modules/m_samode.cpp
+++ b/src/modules/m_samode.cpp
@@ -39,6 +39,12 @@ class CommandSamode : public Command
CmdResult Handle (const std::vector<std::string>& parameters, User *user)
{
+ User* target = ServerInstance->FindNick(parameters[0]);
+ if ((target) && (target != user))
+ {
+ if (!user->HasPrivPermission("users/samode-usermodes", true))
+ return CMD_FAILURE;
+ }
this->active = true;
ServerInstance->Parser->CallHandler("MODE", parameters, user);
if (ServerInstance->Modes->GetLastParse().length())
@@ -63,10 +69,6 @@ class ModuleSaMode : public Module
ServerInstance->Modules->Attach(I_OnPreMode, this);
}
- ~ModuleSaMode()
- {
- }
-
Version GetVersion()
{
return Version("Provides command SAMODE to allow opers to change modes on channels and users", VF_VENDOR);