From: terencehill Date: Tue, 12 May 2020 12:07:46 +0000 (+0200) Subject: Don't show the JOIN_PREVENT message to CA players; also reduce the antispam delay... X-Git-Tag: xonotic-v0.8.5~1080 X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=5d7af23e753886e365c640665ef209d6c188ecec Don't show the JOIN_PREVENT message to CA players; also reduce the antispam delay: since it's implemented with a global, it may not work at all if 2 or more player try to join in the same time frame --- diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 6feb1cda3b..0326d19877 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -1989,11 +1989,11 @@ int nJoinAllowed(entity this, entity ignore) else if(currentlyPlaying < player_limit) free_slots = min(maxclients - totalClients, player_limit - currentlyPlaying); - static float join_prevent_msg_time = 0; - if(this && ignore && !free_slots && time > join_prevent_msg_time) + static float msg_time = 0; + if(this && !this.caplayer && ignore && !free_slots && time > msg_time) { Send_Notification(NOTIF_ONE_ONLY, this, MSG_CENTER, CENTER_JOIN_PREVENT); - join_prevent_msg_time = time + 3; + msg_time = time + 0.5; } return free_slots;