Skip to content

Commit

Permalink
Fix issue where solo check was not done correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
fsoest committed Apr 28, 2024
1 parent 3f7483f commit 16cff39
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions monitor/monitor_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ def check_connection(connection: dict, station_data: list[dict], solos: list[dic
user_solos = [solo for solo in solos if solo['user_cid'] == connection['cid']]
if user_solos:
user_has_solo = split_compare(user_solos[0]['position'], data['logon'])
if not user_has_solo:
return output_dict(False,
f'Someone is controlling station {connection["callsign"]} without rating or solo.',
'You need a higher rating to control this position.')
elif station_type == 'TWR':
# Is TWR part of T1 Program?
if not safe_get(data, 's1_twr') and connection['rating'] == 2:
Expand Down

0 comments on commit 16cff39

Please sign in to comment.