string msg = MakeConsoleSafe(strreplace("\n", "\\n", welcome_msg));
welcomedialog_args = strcat(welcomedialog_args, " WELCOME \"", msg, "\"");
localcmd("\nmenu_cmd directmenu Welcome ", welcomedialog_args, "\n");
+ if (intermission) // close it after it's been initialized so it can still be opened manually
+ localcmd("\ntogglemenu 0\n");
}
else
centerprint_Add(ORDINAL(CPID_MOTD), strcat(hostname, "\n\n\n", welcome_msg), -1, 0);
void XonoticWelcomeDialog_draw(entity me)
{
SUPER(XonoticWelcomeDialog).draw(me);
+
+ if (!(gamestatus & (GAME_ISSERVER | GAME_CONNECTED)))
+ me.close(me);
+
if(me.serverinfo_MOTD == "" && gamestatus & (GAME_CONNECTED | GAME_ISSERVER))
{
// if serverinfo_MOTD is empty while connected it means we are connected to an old server