From: Attila Molnar Date: Mon, 30 Jun 2014 12:19:03 +0000 (+0200) Subject: m_spanningtree Drop support for changing user modes with FMODE X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=7f7c3a5926d5c977a6339228d8d4160fbadb1c2f;p=user%2Fhenk%2Fcode%2Finspircd.git m_spanningtree Drop support for changing user modes with FMODE This is useless with uuids --- diff --git a/src/modules/m_spanningtree/fmode.cpp b/src/modules/m_spanningtree/fmode.cpp index 036a94947..56757a8b7 100644 --- a/src/modules/m_spanningtree/fmode.cpp +++ b/src/modules/m_spanningtree/fmode.cpp @@ -26,28 +26,13 @@ CmdResult CommandFMode::Handle(User* who, std::vector& 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. */