#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);
if (params.size() >= 2)
{
- ServerInstance->Parser->CallHandler("WHOIS", params, issuer);
+ ServerInstance->Parser.CallHandler("WHOIS", params, issuer);
}
else
{
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);
}