]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/ijoin.cpp
Fix indentation
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / ijoin.cpp
index 8185216d37915f1fe19b0d437bba4c90246f0242..c549149b30aa9095d2306c08a477d0c0e3d8edf2 100644 (file)
@@ -23,7 +23,7 @@
 #include "treeserver.h"
 #include "treesocket.h"
 
-CmdResult CommandIJoin::HandleRemote(const std::vector<std::string>& params, RemoteUser* user)
+CmdResult CommandIJoin::HandleRemote(RemoteUser* user, std::vector<std::string>& params)
 {
        Channel* chan = ServerInstance->FindChan(params[0]);
        if (!chan)
@@ -63,7 +63,7 @@ CmdResult CommandIJoin::HandleRemote(const std::vector<std::string>& params, Rem
        return CMD_SUCCESS;
 }
 
-CmdResult CommandResync::HandleServer(const std::vector<std::string>& params, FakeUser* user)
+CmdResult CommandResync::HandleServer(TreeServer* server, std::vector<std::string>& params)
 {
        ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Resyncing " + params[0]);
        Channel* chan = ServerInstance->FindChan(params[0]);
@@ -74,18 +74,13 @@ CmdResult CommandResync::HandleServer(const std::vector<std::string>& params, Fa
                return CMD_FAILURE;
        }
 
-       TreeServer* server = Utils->FindServer(user->server);
-       if (!server)
-               return CMD_FAILURE;
-
-       TreeSocket* socket = server->GetSocket();
-       if (!socket)
+       if (!server->IsLocal())
        {
-               ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Received RESYNC with a source that is not directly connected: " + user->uuid);
+               ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Received RESYNC with a source that is not directly connected: " + server->GetID());
                return CMD_INVALID;
        }
 
        // Send all known information about the channel
-       socket->SyncChannel(chan);
+       server->GetSocket()->SyncChannel(chan);
        return CMD_SUCCESS;
 }