]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host_cmd.c
added arg: connect-userinfo; works like this: "connect server password foobar" will...
[xonotic/darkplaces.git] / host_cmd.c
index 3f9c56e864054bef906260d100e44593fd985d63..d15a04cab497966555161664c929e5fdb1b62232 100644 (file)
@@ -383,7 +383,7 @@ void Host_Map_f (void)
        strlcpy(level, Cmd_Argv(1), sizeof(level));
        SV_SpawnServer(level);
        if (sv.active && cls.state == ca_disconnected)
-               CL_EstablishConnection("local:1");
+               CL_EstablishConnection("local:1", -2);
 }
 
 /*
@@ -420,7 +420,7 @@ void Host_Changelevel_f (void)
        strlcpy(level, Cmd_Argv(1), sizeof(level));
        SV_SpawnServer(level);
        if (sv.active && cls.state == ca_disconnected)
-               CL_EstablishConnection("local:1");
+               CL_EstablishConnection("local:1", -2);
 }
 
 /*
@@ -454,7 +454,7 @@ void Host_Restart_f (void)
        strlcpy(mapname, sv.name, sizeof(mapname));
        SV_SpawnServer(mapname);
        if (sv.active && cls.state == ca_disconnected)
-               CL_EstablishConnection("local:1");
+               CL_EstablishConnection("local:1", -2);
 }
 
 /*
@@ -475,7 +475,7 @@ void Host_Reconnect_f (void)
                // will still contain its IP address, so get the address...
                InfoString_GetValue(cls.userinfo, "*ip", temp, sizeof(temp));
                if (temp[0])
-                       CL_EstablishConnection(temp);
+                       CL_EstablishConnection(temp, -1);
                else
                        Con_Printf("Reconnect to what server?  (you have not connected to a server yet)\n");
                return;
@@ -530,7 +530,7 @@ void Host_Connect_f (void)
        // clear the rcon password, to prevent vulnerability by stuffcmd-ing a connect command
        if(rcon_secure.integer <= 0)
                Cvar_SetQuick(&rcon_password, "");
-       CL_EstablishConnection(Cmd_Argv(1));
+       CL_EstablishConnection(Cmd_Argv(1), 2);
 }
 
 
@@ -1072,7 +1072,7 @@ void Host_Loadgame_f (void)
 
        // make sure we're connected to loopback
        if (sv.active && cls.state == ca_disconnected)
-               CL_EstablishConnection("local:1");
+               CL_EstablishConnection("local:1", -2);
 }
 
 //============================================================================