mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 18:02:56 +08: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_filename = "ipc.txt";
|
||||||
const string file_ipc_state_filename = "ipc-state.txt";
|
const string file_ipc_state_filename = "ipc-state.txt";
|
||||||
const string file_ipc_scores_filename = "ipc-scores.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))
|
if (stable.Exists(file_ipc_filename))
|
||||||
Scheduler.AddDelayed(delegate
|
Scheduler.AddDelayed(delegate
|
||||||
@ -72,7 +73,6 @@ namespace osu.Game.Tournament.IPC
|
|||||||
}
|
}
|
||||||
|
|
||||||
Mods.Value = (LegacyMods)mods;
|
Mods.Value = (LegacyMods)mods;
|
||||||
ChatChannel.Value = sr.ReadLine();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
@ -80,6 +80,19 @@ namespace osu.Game.Tournament.IPC
|
|||||||
// file might be in use.
|
// 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
|
try
|
||||||
{
|
{
|
||||||
using (var stream = stable.GetStream(file_ipc_state_filename))
|
using (var stream = stable.GetStream(file_ipc_state_filename))
|
||||||
|
Loading…
Reference in New Issue
Block a user