Don't send any messages while in CQC

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

No files matched your search

+5 -2
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)
+1 -1
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']: