]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
m_spanningtree Drop support for changing user modes with FMODE
authorAttila Molnar <attilamolnar@hush.com>
Mon, 30 Jun 2014 12:19:03 +0000 (14:19 +0200)
committerAttila Molnar <attilamolnar@hush.com>
Mon, 30 Jun 2014 12:19:03 +0000 (14:19 +0200)
This is useless with uuids

src/modules/m_spanningtree/fmode.cpp

index 036a94947a6c599dfe6a3dd01f4a69a7aa3bcc25..56757a8b73f989757350a8f0e2d8758b8df2264e 100644 (file)
@@ -26,28 +26,13 @@ CmdResult CommandFMode::Handle(User* who, std::vector<std::string>& params)
 {
        time_t TS = ServerCommand::ExtractTS(params[1]);
 
-       /* Extract the TS value of the object, either User or Channel */
-       time_t ourTS;
-       if (params[0][0] == '#')
-       {
-               Channel* chan = ServerInstance->FindChan(params[0]);
-               if (!chan)
-                       /* Oops, channel doesn't exist! */
-                       return CMD_FAILURE;
-
-               ourTS = chan->age;
-       }
-       else
-       {
-               User* user = ServerInstance->FindUUID(params[0]);
-               if (!user)
-                       return CMD_FAILURE;
-
-               if (IS_SERVER(user))
-                       throw ProtocolException("Invalid target");
+       Channel* const chan = ServerInstance->FindChan(params[0]);
+       if (!chan)
+               // Channel doesn't exist
+               return CMD_FAILURE;
 
-               ourTS = user->age;
-       }
+       // Extract the TS of the channel in question
+       time_t ourTS = chan->age;
 
        /* If the TS is greater than ours, we drop the mode and don't pass it anywhere.
         */