+class CommandSamode : public Command
+{
+ public:
+ bool active;
+ CommandSamode(Module* Creator) : Command(Creator,"SAMODE", 2)
+ {
+ allow_empty_last_param = false;
+ flags_needed = 'o'; Penalty = 0; syntax = "<target> <modes> {<mode-parameters>}";
+ active = false;
+ }
+
+ CmdResult Handle (const std::vector<std::string>& parameters, User *user)
+ {
+ if (parameters[0].c_str()[0] != '#')
+ {
+ User* target = ServerInstance->FindNickOnly(parameters[0]);
+ if ((!target) || (target->registered != REG_ALL))
+ {
+ user->WriteNumeric(Numerics::NoSuchNick(parameters[0]));
+ return CMD_FAILURE;
+ }