]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/clientcommands.qc
Merge remote branch 'origin/master' into samual/updatecommands
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / clientcommands.qc
index d85ff2d5f4ba0f9198fc2c700216d5fc7b05b11f..86ff171f0cb3730e19904adc743ddd7a030b150a 100644 (file)
@@ -517,10 +517,12 @@ void ClientCommand_selectteam(float request, float argc) // TODO: Update the mes
                                                        
                                                        if(selection)
                                                        {
-                                                               if(self.team != selection || self.deadflag != DEAD_NO)
-                                                                       ClientKill_TeamChange(selection);
-                                                               else
+                                                               if(self.team == selection && self.deadflag == DEAD_NO)
                                                                        sprint(self, "^7You already are on that team.\n");
+                                                               else if(self.wasplayer && autocvar_g_changeteam_banned)
+                                                                       sprint(self, "^1You cannot change team, forbidden by the server.\n");
+                                                               else
+                                                                       ClientKill_TeamChange(selection);
                                                        }
                                                }
                                                else