diff options
-rw-r--r-- | src/modules/m_samode.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/modules/m_samode.cpp b/src/modules/m_samode.cpp index caf1f27c4..b56f7ae95 100644 --- a/src/modules/m_samode.cpp +++ b/src/modules/m_samode.cpp @@ -45,11 +45,9 @@ class CommandSamode : public Command user->WriteNumeric(ERR_NOSUCHNICK, "%s %s :No such nick/channel", user->nick.c_str(), parameters[0].c_str()); return CMD_FAILURE; } - } - User* target = ServerInstance->FindNick(parameters[0]); - if ((target) && (target != user)) - { - if (!user->HasPrivPermission("users/samode-usermodes", true)) + + // Changing the modes of another user requires a special permission + if ((target != user) && (!user->HasPrivPermission("users/samode-usermodes", true))) return CMD_FAILURE; } |