#include "treeserver.h"
#include "treesocket.h"
-CmdResult CommandIJoin::HandleRemote(RemoteUser* user, std::vector<std::string>& params)
+CmdResult CommandIJoin::HandleRemote(RemoteUser* user, Params& params)
{
Channel* chan = ServerInstance->FindChan(params[0]);
if (!chan)
}
bool apply_modes;
- if (params.size() > 2)
+ if (params.size() > 3)
{
time_t RemoteTS = ServerCommand::ExtractTS(params[2]);
- if (RemoteTS < chan->age)
- throw ProtocolException("Attempted to lower TS via IJOIN. LocalTS=" + ConvToStr(chan->age));
- apply_modes = ((params.size() > 3) && (RemoteTS == chan->age));
+ apply_modes = (RemoteTS <= chan->age);
}
else
apply_modes = false;
return CMD_SUCCESS;
}
-CmdResult CommandResync::HandleServer(TreeServer* server, std::vector<std::string>& params)
+CmdResult CommandResync::HandleServer(TreeServer* server, CommandBase::Params& params)
{
ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Resyncing " + params[0]);
Channel* chan = ServerInstance->FindChan(params[0]);