X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fmodules%2Fm_samode.cpp;h=1344c7c2740a74db3b4822a936a67894f4b2be82;hb=d494fa6e094e85cd29235e995fb2b447d6e1f168;hp=634464ac2a67be631724b5496a78ea3614b13df2;hpb=fd6b8bddfa69d87d04f24c3e6e5aa8629cd9b578;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_samode.cpp b/src/modules/m_samode.cpp index 634464ac2..1344c7c27 100644 --- a/src/modules/m_samode.cpp +++ b/src/modules/m_samode.cpp @@ -1,10 +1,14 @@ /* * InspIRCd -- Internet Relay Chat Daemon * + * Copyright (C) 2013, 2017-2020 Sadie Powell + * Copyright (C) 2013 Daniel Vassdal + * Copyright (C) 2012-2016, 2018 Attila Molnar + * Copyright (C) 2012, 2019 Robby * Copyright (C) 2009 Daniel De Graaf + * Copyright (C) 2007 Robin Burchell * Copyright (C) 2007 Dennis Friis - * Copyright (C) 2006-2007 Robin Burchell - * Copyright (C) 2004-2005 Craig Edwards + * Copyright (C) 2004, 2006, 2010 Craig Edwards * * This file is part of InspIRCd. InspIRCd is free software: you can * redistribute it and/or modify it under the terms of the GNU General Public @@ -33,7 +37,8 @@ class CommandSamode : public Command CommandSamode(Module* Creator) : Command(Creator,"SAMODE", 2) { allow_empty_last_param = false; - flags_needed = 'o'; syntax = " {}"; + flags_needed = 'o'; + syntax = " (+|-) []"; active = false; } @@ -49,8 +54,11 @@ class CommandSamode : public Command } // Changing the modes of another user requires a special permission - if ((target != user) && (!user->HasPrivPermission("users/samode-usermodes", true))) + if ((target != user) && (!user->HasPrivPermission("users/samode-usermodes"))) + { + user->WriteNotice("*** You are not allowed to /SAMODE other users (the privilege users/samode-usermodes is needed to /SAMODE others)."); return CMD_FAILURE; + } } // XXX: Make ModeParser clear LastParse @@ -93,7 +101,7 @@ class ModuleSaMode : public Module Version GetVersion() CXX11_OVERRIDE { - return Version("Provides command SAMODE to allow opers to change modes on channels and users", VF_VENDOR); + return Version("Adds the /SAMODE command which allows server operators to change the modes of a target (channel, user) that they would not otherwise have the privileges to change.", VF_VENDOR); } ModResult OnPreMode(User* source, User* dest, Channel* channel, Modes::ChangeList& modes) CXX11_OVERRIDE