diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_samode.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/m_samode.cpp b/src/modules/m_samode.cpp index 9b71992a6..a7453c233 100644 --- a/src/modules/m_samode.cpp +++ b/src/modules/m_samode.cpp @@ -40,6 +40,12 @@ class CommandSamode : public Command CmdResult Handle (const std::vector<std::string>& parameters, User *user) { this->active = true; + User* target = ServerInstance->FindNick(parameters[0]); + if ((target) && (target != user)) + { + if (!user->HasPrivPermission("users/samode-usermodes", true)) + return CMD_FAILURE; + } ServerInstance->Parser->CallHandler("MODE", parameters, user); if (ServerInstance->Modes->GetLastParse().length()) ServerInstance->SNO->WriteGlobalSno('a', user->nick + " used SAMODE: " +ServerInstance->Modes->GetLastParse()); |