Skip to content

Commit fe7b682

Browse files
author
KirillMysnik
committed
Fixed a bug when ex-admin could trigger a player-based feature had he proceeded to the player selection before
1 parent f17ede9 commit fe7b682

File tree

1 file changed

+4
-4
lines changed
  • srcds/addons/source-python/plugins/admin/core/frontends

1 file changed

+4
-4
lines changed

srcds/addons/source-python/plugins/admin/core/frontends/menus.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,10 @@ def _player_select(self, client, player_ids):
506506
:param list player_ids: Unfiltered list of IDs.
507507
"""
508508

509+
if not self.is_visible(client) or not self.is_selectable(client):
510+
client.tell(strings_common['unavailable'])
511+
return
512+
509513
client.active_popup = None
510514

511515
for player in self._filter_player_ids(client, player_ids):
@@ -528,10 +532,6 @@ def render_player_name(player):
528532
return format_player_name(player.name)
529533

530534
def select(self, client):
531-
if not self.is_visible(client) or not self.is_selectable(client):
532-
client.tell(strings_common['unavailable'])
533-
return
534-
535535
client.send_popup(self.popup)
536536

537537

0 commit comments

Comments
 (0)