mirror of
https://github.com/ppy/osu
synced 2025-01-23 22:33:05 +00:00
Move channel reading to new ipc file
This commit is contained in:
parent
852f0337dd
commit
8b820f7346
@ -43,6 +43,7 @@ namespace osu.Game.Tournament.IPC
|
||||
const string file_ipc_filename = "ipc.txt";
|
||||
const string file_ipc_state_filename = "ipc-state.txt";
|
||||
const string file_ipc_scores_filename = "ipc-scores.txt";
|
||||
const string file_ipc_channel_filename = "ipc-channel.txt";
|
||||
|
||||
if (stable.Exists(file_ipc_filename))
|
||||
Scheduler.AddDelayed(delegate
|
||||
@ -72,7 +73,6 @@ namespace osu.Game.Tournament.IPC
|
||||
}
|
||||
|
||||
Mods.Value = (LegacyMods)mods;
|
||||
ChatChannel.Value = sr.ReadLine();
|
||||
}
|
||||
}
|
||||
catch
|
||||
@ -80,6 +80,19 @@ namespace osu.Game.Tournament.IPC
|
||||
// file might be in use.
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
using (var stream = stable.GetStream(file_ipc_channel_filename))
|
||||
using (var sr = new StreamReader(stream))
|
||||
{
|
||||
ChatChannel.Value = sr.ReadLine();
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// file might be in use.
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
using (var stream = stable.GetStream(file_ipc_state_filename))
|
||||
|
Loading…
Reference in New Issue
Block a user