]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/rconnect.cpp
First phase of conversion to dynamic limits on all the lengths, configured via the...
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / rconnect.cpp
index 5cfb681d0ff5cd314df1ae68c9b463a0d517d911..78adae28cf007d85a7cc1cfc705f68934309b4b1 100644 (file)
@@ -36,27 +36,27 @@ cmd_rconnect::cmd_rconnect (InspIRCd* Instance, Module* Callback, SpanningTreeUt
        syntax = "<remote-server-mask> <target-server-mask>";
 }
 
-CmdResult cmd_rconnect::Handle (const char** parameters, int pcnt, User *user)
+CmdResult cmd_rconnect::Handle (const std::vector<std::string>& parameters, User *user)
 {
        if (IS_LOCAL(user))
        {
                if (!Utils->FindServerMask(parameters[0]))
                {
-                       user->WriteServ("NOTICE %s :*** RCONNECT: Server \002%s\002 isn't connected to the network!", user->nick, parameters[0]);
+                       user->WriteServ("NOTICE %s :*** RCONNECT: Server \002%s\002 isn't connected to the network!", user->nick.c_str(), parameters[0].c_str());
                        return CMD_FAILURE;
                }
-               user->WriteServ("NOTICE %s :*** RCONNECT: Sending remote connect to \002%s\002 to connect server \002%s\002.",user->nick,parameters[0],parameters[1]);
+               user->WriteServ("NOTICE %s :*** RCONNECT: Sending remote connect to \002%s\002 to connect server \002%s\002.",user->nick.c_str(),parameters[0].c_str(),parameters[1].c_str());
        }
 
        /* Is this aimed at our server? */
        if (ServerInstance->MatchText(ServerInstance->Config->ServerName,parameters[0]))
        {
                /* Yes, initiate the given connect */
-               ServerInstance->SNO->WriteToSnoMask('l',"Remote CONNECT from %s matching \002%s\002, connecting server \002%s\002",user->nick,parameters[0],parameters[1]);
-               const char* para[1];
-               para[0] = parameters[1];
+               ServerInstance->SNO->WriteToSnoMask('l',"Remote CONNECT from %s matching \002%s\002, connecting server \002%s\002",user->nick.c_str(),parameters[0].c_str(),parameters[1].c_str());
+               std::vector<std::string> para;
+               para.push_back(parameters[1]);
                std::string original_command = std::string("CONNECT ") + parameters[1];
-               Creator->OnPreCommand("CONNECT", para, 1, user, true, original_command);
+               Creator->OnPreCommand("CONNECT", para, user, true, original_command);
        }
        return CMD_SUCCESS;
 }