]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host_cmd.c
libcurl.2.dylib is apparently compatible for our purposes and neatly adds Mac OS...
[xonotic/darkplaces.git] / host_cmd.c
index 8ed2a8560671d4552ebd3fffa23bc382320f13fc..56864d056c90f4ccd47321d929651f4ce77f67d0 100644 (file)
@@ -19,6 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
 
 #include "quakedef.h"
+#include "libcurl.h"
 
 int current_skill;
 cvar_t sv_cheats = {0, "sv_cheats", "0", "enables cheat commands in any game, and cheat impulses in dpmod"};
@@ -1126,7 +1127,7 @@ void Host_Color(int changetop, int changebottom)
                        CL_SetInfo("topcolor", va("%i", top), true, false, false, false);
                if (changebottom >= 0)
                        CL_SetInfo("bottomcolor", va("%i", bottom), true, false, false, false);
-               if (cls.protocol != PROTOCOL_QUAKEWORLD)
+               if (cls.protocol != PROTOCOL_QUAKEWORLD && cls.netcon)
                {
                        MSG_WriteByte(&cls.netcon->message, clc_stringcmd);
                        MSG_WriteString(&cls.netcon->message, va("color %i %i", top, bottom));
@@ -1191,7 +1192,7 @@ void Host_TopColor_f(void)
 {
        if (Cmd_Argc() == 1)
        {
-               Con_Printf("\"topcolor\" is \"%i\"\n", cl_color.integer >> 4);
+               Con_Printf("\"topcolor\" is \"%i\"\n", (cl_color.integer >> 4) & 15);
                Con_Print("topcolor <0-15>\n");
                return;
        }
@@ -1203,7 +1204,7 @@ void Host_BottomColor_f(void)
 {
        if (Cmd_Argc() == 1)
        {
-               Con_Printf("\"bottomcolor\" is \"%i\"\n", cl_color.integer);
+               Con_Printf("\"bottomcolor\" is \"%i\"\n", cl_color.integer & 15);
                Con_Print("bottomcolor <0-15>\n");
                return;
        }
@@ -1513,6 +1514,8 @@ void Host_Begin_f (void)
                return;
        }
 
+       Curl_SendRequirements();
+
        host_client->spawned = true;
 }
 
@@ -2075,7 +2078,7 @@ void Host_Rcon_f (void) // credit: taken from QuakeWorld
                to = cls.netcon->peeraddress;
        else
        {
-               if (!rcon_address.integer || !rcon_address.string[0])
+               if (!rcon_address.string[0])
                {
                        Con_Printf ("You must either be connected, or set the rcon_address cvar to issue rcon commands\n");
                        return;