]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/client.qc
Merge branch 'bones_was_here/misc2' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / client.qc
index c6c1ecf12a46712b6b21f2e90d9120a81c4b5afe..d80bdffa78d8aaf09e9e7a6faea3479aa5b49438 100644 (file)
@@ -1056,7 +1056,7 @@ string getwelcomemessage(entity this)
        modifications = substring(modifications, 2, strlen(modifications) - 2);
 
        string versionmessage = GetClientVersionMessage(this);
-       string s = strcat(versionmessage, "^8\n^8\nhost is ^9", autocvar_hostname, "^8\n");
+       string s = strcat(versionmessage, "^8\n^8\nserver is ^9", autocvar_hostname, "^8\n");
 
        s = strcat(s, "^8\nmatch type is ^1", gamemode_name, "^8\n");
 
@@ -2458,9 +2458,8 @@ void PlayerPreThink (entity this)
                        && (IS_SPEC(this) || IS_OBSERVER(this)) && !this.caplayer
                        && time > (CS(this).spectatortime + autocvar_g_maxplayers_spectator_blocktime))
                {
-                       Send_Notification(NOTIF_ONE_ONLY, this, MSG_INFO, INFO_QUIT_KICK_SPECTATING);
-                       dropclient(this);
-                       return;
+                       if (dropclient_schedule(this))
+                               Send_Notification(NOTIF_ONE_ONLY, this, MSG_INFO, INFO_QUIT_KICK_SPECTATING);
                }
        }
 
@@ -2701,7 +2700,8 @@ void PlayerPostThink (entity this)
        if (autocvar_sv_maxidle > 0 || (IS_PLAYER(this) && autocvar_sv_maxidle_playertospectator > 0))
        if (frametime) // WORKAROUND: only use dropclient in server frames (frametime set). Never use it in cl_movement frames (frametime zero).
        if (IS_REAL_CLIENT(this))
-       if (IS_PLAYER(this) || autocvar_sv_maxidle_spectatorsareidle)
+       if (IS_PLAYER(this) || autocvar_sv_maxidle_alsokickspectators)
+       if (!intermission_running) // NextLevel() kills all centerprints after setting this true
        {
                int totalClients = 0;
                if(autocvar_sv_maxidle > 0 && autocvar_sv_maxidle_slots > 0)
@@ -2746,14 +2746,14 @@ void PlayerPostThink (entity this)
                                }
                                else
                                {
-                                       Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_QUIT_KICK_IDLING, this.netname, maxidle_time);
-                                       dropclient(this);
+                                       if (dropclient_schedule(this))
+                                               Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_QUIT_KICK_IDLING, this.netname, maxidle_time);
                                }
                                return;
                        }
                        else if (timeleft <= countdown_time) {
-                               if (timeleft != CS(this).idlekick_lasttimeleft && timeleft <= 10)
-                                       Send_Notification(NOTIF_ONE, this, MSG_ANNCE, Announcer_PickNumber(CNT_IDLE, timeleft));
+                               if (timeleft != CS(this).idlekick_lasttimeleft)
+                                       play2(this, SND(TALK2));
                                CS(this).idlekick_lasttimeleft = timeleft;
                        }
                }