Skip to content

Commit bcbcff3

Browse files
committed
some stability fixes and cleanups
1 parent 05b441e commit bcbcff3

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

plugins/mission/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ DEFAULT:
5858
```
5959
> [!NOTE]
6060
> DCS World can only create menus for groups. This means, that you should create groups that contain single units only,
61-
> especially, if you use commands that can only be called by specific roles.
61+
> especially if you use commands that can only be called by specific roles.
6262
>
63-
> Roles are checked twice though: once, when the menu gets created. You should not see any command, that your role can
64-
> not use. A second check is done, when the command is being executed (onChatCommand only).
63+
> Roles are checked twice: once when the menu gets created. You should not see any command, that your role can
64+
> not use. A second check is done when the command is being executed (onChatCommand only).
6565
6666
## Configuration
6767
You can configure the behaviour of the mission plugin with an optional config/plugins/mission.yaml:

plugins/mission/listener.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,14 +493,14 @@ async def onMissionLoadEnd(self, server: Server, data: dict) -> None:
493493

494494
async def _smooth_pause(self, server: Server, seconds: int):
495495
if server.current_mission:
496-
# wait for the server to be initialised correctly
496+
# wait for the server to be initialized correctly
497497
while server.status == Status.LOADING:
498498
await asyncio.sleep(1)
499499
# now do the smooth pause
500500
self.log.debug(f"Smooth pausing server {server.name} after {seconds}s")
501501
await server.current_mission.unpause()
502502
await asyncio.sleep(seconds)
503-
if not server.get_active_players():
503+
if server.current_mission and not server.get_active_players():
504504
await server.current_mission.pause()
505505

506506
@event(name="onSimulationStart")

services/music/radios/srs.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ def _log_output(p: subprocess.Popen):
5858
"-n", self.config.get('display_name', 'DCSSB MusicBox'),
5959
"-i", file
6060
]
61-
# TODO: temporary workaround
62-
if parse(self.server.extensions['SRS'].version) == parse('2.3.3.2'):
63-
args.extend(['--unitId', '1000'])
64-
6561
if debug:
6662
self.log.debug(f"Running {' '.join(args)}")
6763
p = subprocess.Popen(args, stdout=out, stderr=err)

services/servicebus/service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ def datagram_received(derived, data, addr):
761761
server.last_seen = datetime.now(timezone.utc)
762762

763763
# Handle sync channels
764-
if 'channel' in msg_data and msg_data['channel'].startswith('sync-'):
764+
if 'channel' in msg_data and str(msg_data['channel']).startswith('sync-'):
765765
if msg_data['channel'] in server.listeners:
766766
f = server.listeners.get(msg_data['channel'])
767767
if f and not f.done():

0 commit comments

Comments
 (0)