1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-16 09:10:35 +03:00

Don't send any messages while in CQC

This commit is contained in:
Jonathan Harris 2016-09-23 00:16:37 +01:00
parent e8e1401995
commit e805f94573
2 changed files with 6 additions and 3 deletions

View File

@ -335,6 +335,9 @@ class AppWindow:
auto_update = not event
play_sound = (auto_update or int(event.type) == self.EVENT_VIRTUAL) and not config.getint('hotkey_mute')
if monitor.cmdr and not monitor.mode:
return # In CQC - do nothing
if not retrying:
if time() < self.holdofftime: # Was invoked by key while in cooldown
self.status['text'] = ''
@ -494,8 +497,8 @@ class AppWindow:
self.station['text'] = monitor.station or (EDDB.system(monitor.system) and self.STATION_UNDOCKED or '')
if system_changed or station_changed:
self.status['text'] = ''
if entry is None:
return
if not entry or not monitor.mode:
return # Fake event or in CQC
plug.notify_journal_entry(monitor.cmdr, monitor.system, monitor.station, entry)

View File

@ -216,7 +216,7 @@ class EDLogs(FileSystemEventHandler):
self.is_beta = 'beta' in entry['gameversion'].lower()
elif entry['event'] == 'LoadGame':
self.cmdr = entry['Commander']
self.mode = entry['GameMode']
self.mode = entry.get('GameMode') # 'Open', 'Solo', 'Group', or None for CQC
elif entry['event'] == 'NewCommander':
self.cmdr = entry['Name']
elif entry['event'] in ['Undocked']: