bool force_centerprint = ReadByte();
string hostname = ReadString();
string ver = ReadString();
- string gamemode_name = ReadString();
string modifications = ReadString();
string cache_mutatormsg = ReadString();
string mutator_msg = ReadString();
string msg = "";
msg = strcat(msg, ver);
- msg = strcat(msg, "^8\n\n", _("match type is "), " ^1", gamemode_name, "^8\n");
+ msg = strcat(msg, "^8\n\n", _("match type is "), " ^1", MapInfo_Type_ToText(gametype), "^8\n");
if(modifications != "")
msg = strcat(msg, "^8\n", _("active modifications:"), " ^3", modifications, "^8\n");
if (cache_mutatormsg != "")
WriteByte(MSG_ONE, force_centerprint);
WriteString(MSG_ONE, autocvar_hostname);
WriteString(MSG_ONE, GetClientVersionMessage(this));
- WriteString(MSG_ONE, gamemode_name);
MUTATOR_CALLHOOK(BuildMutatorsPrettyString, "");
string modifications = M_ARGV(0, string);
WriteString(MSG_ONE, strreplace("\\n", "\n", autocvar_sv_motd));
}
+void SendWelcomemessage_onConnection_think(entity this)
+{
+ SendWelcomemessage(this, false);
+}
+
+void SendWelcomemessage_onConnection(entity this)
+{
+ // give the client time to sent its version
+ defer(this, 0.5, SendWelcomemessage_onConnection_think);
+}
+
/**
=============
ClientConnect
if (IS_REAL_CLIENT(this))
{
if (!autocvar_g_campaign)
- SendWelcomemessage(this, false);
+ SendWelcomemessage_onConnection(this);
sv_notice_join(this);
}