]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host.c
rcon: support variable expansion in received commands
[xonotic/darkplaces.git] / host.c
diff --git a/host.c b/host.c
index 7c89c589f69f203e9de180eed8ea825b62b48fef..4d272e365f52aa42352b6a525e6c9d79fb698a40 100644 (file)
--- a/host.c
+++ b/host.c
@@ -202,9 +202,11 @@ void Host_SaveConfig(const char *file)
                f = FS_OpenRealFile(file, "wb", false);
                if (!f)
                {
-                       Con_Printf(CON_ERROR "Couldn't write %s.\n", file);
+                       Con_Printf(CON_ERROR "Couldn't write %s\n", file);
                        return;
                }
+               else
+                       Con_Printf("Saving config to %s ...\n", file);
 
                Key_WriteBindings (f);
                Cvar_WriteVariables (&cvars_all, f);
@@ -217,10 +219,8 @@ static void Host_SaveConfig_f(cmd_state_t *cmd)
 {
        const char *file = CONFIGFILENAME;
 
-       if(Cmd_Argc(cmd) >= 2) {
+       if(Cmd_Argc(cmd) >= 2)
                file = Cmd_Argv(cmd, 1);
-               Con_Printf("Saving to %s\n", file);
-       }
 
        Host_SaveConfig(file);
 }
@@ -448,10 +448,10 @@ static void Host_Init (void)
        Sys_Init_Commands();
        COM_Init_Commands();
 
-       // initialize filesystem (including fs_basedir, fs_gamedir, -game, scr_screenshot_name)
+       // initialize filesystem (including fs_basedir, fs_gamedir, -game, scr_screenshot_name, gamename)
        FS_Init();
 
-       // construct a version string for the corner of the console
+       // ASAP! construct a version string for the corner of the console and for crash messages
        dpsnprintf (engineversion, sizeof (engineversion), "%s %s%s, buildstring: %s", gamename, DP_OS_NAME, cls.state == ca_dedicated ? " dedicated" : "", buildstring);
        Con_Printf("%s\n", engineversion);
 
@@ -581,12 +581,12 @@ void Host_Shutdown(void)
 
        if (isdown)
        {
-               Con_Print("recursive shutdown\n");
+               Con_Print(CON_WARN "recursive shutdown\n");
                return;
        }
        if (setjmp(host.abortframe))
        {
-               Con_Print("aborted the quitting frame?!?\n");
+               Con_Print(CON_WARN "aborted the quitting frame?!?\n");
                return;
        }
        isdown = true;