/*
* InspIRCd -- Internet Relay Chat Daemon
*
- * Copyright (C) 2011 Adam <Adam@anope.org>
+ * Copyright (C) 2018-2019 Sadie Powell <sadie@witchery.services>
+ * Copyright (C) 2012-2015 Attila Molnar <attilamolnar@hush.com>
+ * Copyright (C) 2012 Robby <robby@chatbelgie.be>
+ * Copyright (C) 2009 Uli Schlachter <psychon@inspircd.org>
+ * Copyright (C) 2009 Daniel De Graaf <danieldg@inspircd.org>
+ * Copyright (C) 2008 Robin Burchell <robin+git@viroteck.net>
*
* 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
#include "utils.h"
#include "commands.h"
-CmdResult CommandIdle::HandleRemote(RemoteUser* issuer, std::vector<std::string>& params)
+CmdResult CommandIdle::HandleRemote(RemoteUser* issuer, Params& params)
{
/**
* There are two forms of IDLE: request and reply. Requests have one parameter,
*/
User* target = ServerInstance->FindUUID(params[0]);
- if ((!target) || (IS_SERVER(target) || (target->registered != REG_ALL)))
+ if ((!target) || (target->registered != REG_ALL))
return CMD_FAILURE;
LocalUser* localtarget = IS_LOCAL(target);
else
idle = ((unsigned int) (ServerInstance->Time() - localtarget->idle_lastmsg));
- CmdBuilder reply(params[0], "IDLE");
- reply.push_back(issuer->uuid);
- reply.push_back(ConvToStr(target->signon));
- reply.push_back(ConvToStr(idle));
+ CmdBuilder reply(target, "IDLE");
+ reply.push(issuer->uuid);
+ reply.push(ConvToStr(target->signon));
+ reply.push(ConvToStr(idle));
reply.Unicast(issuer);
}