summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/fmode.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-06-30 14:19:03 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-06-30 14:19:03 +0200
commit7f7c3a5926d5c977a6339228d8d4160fbadb1c2f (patch)
tree344eb56094e6b8d667c1698dbf4304a8494e7de0 /src/modules/m_spanningtree/fmode.cpp
parentefb7084f4970b3703be1cef22c5930cc6a49454d (diff)
m_spanningtree Drop support for changing user modes with FMODE
This is useless with uuids
Diffstat (limited to 'src/modules/m_spanningtree/fmode.cpp')
-rw-r--r--src/modules/m_spanningtree/fmode.cpp27
1 files changed, 6 insertions, 21 deletions
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<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.
*/