]> 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 530cf4e4858dfc9bbb2555a89ae72c4b11eabf01..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);
 }
 
 //============================================================================
@@ -1937,7 +1937,7 @@ Kicks a user off of the server
 */
 void Host_Kick_f (void)
 {
-       char *who;
+       const char *who;
        const char *message = NULL;
        client_t *save;
        int i;
@@ -2491,7 +2491,7 @@ void Host_PQRcon_f (void)
                SZ_Clear(&net_message);
                MSG_WriteLong (&net_message, 0);
                MSG_WriteByte (&net_message, CCREQ_RCON);
-               SZ_Write(&net_message, (void*)rcon_password.string, n);
+               SZ_Write(&net_message, (const unsigned char*)rcon_password.string, n);
                MSG_WriteByte (&net_message, 0); // terminate the (possibly partial) string
                MSG_WriteString (&net_message, Cmd_Args());
                StoreBigLong(net_message.data, NETFLAG_CTL | (net_message.cursize & NETFLAG_LENGTH_MASK));