]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_client.qc
Show a message in the chat box if g_chat_nospectators is enabled
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_client.qc
index b4e1ffc689b938f5ba522c7e07df9aa6395039bc..f6407b2b39a2785327ce3196ef342c71ce8cf511 100644 (file)
@@ -1180,6 +1180,10 @@ void ClientConnect (void)
        {
                Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_SPECTATE_WARNING, autocvar_g_maxplayers_spectator_blocktime);
        }
+       
+       if(IS_SPEC(self) || IS_OBSERVER(self))
+       if(autocvar_g_chat_nospectators == 1 || (!(warmup_stage || gameover) && autocvar_g_chat_nospectators == 2))
+               Send_Notification(NOTIF_ONE_ONLY, self, MSG_INFO, INFO_CHAT_NOSPECTATORS);
 
        self.jointime = time;
        self.allowed_timeouts = autocvar_sv_timeout_number;