+ string xonotic_hostversion = strcat("Xonotic ", hostversion);
+ if (version_mismatch)
+ {
+ if(!version_check)
+ return strcat(sprintf(_("This is %s"), xonotic_hostversion), "\n^3",
+ _("Your client version is outdated."), "\n\n\n",
+ _("### YOU WON'T BE ABLE TO PLAY ON THIS SERVER ###"), "\n\n\n",
+ _("Please update!"));
+ else
+ return strcat(sprintf(_("This is %s"), xonotic_hostversion), "\n^3",
+ _("This server is using an outdated Xonotic version."), "\n\n\n",
+ _("### THIS SERVER IS INCOMPATIBLE AND THUS YOU CANNOT JOIN ###"));
+ }
+ return sprintf(_("Welcome to %s"), xonotic_hostversion);
+}
+
+bool net_handle_ServerWelcome()
+{
+ bool campaign = ReadByte();
+ if (campaign)
+ {
+ string campaign_title = ReadString();
+ int campaign_level = ReadByte();
+ string campaign_msg = ReadString();
+ string welcomedialog_args;
+ welcomedialog_args = strcat("HOSTNAME \"", campaign_title, "\"");
+ string key = getcommandkey(_("jump"), "+jump");
+ string msg = strcat(
+ CCR("^F1"), sprintf(_("Level %d:"), campaign_level),
+ sprintf(CCR(" ^BG%s\n^3\n"), campaign_msg),
+ sprintf(CCR(_("^BGPress ^F2%s^BG to enter the game")), key));
+ msg = MakeConsoleSafe(strreplace("\n", "\\n", msg));
+ welcomedialog_args = strcat(welcomedialog_args, " WELCOME \"", msg, "\"");
+ localcmd("\nmenu_cmd directmenu Welcome ", welcomedialog_args, "\n");
+ return true;
+ }
+
+ welcome_msg_force_centerprint = ReadByte();
+ strcpy(hostname, ReadString());
+
+ string hostversion = ReadString();
+ bool version_mismatch = ReadByte();
+ bool version_check = ReadByte();
+ string ver = GetVersionMessage(hostversion, version_mismatch, version_check);
+
+ string modifications = translate_modifications(ReadString());
+ string weaponarena_list = translate_weaponarena(ReadString());