]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/ijoin.cpp
Merge branch 'insp20' into master.
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / ijoin.cpp
index 78e05db93fbb841090e5c18257bcdf9ecd42a2f7..d33ef3d4ed2550ef01e8c76e20bc05b0412c18e4 100644 (file)
@@ -23,7 +23,7 @@
 #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)
@@ -38,12 +38,10 @@ CmdResult CommandIJoin::HandleRemote(RemoteUser* user, std::vector<std::string>&
        }
 
        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;
@@ -57,7 +55,7 @@ CmdResult CommandIJoin::HandleRemote(RemoteUser* user, std::vector<std::string>&
        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]);