Overhaul the IRC implementation.
* Simplified UI plumbing. * Improves handling of errors and kicks. * Persists chat history between session. * Fixes leaks of the old widget tree when exiting. * A few small UI polish improvements.
This commit is contained in:
@@ -16,6 +16,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Threading;
|
||||
using OpenRA.Chat;
|
||||
using OpenRA.FileSystem;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Network;
|
||||
@@ -45,6 +46,8 @@ namespace OpenRA
|
||||
public static Sound Sound;
|
||||
public static bool HasInputFocus = false;
|
||||
|
||||
public static GlobalChat GlobalChat;
|
||||
|
||||
public static OrderManager JoinServer(string host, int port, string password, bool recordReplay = true)
|
||||
{
|
||||
IConnection connection = new NetworkConnection(host, port);
|
||||
@@ -204,6 +207,7 @@ namespace OpenRA
|
||||
Log.AddChannel("sound", "sound.log");
|
||||
Log.AddChannel("graphics", "graphics.log");
|
||||
Log.AddChannel("geoip", "geoip.log");
|
||||
Log.AddChannel("irc", "irc.log");
|
||||
|
||||
if (Settings.Server.DiscoverNatDevices)
|
||||
UPnP.TryNatDiscovery();
|
||||
@@ -237,6 +241,8 @@ namespace OpenRA
|
||||
|
||||
Sound = new Sound(Settings.Server.Dedicated ? "Null" : Settings.Sound.Engine);
|
||||
|
||||
GlobalChat = new GlobalChat();
|
||||
|
||||
Console.WriteLine("Available mods:");
|
||||
foreach (var mod in ModMetadata.AllMods)
|
||||
Console.WriteLine("\t{0}: {1} ({2})", mod.Key, mod.Value.Title, mod.Value.Version);
|
||||
@@ -688,6 +694,8 @@ namespace OpenRA
|
||||
worldRenderer.Dispose();
|
||||
ModData.Dispose();
|
||||
ChromeProvider.Deinitialize();
|
||||
|
||||
GlobalChat.Dispose();
|
||||
Sound.Dispose();
|
||||
Renderer.Dispose();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user