]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/fjoin.cpp
Fix Windows build and a few more problems
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / fjoin.cpp
index 37683a440a6b6040e51fc12b03fff2af73e91bf1..93320757c7e8249c4fae49dac12e37b6ff87f0e3 100644 (file)
@@ -26,9 +26,8 @@
 #include "treesocket.h"
 
 /** FJOIN, almost identical to TS6 SJOIN, except for nicklist handling. */
-CmdResult CommandFJoin::Handle(const std::vector<std::string>& params, User *srcuser)
+CmdResult CommandFJoin::Handle(User* srcuser, std::vector<std::string>& params)
 {
-       SpanningTreeUtilities* Utils = ((ModuleSpanningTree*)(Module*)creator)->Utils;
        /* 1.1+ FJOIN works as follows:
         *
         * Each FJOIN is sent along with a timestamp, and the side with the lowest
@@ -134,7 +133,7 @@ CmdResult CommandFJoin::Handle(const std::vector<std::string>& params, User *src
        }
 
        irc::modestacker modestack(true);
-       TreeSocket* src_socket = Utils->FindServer(srcuser->server)->GetRoute()->GetSocket();
+       TreeSocket* src_socket = Utils->FindServer(srcuser->server)->GetSocket();
 
        /* Now, process every 'modes,uuid' pair */
        irc::tokenstream users(*params.rbegin());
@@ -167,7 +166,6 @@ bool CommandFJoin::ProcessModeUUIDPair(const std::string& item, TreeSocket* src_
        }
 
        /* Check that the user's 'direction' is correct */
-       SpanningTreeUtilities* Utils = ((ModuleSpanningTree*)(Module*)creator)->Utils;
        TreeServer* route_back_again = Utils->BestRouteTo(who->server);
        if ((!route_back_again) || (route_back_again->GetSocket() != src_socket))
        {