From 10923d64386f4deca3e82f7f5722f42fd87c4d67 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sun, 19 Oct 2014 12:42:12 +1300 Subject: [PATCH] Remove old IRC code. --- Makefile | 15 +- OpenRA.Game/Settings.cs | 18 - OpenRA.Irc/Channel.cs | 27 -- OpenRA.Irc/IrcClient.cs | 400 ------------------ OpenRA.Irc/IrcClientUser.cs | 112 ----- OpenRA.Irc/IrcConnection.cs | 72 ---- OpenRA.Irc/IrcUtils.cs | 67 --- OpenRA.Irc/Line.cs | 155 ------- OpenRA.Irc/NumericCommand.cs | 25 -- OpenRA.Irc/OpenRA.Irc.csproj | 59 --- OpenRA.Irc/Settings.StyleCop | 344 --------------- OpenRA.Irc/Topic.cs | 30 -- OpenRA.Irc/User.cs | 73 ---- OpenRA.Mods.RA/OpenRA.Mods.RA.csproj | 6 - OpenRA.Mods.RA/Widgets/Logic/IrcLogic.cs | 252 ----------- .../Widgets/Logic/ServerBrowserLogic.cs | 1 - OpenRA.sln | 4 - mods/cnc/chrome/irc.yaml | 70 --- mods/cnc/mod.yaml | 1 - mods/d2k/mod.yaml | 1 - mods/ra/chrome/irc.yaml | 69 --- mods/ra/mod.yaml | 1 - mods/ts/mod.yaml | 1 - packaging/package-all.sh | 2 +- packaging/windows/OpenRA.nsi | 2 - 25 files changed, 4 insertions(+), 1803 deletions(-) delete mode 100644 OpenRA.Irc/Channel.cs delete mode 100644 OpenRA.Irc/IrcClient.cs delete mode 100644 OpenRA.Irc/IrcClientUser.cs delete mode 100644 OpenRA.Irc/IrcConnection.cs delete mode 100644 OpenRA.Irc/IrcUtils.cs delete mode 100644 OpenRA.Irc/Line.cs delete mode 100644 OpenRA.Irc/NumericCommand.cs delete mode 100644 OpenRA.Irc/OpenRA.Irc.csproj delete mode 100644 OpenRA.Irc/Settings.StyleCop delete mode 100644 OpenRA.Irc/Topic.cs delete mode 100644 OpenRA.Irc/User.cs delete mode 100644 OpenRA.Mods.RA/Widgets/Logic/IrcLogic.cs delete mode 100644 mods/cnc/chrome/irc.yaml delete mode 100644 mods/ra/chrome/irc.yaml diff --git a/Makefile b/Makefile index 2986ec25aa..1717c2e704 100644 --- a/Makefile +++ b/Makefile @@ -67,7 +67,7 @@ INSTALL_PROGRAM = $(INSTALL) -m755 INSTALL_DATA = $(INSTALL) -m644 # program targets -CORE = rsdl2 rnull game utility irc ralint +CORE = rsdl2 rnull game utility ralint TOOLS = editor tsbuild crashdialog VERSION = $(shell git name-rev --name-only --tags --no-undefined HEAD 2>/dev/null || echo git-`git rev-parse --short HEAD`) @@ -86,14 +86,6 @@ game_FLAGS = -win32icon:OpenRA.Game/OpenRA.ico PROGRAMS += game game: $(game_TARGET) -irc_SRCS := $(shell find OpenRA.Irc/ -iname '*.cs') -irc_TARGET = OpenRA.Irc.dll -irc_KIND = library -irc_DEPS = $(game_TARGET) -irc_LIBS = $(COMMON_LIBS) $(irc_DEPS) -PROGRAMS += irc -irc: $(irc_TARGET) - # Renderer dlls rsdl2_SRCS := $(shell find OpenRA.Renderer.Sdl2/ -iname '*.cs') rsdl2_TARGET = OpenRA.Renderer.Sdl2.dll @@ -123,13 +115,12 @@ mod_common: $(mod_common_TARGET) STD_MOD_LIBS = $(game_TARGET) STD_MOD_DEPS = $(STD_MOD_LIBS) $(ralint_TARGET) - # Red Alert mod_ra_SRCS := $(shell find OpenRA.Mods.RA/ -iname '*.cs') mod_ra_TARGET = mods/ra/OpenRA.Mods.RA.dll mod_ra_KIND = library -mod_ra_DEPS = $(STD_MOD_DEPS) $(mod_common_TARGET) $(irc_TARGET) -mod_ra_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_common_TARGET) $(irc_TARGET) +mod_ra_DEPS = $(STD_MOD_DEPS) $(mod_common_TARGET) +mod_ra_LIBS = $(COMMON_LIBS) $(STD_MOD_LIBS) $(mod_common_TARGET) PROGRAMS += mod_ra mod_ra: $(mod_ra_TARGET) diff --git a/OpenRA.Game/Settings.cs b/OpenRA.Game/Settings.cs index 781bffcad7..a8430f3da5 100644 --- a/OpenRA.Game/Settings.cs +++ b/OpenRA.Game/Settings.cs @@ -214,22 +214,6 @@ namespace OpenRA } } - public class IrcSettings - { - public string Hostname = "irc.openra.net"; - public int Port = 6667; - public string Nickname = null; - public string Username = "openra"; - public string Realname = null; - public string DefaultNickname = "Newbie"; - public string Channel = "global"; - public string TimestampFormat = "HH:mm:ss"; - public int ReconnectDelay = 10000; - public int ConnectionTimeout = 300000; - public bool Debug = false; - public bool ConnectAutomatically = false; - } - public class Settings { string settingsFile; @@ -241,7 +225,6 @@ namespace OpenRA public ServerSettings Server = new ServerSettings(); public DebugSettings Debug = new DebugSettings(); public KeySettings Keys = new KeySettings(); - public IrcSettings Irc = new IrcSettings(); public Dictionary Sections; @@ -257,7 +240,6 @@ namespace OpenRA { "Server", Server }, { "Debug", Debug }, { "Keys", Keys }, - { "Irc", Irc } }; // Override fieldloader to ignore invalid entries diff --git a/OpenRA.Irc/Channel.cs b/OpenRA.Irc/Channel.cs deleted file mode 100644 index 72df1f7fa4..0000000000 --- a/OpenRA.Irc/Channel.cs +++ /dev/null @@ -1,27 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2014 The OpenRA Developers (see AUTHORS) - * This file is part of OpenRA, which is free software. It is made - * available to you under the terms of the GNU General Public License - * as published by the Free Software Foundation. For more information, - * see COPYING. - */ -#endregion - -using System; -using OpenRA.Primitives; - -namespace OpenRA.Irc -{ - public class Channel - { - public readonly string Name; - public readonly ObservableSortedDictionary Users = new ObservableSortedDictionary(StringComparer.OrdinalIgnoreCase); - public Topic Topic = new Topic(); - - public Channel(string name) - { - Name = name; - } - } -} diff --git a/OpenRA.Irc/IrcClient.cs b/OpenRA.Irc/IrcClient.cs deleted file mode 100644 index 03befd5dd1..0000000000 --- a/OpenRA.Irc/IrcClient.cs +++ /dev/null @@ -1,400 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2014 The OpenRA Developers (see AUTHORS) - * This file is part of OpenRA, which is free software. It is made - * available to you under the terms of the GNU General Public License - * as published by the Free Software Foundation. For more information, - * see COPYING. - */ -#endregion - -using System; -using System.IO; -using System.Net.Sockets; -using System.Threading; -using OpenRA.Primitives; - -namespace OpenRA.Irc -{ - public sealed class IrcClient : IDisposable - { - public static readonly IrcClient Instance = new IrcClient(); - - public static string MainChannel { get { return '#' + Game.Settings.Irc.Channel; } } - - public static void AddHistory(string line) - { - Instance.History.Add("{0} {1}".F(DateTime.Now.ToString(Game.Settings.Irc.TimestampFormat), line)); - } - - public static void AddMessage(string nickname, string message) - { - AddHistory("{0}: {1}".F(nickname, message)); - } - - public static void AddNotice(string nickname, string message) - { - AddHistory("-{0}- {1}".F(nickname, message)); - } - - public static void AddSelfNotice(string nickname, string message) - { - AddHistory("-> -{0}- {1}".F(nickname, message)); - } - - public static void AddAction(string nickname, string message) - { - AddHistory("* {0} {1}".F(nickname, message)); - } - - static void InstanceInitialize() - { - var s = Game.Settings.Irc; - - Instance.OnPublicMessage += l => - { - var action = IrcUtils.FromAction(l.Message); - if (action != null) - AddAction(l.Prefix.Nickname, action); - else - AddMessage(l.Prefix.Nickname, l.Message); - }; - Instance.OnPrivateMessage += l => - { - var ctcp = IrcUtils.FromCtcp(l.Message); - if (ctcp == null) - return; - - var split = ctcp.Split(new[] { ' ' }, 2); - var command = split[0]; - if (command.EqualsIC("VERSION")) - { - var mod = Game.modData.Manifest.Mod; - Instance.CtcpRespond(l.Prefix.Nickname, command, "{0}: {1}".F(mod.Title, mod.Version)); - } - }; - Instance.OnPrivateNotice += l => - { - if (l.Target == "*") // Drop pre-register notices - return; - AddNotice(l.Prefix.Nickname, l.Message); - }; - Instance.OnRegister += l => - { - Instance.Join(MainChannel); - Game.Settings.Irc.Nickname = Instance.LocalUser.Nickname; - Game.Settings.Save(); - }; - Instance.OnConnecting += () => AddHistory("Connecting"); - Instance.OnConnect += () => AddHistory("Connected"); - Instance.OnPart += l => AddHistory("{0} left{1}".F(l.Prefix.Nickname, l.Message != null ? ": " + l.Message : "")); - Instance.OnJoin += l => AddHistory("{0} joined".F(l.Prefix.Nickname)); - Instance.OnQuit += l => AddHistory("{0} quit{1}".F(l.Prefix.Nickname, l.Message != null ? ": " + l.Message : "")); - Instance.OnKick += l => AddHistory("{0} kicked {1}{2}".F(l.Prefix.Nickname, l.KickeeNickname, l.Message != null ? ": " + l.Message : "")); - Instance.OnNicknameSet += l => - { - AddHistory("{0} set their nickname to {1}".F(l.Prefix.Nickname, l.NewNickname)); - if (l.NewNickname == Instance.LocalUser.Nickname) - { - Instance.Nickname = l.NewNickname; - Game.Settings.Irc.Nickname = l.NewNickname; - Game.Settings.Save(); - } - }; - Instance.OnTopicSet += l => AddHistory("{0} set the topic to {1}".F(l.Prefix.Nickname, l.Message)); - Instance.OnNumeric += l => - { - if (l.Numeric == NumericCommand.RPL_TOPIC) - { - var topic = Instance.GetChannel(MainChannel).Topic; - AddHistory("Topic is {0}".F(topic.Message)); - } - else if (l.Numeric == NumericCommand.RPL_TOPICWHOTIME) - { - var topic = Instance.GetChannel(MainChannel).Topic; - AddHistory("Topic set by {0} at {1}".F(topic.Author.Nickname, topic.Time.ToLocalTime())); - } - else if (l.Numeric == NumericCommand.RPL_NOTOPIC) - AddHistory("No topic is set"); - else if (l.Numeric == NumericCommand.ERR_NICKNAMEINUSE) - AddHistory("Nickname {0} is already in use".F(l.AltTarget)); - else if (l.Numeric == NumericCommand.ERR_ERRONEUSNICKNAME) - AddHistory("Nickname {0} is erroneus".F(l.AltTarget)); - }; - Instance.OnDisconnect += () => - { - if (Instance.ConnectionFailure != null) - { - AddHistory("Disconnected: {0}".F(Instance.ConnectionFailure.Message)); - if (s.ReconnectDelay >= 0) - { - AddHistory("Reconnecting in {0} seconds".F(s.ReconnectDelay / 1000)); - Instance.ConnectionState = IrcConnectionState.Reconnecting; - Game.RunAfterDelay(s.ReconnectDelay, () => - { - if (Instance.IsReconnecting) - Instance.Connect(Instance.Hostname, Instance.Port, Instance.ConnectionTimeout, Instance.Nickname, Instance.Username, Instance.Realname); - }); - } - } - else - AddHistory("Disconnected"); - }; - Instance.OnLineRead += l => - { - if (s.Debug) - AddHistory(l.RawString); - }; - Game.OnQuit += Instance.Disconnect; - } - - static IrcClient() - { - Log.AddChannel("irc", "irc.log"); - InstanceInitialize(); - } - - public readonly ObservableCollection History = new ObservableCollection(); - - IrcConnection connection; - Thread thread; - public IrcConnectionState ConnectionState { get; private set; } - public IrcClientUser LocalUser { get; private set; } - public Exception ConnectionFailure { get; private set; } - - public string Hostname { get; private set; } - public int Port { get; private set; } - public int ConnectionTimeout { get; private set; } - public string Nickname { get; private set; } - public string Username { get; private set; } - public string Realname { get; private set; } - - public bool IsConnected - { - get { return ConnectionState == IrcConnectionState.Connected; } - } - - public bool IsReconnecting - { - get { return ConnectionState == IrcConnectionState.Reconnecting; } - } - - public IrcClient() - { - ConnectionState = IrcConnectionState.Disconnected; - } - - public void Connect(string hostname, int port, int connectionTimeout, string nickname, string username, string realname) - { - ConnectionFailure = null; - if (IsConnected) - Disconnect(); - - Hostname = hostname; - Port = port; - ConnectionTimeout = connectionTimeout; - Nickname = nickname; - Username = username; - Realname = realname; - - thread = new Thread(() => - { - try - { - ConnectionState = IrcConnectionState.Connecting; - LocalUser = new IrcClientUser(this); - connection = new IrcConnection(); - OnConnecting(); - connection.Connect(hostname, port, connectionTimeout); - ConnectionState = IrcConnectionState.Connected; - OnConnect(); - SetNickname(nickname); - SetUser(username, realname); - ProcessLines(); - } - catch (Exception e) - { - Log.Write("irc", e.ToString()); - if (e is SocketException || e is IOException) - ConnectionFailure = e; - } - finally - { - Disconnect(); - } - }) { IsBackground = true }; - thread.Start(); - } - - public void WriteLine(string format, params object[] args) - { - try - { - connection.WriteLine(format, args); - } - catch (Exception e) - { - Log.Write("irc", e.ToString()); - if (e is SocketException || e is IOException) - ConnectionFailure = e; - Disconnect(); - } - } - - public void Disconnect() - { - if (!IsConnected || IsReconnecting) - { - ConnectionState = IrcConnectionState.Disconnected; - return; - } - - ConnectionState = IrcConnectionState.Disconnecting; - OnDisconnecting(); - if (connection != null) - connection.Close(); - ConnectionState = IrcConnectionState.Disconnected; - OnDisconnect(); - LocalUser = null; - connection = null; - } - - public void Dispose() - { - Disconnect(); - } - - void ProcessLines() - { - string line; - while (IsConnected && (line = connection.ReadLine()) != null) - ProcessLine(line); - } - - void ProcessLine(string line) - { - if (string.IsNullOrEmpty(line)) - return; - - var l = new Line(this, line); - OnLineRead(l); - - int numeric; - if (Exts.TryParseIntegerInvariant(l.Command, out numeric)) - { - var nl = new NumericLine(l, numeric); - LocalUser.OnNumeric(nl); - OnNumeric(nl); - switch (nl.Numeric) - { - case NumericCommand.RPL_WELCOME: - OnRegister(nl); - break; - case NumericCommand.RPL_ENDOFNAMES: - OnSync(nl); - break; - } - } - else - { - switch (l.Command) - { - case "PING": - Pong(l.Message); - OnPing(l); - break; - case "PRIVMSG": - if (IrcUtils.IsChannel(l.Target)) - OnPublicMessage(l); - else - OnPrivateMessage(l); - break; - case "NOTICE": - if (IrcUtils.IsChannel(l.Target)) - OnPublicNotice(l); - else - OnPrivateNotice(l); - break; - case "JOIN": - var jl = new JoinLine(l); - LocalUser.OnJoin(jl); - OnJoin(jl); - break; - case "PART": - LocalUser.OnPart(l); - OnPart(l); - break; - case "NICK": - var nsl = new NicknameSetLine(l); - LocalUser.OnNicknameSet(nsl); - OnNicknameSet(nsl); - break; - case "QUIT": - OnQuit(l); - LocalUser.OnQuit(l); - break; - case "KICK": - var kl = new KickLine(l); - LocalUser.OnKick(kl); - OnKick(kl); - break; - case "TOPIC": - LocalUser.OnTopicSet(l); - OnTopicSet(l); - break; - } - } - } - - public event Action OnRegister = l => { }; - public event Action OnSync = l => { }; - public event Action OnLineRead = _ => { }; - public event Action OnConnect = () => { }; - public event Action OnConnecting = () => { }; - public event Action OnDisconnect = () => { }; - public event Action OnDisconnecting = () => { }; - public event Action OnPublicMessage = _ => { }; - public event Action OnPublicNotice = _ => { }; - public event Action OnPrivateMessage = _ => { }; - public event Action OnPrivateNotice = _ => { }; - public event Action OnJoin = _ => { }; - public event Action OnPart = _ => { }; - public event Action OnNicknameSet = _ => { }; - public event Action OnQuit = _ => { }; - public event Action OnPing = _ => { }; - public event Action OnNumeric = _ => { }; - public event Action OnKick = _ => { }; - public event Action OnTopicSet = _ => { }; - - public void SetNickname(string nickname) { WriteLine("NICK {0}", nickname); } - public void SetUser(string username, string realname) { WriteLine("USER {0} 0 * :{1}", username, realname); } - public void Join(string channel) { WriteLine("JOIN {0}", channel); } - public void Part(string channel) { WriteLine("PART {0}", channel); } - public void Message(string target, string message) { WriteLine("PRIVMSG {0} :{1}", target, message); } - public void Notice(string target, string message) { WriteLine("NOTICE {0} :{1}", target, message); } - public void Pong(string reply) { WriteLine("PONG :{0}", reply); } - public void CtcpRequest(string target, string command, string request) { Message(target, IrcUtils.ToCtcp("{0} {1}".F(command, request))); } - public void CtcpRespond(string target, string command, string response) { Notice(target, IrcUtils.ToCtcp("{0} {1}".F(command, response))); } - public void Act(string target, string message) { Message(target, IrcUtils.ToAction(message)); } - public void GetTopic(string channel) { WriteLine("TOPIC {0}", channel); } - public void Quit(string message) { WriteLine("QUIT :{0}", message); } - - public Channel GetChannel(string channel) - { - if (!IsConnected) - return null; - Channel c; - LocalUser.Channels.TryGetValue(channel, out c); - return c; - } - } - - public enum IrcConnectionState - { - Disconnected, - Connected, - Disconnecting, - Connecting, - Reconnecting - } -} diff --git a/OpenRA.Irc/IrcClientUser.cs b/OpenRA.Irc/IrcClientUser.cs deleted file mode 100644 index 33be998592..0000000000 --- a/OpenRA.Irc/IrcClientUser.cs +++ /dev/null @@ -1,112 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2014 The OpenRA Developers (see AUTHORS) - * This file is part of OpenRA, which is free software. It is made - * available to you under the terms of the GNU General Public License - * as published by the Free Software Foundation. For more information, - * see COPYING. - */ -#endregion - -using System; -using System.Linq; -using OpenRA.Primitives; - -namespace OpenRA.Irc -{ - public class IrcClientUser : User - { - public readonly ObservableDictionary Channels = new ObservableDictionary(StringComparer.OrdinalIgnoreCase); - public readonly IrcClient Client; - - public IrcClientUser(IrcClient client) - { - Client = client; - } - - public void OnNumeric(NumericLine line) - { - switch (line.Numeric) - { - case NumericCommand.RPL_WELCOME: - new User(line.Message.Substring(line.Message.LastIndexOf(' ') + 1)).CopyTo(this); - break; - case NumericCommand.RPL_NAMREPLY: - { - var channel = line.GetChannel(); - var nicknames = line.Message.Replace("~", "").Replace("&", "").Replace("@", "").Replace("%", "").Replace("+", "").Split(' '); - - foreach (var nickname in nicknames.Where(n => !channel.Users.ContainsKey(n))) - channel.Users.Add(nickname, new User { Nickname = nickname }); - } - break; - case NumericCommand.RPL_TOPIC: - line.GetChannel().Topic.Message = line.Message; - break; - case NumericCommand.RPL_TOPICWHOTIME: - { - var topic = line.GetChannel().Topic; - topic.Author = new User(line[4]); - topic.Time = IrcUtils.DateTimeFromUnixTime(Exts.ParseIntegerInvariant(line[5])); - } - break; - case NumericCommand.ERR_NICKNAMEINUSE: - if (line.Target == "*") // no nickname set yet - Client.SetNickname(Client.Nickname + new Random().Next(10000, 99999)); - break; - } - } - - public void OnJoin(Line line) - { - if (line.PrefixIsSelf()) - Channels.Add(line.Target, new Channel(line.Target)); - - line.GetChannel().Users.Add(line.Prefix.Nickname, new User(line.Prefix)); - } - - public void OnPart(Line line) - { - line.GetChannel().Users.Remove(line.Prefix.Nickname); - - if (line.PrefixIsSelf()) - Channels.Remove(line.Target); - } - - public void OnNicknameSet(NicknameSetLine line) - { - if (line.PrefixIsSelf()) - Nickname = line.NewNickname; - - foreach (var channel in Channels.Values.Where(c => c.Users.ContainsKey(line.Prefix.Nickname))) - { - var user = channel.Users[line.Prefix.Nickname]; - channel.Users.Remove(line.Prefix.Nickname); - user.Nickname = line.NewNickname; - channel.Users.Add(line.NewNickname, user); - } - } - - public void OnQuit(Line line) - { - foreach (var channel in Channels) - channel.Value.Users.Remove(line.Prefix.Nickname); - } - - public void OnKick(KickLine line) - { - line.GetChannel().Users.Remove(line.KickeeNickname); - - if (line.KickeeNickname.EqualsIC(Nickname)) - Channels.Remove(line.Target); - } - - public void OnTopicSet(Line line) - { - var topic = line.GetChannel().Topic; - topic.Message = line.Message; - topic.Author = line.Prefix; - topic.Time = DateTime.UtcNow; - } - } -} diff --git a/OpenRA.Irc/IrcConnection.cs b/OpenRA.Irc/IrcConnection.cs deleted file mode 100644 index 7359b90723..0000000000 --- a/OpenRA.Irc/IrcConnection.cs +++ /dev/null @@ -1,72 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2014 The OpenRA Developers (see AUTHORS) - * This file is part of OpenRA, which is free software. It is made - * available to you under the terms of the GNU General Public License - * as published by the Free Software Foundation. For more information, - * see COPYING. - */ -#endregion - -using System; -using System.IO; -using System.Net.Sockets; - -namespace OpenRA.Irc -{ - public sealed class IrcConnection : IDisposable - { - TcpClient socket; - Stream stream; - StreamWriter writer; - StreamReader reader; - bool disposed; - - public void Connect(string hostname, int port, int connectionTimeout) - { - CheckDisposed(); - if (socket != null && socket.Connected) - throw new InvalidOperationException("Socket already connected"); - - socket = new TcpClient(hostname, port); - socket.ReceiveTimeout = socket.SendTimeout = connectionTimeout; - stream = socket.GetStream(); - writer = new StreamWriter(stream) { AutoFlush = true }; - reader = new StreamReader(stream); - } - - public void WriteLine(string format, params object[] args) - { - CheckDisposed(); - writer.WriteLine(format, args); - } - - public string ReadLine() - { - CheckDisposed(); - return reader.ReadLine(); - } - - public void Close() - { - if (disposed) - return; - disposed = true; - if (socket != null) socket.Close(); - if (stream != null) stream.Close(); - if (writer != null) writer.Close(); - if (reader != null) reader.Close(); - } - - public void Dispose() - { - Close(); - } - - void CheckDisposed() - { - if (disposed) - throw new ObjectDisposedException(GetType().FullName); - } - } -} diff --git a/OpenRA.Irc/IrcUtils.cs b/OpenRA.Irc/IrcUtils.cs deleted file mode 100644 index 5fdb50d129..0000000000 --- a/OpenRA.Irc/IrcUtils.cs +++ /dev/null @@ -1,67 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2014 The OpenRA Developers (see AUTHORS) - * This file is part of OpenRA, which is free software. It is made - * available to you under the terms of the GNU General Public License - * as published by the Free Software Foundation. For more information, - * see COPYING. - */ -#endregion - -using System; -using System.Linq; - -namespace OpenRA.Irc -{ - public static class IrcUtils - { - public static bool IsChannel(string s) - { - return !string.IsNullOrEmpty(s) && s[0] == '#'; - } - - public static bool IsNickname(string s) - { - return !string.IsNullOrEmpty(s) && (char.IsLetter(s[0]) || NicknameSpecialChars.Contains(s[0])) - && s.Substring(1).All(c => char.IsLetterOrDigit(c) || NicknameSpecialChars.Contains(c) || c == '-'); - } - - const string NicknameSpecialChars = @"[]\`_^{|}"; - - public static DateTime DateTimeFromUnixTime(int seconds) - { - return new DateTime(1970, 1, 1).AddSeconds(seconds); - } - - public static bool EqualsIC(this string a, string b) - { - return a.Equals(b, StringComparison.OrdinalIgnoreCase); - } - - public static string FromCtcp(string message) - { - if (message.Length < 2 || !message.StartsWith("\x0001") || !message.EndsWith("\x0001")) - return null; - - return message.Substring(1, message.Length - 2); - } - - public static string ToCtcp(string message) - { - return "\x0001{0}\x0001".F(message); - } - - public static string FromAction(string message) - { - if (!message.StartsWith("\x0001ACTION ") || !message.EndsWith("\x0001")) - return null; - - return message.Substring(8, message.Length - 8 - 1); - } - - public static string ToAction(string message) - { - return "\x0001ACTION {0}\x0001".F(message); - } - } -} diff --git a/OpenRA.Irc/Line.cs b/OpenRA.Irc/Line.cs deleted file mode 100644 index c476913de9..0000000000 --- a/OpenRA.Irc/Line.cs +++ /dev/null @@ -1,155 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2014 The OpenRA Developers (see AUTHORS) - * This file is part of OpenRA, which is free software. It is made - * available to you under the terms of the GNU General Public License - * as published by the Free Software Foundation. For more information, - * see COPYING. - */ -#endregion - -using System.Linq; - -namespace OpenRA.Irc -{ - public class Line - { - public readonly IrcClient Client; - public readonly string RawString; - public readonly string[] RawStringParts; - public readonly User Prefix; - public readonly string Command; - public string Target { get; protected set; } - public string Message { get; protected set; } - - public Line(Line line) - { - Client = line.Client; - RawString = line.RawString; - RawStringParts = line.RawStringParts; - Prefix = line.Prefix; - Command = line.Command; - Target = line.Target; - Message = line.Message; - } - - public Line(IrcClient client, string line) - { - RawString = line; - RawStringParts = line.Split(' '); - Client = client; - - if (line[0] == ':') - { - line = line.Substring(1); - var prefixDelim = line.Split(new[] { ' ' }, 2); - Prefix = new User(prefixDelim[0]); - - if (prefixDelim.Length > 1) - { - var messageDelim = prefixDelim[1].Split(new[] { ':' }, 2); - - var args = messageDelim[0].Trim().Split(' '); - - Command = args[0]; - if (args.Length > 1) - Target = args[1]; - - if (messageDelim.Length > 1) - Message = messageDelim[1]; - } - } - else - { - var messageDelim = line.Split(new[] { ':' }, 2); - - var args = messageDelim[0].Trim().Split(' '); - - Command = args[0]; - if (args.Length > 1) - Target = args[1]; - - if (messageDelim.Length > 1) - Message = messageDelim[1]; - } - } - - public virtual Channel GetChannel() - { - return Client.GetChannel(Target); - } - - public string this[int index] - { - get { return RawStringParts[index]; } - } - - public bool PrefixIsSelf() - { - return Client.LocalUser != null && Prefix.Nickname.EqualsIC(Client.LocalUser.Nickname); - } - - public bool TargetIsSelf() - { - return Target != null && Target.EqualsIC(Client.LocalUser.Nickname); - } - } - - public class NicknameSetLine : Line - { - public readonly string NewNickname; - - public NicknameSetLine(Line line) - : base(line) - { - NewNickname = Message; - } - } - - public class NumericLine : Line - { - public readonly NumericCommand Numeric; - public readonly string AltTarget; - - public override Channel GetChannel() - { - if (IrcUtils.IsChannel(AltTarget)) - return Client.GetChannel(AltTarget); - return Client.GetChannel(Target); - } - - public NumericLine(Line line, int numeric) - : base(line) - { - if (!IrcUtils.IsChannel(Target)) - { - var numericParts = line.RawStringParts.Skip(1).TakeWhile(p => !p.StartsWith(":")); - AltTarget = numericParts.LastOrDefault(IrcUtils.IsChannel); - if (AltTarget == null) - AltTarget = numericParts.LastOrDefault(); - } - Numeric = (NumericCommand)numeric; - } - } - - public class JoinLine : Line // for compatibility with certain IRCds - { - public JoinLine(Line line) - : base(line) - { - if (Message != null) // don't overwrite the target if it was already set properly by the IRCd - Target = Message; - } - } - - public class KickLine : Line - { - public readonly string KickeeNickname; - - public KickLine(Line line) - : base(line) - { - KickeeNickname = this[3]; - } - } -} diff --git a/OpenRA.Irc/NumericCommand.cs b/OpenRA.Irc/NumericCommand.cs deleted file mode 100644 index b4e8e5b787..0000000000 --- a/OpenRA.Irc/NumericCommand.cs +++ /dev/null @@ -1,25 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2014 The OpenRA Developers (see AUTHORS) - * This file is part of OpenRA, which is free software. It is made - * available to you under the terms of the GNU General Public License - * as published by the Free Software Foundation. For more information, - * see COPYING. - */ -#endregion - -namespace OpenRA.Irc -{ - public enum NumericCommand - { - Undefined = 0, - RPL_WELCOME = 001, - RPL_NOTOPIC = 331, - RPL_TOPIC = 332, - RPL_TOPICWHOTIME = 333, - RPL_NAMREPLY = 353, - RPL_ENDOFNAMES = 366, - ERR_ERRONEUSNICKNAME = 432, - ERR_NICKNAMEINUSE = 433 - } -} diff --git a/OpenRA.Irc/OpenRA.Irc.csproj b/OpenRA.Irc/OpenRA.Irc.csproj deleted file mode 100644 index 16be64721c..0000000000 --- a/OpenRA.Irc/OpenRA.Irc.csproj +++ /dev/null @@ -1,59 +0,0 @@ - - - - - Debug - AnyCPU - {85B48234-8B31-4BE6-AF9C-665CC6866841} - Library - Properties - OpenRA.Irc - OpenRA.Irc - 512 - - - - - true - full - ..\ - DEBUG;TRACE - x86 - prompt - AllRules.ruleset - true - - - - - - - - - - - - - - - - - - {0DFB103F-2962-400F-8C6D-E2C28CCBA633} - OpenRA.Game - False - - - - - - - - - \ No newline at end of file diff --git a/OpenRA.Irc/Settings.StyleCop b/OpenRA.Irc/Settings.StyleCop deleted file mode 100644 index 1590d17baa..0000000000 --- a/OpenRA.Irc/Settings.StyleCop +++ /dev/null @@ -1,344 +0,0 @@ - - - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - - - - - - False - - - - - - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - - - - - - False - - - - - False - - - - - False - - - - - - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - False - - - - - - - - - - False - - - - - False - - - - - False - - - - - False - - - - - - - \ No newline at end of file diff --git a/OpenRA.Irc/Topic.cs b/OpenRA.Irc/Topic.cs deleted file mode 100644 index 36d5bdb387..0000000000 --- a/OpenRA.Irc/Topic.cs +++ /dev/null @@ -1,30 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2014 The OpenRA Developers (see AUTHORS) - * This file is part of OpenRA, which is free software. It is made - * available to you under the terms of the GNU General Public License - * as published by the Free Software Foundation. For more information, - * see COPYING. - */ -#endregion - -using System; - -namespace OpenRA.Irc -{ - public class Topic - { - public string Message; - public User Author; - public DateTime Time; - - public Topic() { } - - public Topic(string message, User author, DateTime time) - { - Message = message; - Author = author; - Time = time; - } - } -} diff --git a/OpenRA.Irc/User.cs b/OpenRA.Irc/User.cs deleted file mode 100644 index f045c89d84..0000000000 --- a/OpenRA.Irc/User.cs +++ /dev/null @@ -1,73 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2014 The OpenRA Developers (see AUTHORS) - * This file is part of OpenRA, which is free software. It is made - * available to you under the terms of the GNU General Public License - * as published by the Free Software Foundation. For more information, - * see COPYING. - */ -#endregion - -using System; - -namespace OpenRA.Irc -{ - public class User - { - public string Nickname; - public string Username; - public string Hostname; - - public User() { } - - public User(User user) - { - Nickname = user.Nickname; - Username = user.Username; - Hostname = user.Hostname; - } - - public void CopyTo(User user) - { - user.Nickname = Nickname; - user.Username = Username; - user.Hostname = Hostname; - } - - public User(string prefix) - { - if (string.IsNullOrEmpty(prefix)) - throw new ArgumentException("prefix"); - - var ex = prefix.IndexOf('!'); - var at = prefix.IndexOf('@'); - - if (ex >= 0 && at >= 0 && at < ex) - throw new ArgumentException("Bogus input string: @ before !"); - - if (ex >= 0) - { - Nickname = prefix.Substring(0, ex); - if (at >= 0) - { - Username = prefix.Substring(ex + 1, at - ex - 1); - Hostname = prefix.Substring(at + 1); - } - else - Username = prefix.Substring(ex + 1); - } - else - Nickname = prefix; - } - - public override string ToString() - { - var ret = "" + Nickname; - if (Username != null) - ret += "!" + Username; - if (Hostname != null) - ret += "@" + Hostname; - return ret; - } - } -} diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index ff41de2412..50c4933903 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -357,7 +357,6 @@ - @@ -531,11 +530,6 @@ OpenRA.Game False - - {85B48234-8B31-4BE6-AF9C-665CC6866841} - OpenRA.Irc - False - {fe6c8cc0-2f07-442a-b29f-17617b3b7fc6} OpenRA.Mods.Common diff --git a/OpenRA.Mods.RA/Widgets/Logic/IrcLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/IrcLogic.cs deleted file mode 100644 index b883992516..0000000000 --- a/OpenRA.Mods.RA/Widgets/Logic/IrcLogic.cs +++ /dev/null @@ -1,252 +0,0 @@ -#region Copyright & License Information -/* - * Copyright 2007-2014 The OpenRA Developers (see AUTHORS) - * This file is part of OpenRA, which is free software. It is made - * available to you under the terms of the GNU General Public License - * as published by the Free Software Foundation. For more information, - * see COPYING. - */ -#endregion - -using System; -using System.Collections.Generic; -using System.Linq; -using OpenRA.Irc; -using OpenRA.Widgets; - -namespace OpenRA.Mods.RA.Widgets.Logic -{ - class IrcLogic - { - TextFieldWidget inputBox; - TextFieldWidget nicknameBox; - Widget connectBG; - Widget ircContainer; - - [ObjectCreator.UseCtor] - public IrcLogic(Widget widget) - { - var historyPanel = widget.Get("HISTORY_PANEL"); - var historyTemplate = widget.Get("HISTORY_TEMPLATE"); - var nicknamePanel = widget.Get("NICKNAME_PANEL"); - var nicknameTemplate = widget.Get("NICKNAME_TEMPLATE"); - - inputBox = widget.Get("INPUT_BOX"); - inputBox.OnEnterKey = EnterPressed; - inputBox.OnTabKey = TabPressed; - inputBox.IsDisabled = () => IrcClient.Instance.GetChannel(IrcClient.MainChannel) == null; - - nicknameBox = widget.Get("NICKNAME_BOX"); - nicknameBox.Text = ChooseNickname(Game.Settings.Irc.Nickname); - - connectBG = widget.Get("IRC_CONNECT_BG"); - ircContainer = widget.Get("IRC_CONTAINER"); - - widget.Get("DISCONNECT_BUTTON").OnClick = IrcClient.Instance.Disconnect; - - MaybeShowConnectPanel(); - - historyPanel.Bind(IrcClient.Instance.History, item => MakeLabelWidget(historyTemplate, item), LabelItemEquals, true); - - var mainChannel = IrcClient.Instance.GetChannel(IrcClient.MainChannel); - if (mainChannel != null) - nicknamePanel.Bind(mainChannel.Users, item => MakeLabelWidget(nicknameTemplate, item), LabelItemEquals, false); - - IrcClient.Instance.OnSync += l => - { - var channel = l.GetChannel(); - if (channel.Name.EqualsIC(IrcClient.MainChannel)) - nicknamePanel.Bind(channel.Users, item => MakeLabelWidget(nicknameTemplate, item), LabelItemEquals, false); - }; - IrcClient.Instance.OnKick += l => - { - if (l.KickeeNickname.EqualsIC(IrcClient.Instance.LocalUser.Nickname) && l.Target.EqualsIC(IrcClient.MainChannel)) - nicknamePanel.Unbind(); - }; - IrcClient.Instance.OnPart += l => - { - if (l.PrefixIsSelf() && l.Target.EqualsIC(IrcClient.MainChannel)) - nicknamePanel.Unbind(); - }; - IrcClient.Instance.OnDisconnect += () => - { - nicknamePanel.Unbind(); - MaybeShowConnectPanel(); - }; - - commands.Add("me", args => - { - IrcClient.Instance.Act(IrcClient.MainChannel, args); - IrcClient.AddAction(IrcClient.Instance.LocalUser.Nickname, args); - }); - commands.Add("slap", args => - { - IrcClient.Instance.Act(IrcClient.MainChannel, "slaps {0} around a bit with a large trout".F(args)); - IrcClient.AddAction(IrcClient.Instance.LocalUser.Nickname, "slaps {0} around a bit with a large trout".F(args)); - }); - commands.Add("notice", args => - { - var split = args.Split(new[] { ' ' }, 2); - if (split.Length < 2) - { - IrcClient.AddHistory("/notice: Not enough arguments"); - return; - } - IrcClient.Instance.Notice(split[0], split[1]); - IrcClient.AddSelfNotice(split[0], split[1]); - }); - commands.Add("disconnect", args => - { - Game.Settings.Irc.ConnectAutomatically = false; - Game.Settings.Save(); - IrcClient.Instance.Disconnect(); - }); - commands.Add("quit", args => - { - Game.Settings.Irc.ConnectAutomatically = false; - Game.Settings.Save(); - if (IrcClient.Instance.IsConnected) - IrcClient.Instance.Quit(args); - else - IrcClient.Instance.Disconnect(); - }); - commands.Add("nick", args => IrcClient.Instance.SetNickname(args)); - commands.Add("topic", args => IrcClient.Instance.GetTopic(IrcClient.MainChannel)); - } - - void MaybeShowConnectPanel() - { - if (IrcClient.Instance.IsConnected || IrcClient.Instance.IsReconnecting) - { - ircContainer.Visible = true; - connectBG.Visible = false; - return; - } - - if (Game.Settings.Irc.ConnectAutomatically) - { - ircContainer.Visible = true; - connectBG.Visible = false; - Connect(); - return; - } - - ircContainer.Visible = false; - connectBG.Visible = true; - - var connectAutomaticallyCheckBox = connectBG.Get("CONNECT_AUTOMATICALLY_CHECKBOX"); - var connectAutomaticallyChecked = false; - connectAutomaticallyCheckBox.IsChecked = () => connectAutomaticallyChecked; - connectAutomaticallyCheckBox.OnClick = () => connectAutomaticallyChecked ^= true; - - var connectButton = connectBG.Get("CONNECT_BUTTON"); - - connectButton.OnClick = () => - { - ircContainer.Visible = true; - connectBG.Visible = false; - - Game.Settings.Irc.ConnectAutomatically = connectAutomaticallyCheckBox.IsChecked(); - Game.Settings.Save(); - Connect(); - }; - } - - static string ChooseNickname(string nickname) - { - if (!IrcUtils.IsNickname(nickname)) - { - nickname = Game.Settings.Player.Name; - if (!IrcUtils.IsNickname(nickname)) - nickname = Game.Settings.Irc.DefaultNickname; - } - return nickname; - } - - void Connect() - { - var nickname = ChooseNickname(nicknameBox.Text); - var s = Game.Settings.Irc; - s.Nickname = nickname; - Game.Settings.Save(); - IrcClient.Instance.Connect(s.Hostname, s.Port, s.ConnectionTimeout, nickname, s.Username ?? nickname, s.Realname ?? nickname); - } - - static Widget MakeLabelWidget(LabelWidget template, object item) - { - var itemString = item.ToString(); - var widget = (LabelWidget)template.Clone(); - var font = Game.Renderer.Fonts[widget.Font]; - itemString = WidgetUtils.WrapText(itemString, widget.Bounds.Width, font); - widget.Bounds.Height = font.Measure(itemString).Y; - widget.GetText = () => itemString; - return widget; - } - - bool LabelItemEquals(Widget widget, object item) - { - return item != null && ((LabelWidget)widget).GetText() == item.ToString(); - } - - bool EnterPressed() - { - if (!inputBox.Text.Any()) - return true; - - var text = inputBox.Text; - inputBox.Text = ""; - - if (text[0] == '/') - { - var parts = text.Split(new[] { ' ' }, 2); - var name = parts[0].Substring(1); - var args = parts.Length > 1 ? parts[1] : null; - - Action command; - if (!commands.TryGetValue(name, out command)) - { - IrcClient.AddHistory("{0}: Unknown command".F(name)); - return true; - } - command(args); - } - else - { - IrcClient.Instance.Message(IrcClient.MainChannel, text); - IrcClient.AddMessage(IrcClient.Instance.LocalUser.Nickname, text); - } - return true; - } - - Dictionary> commands = new Dictionary>(StringComparer.OrdinalIgnoreCase); - - List tabMatches = new List(); - int tabMatchesIndex = -1; - - bool TabPressed() - { - if (!inputBox.Text.Any()) - return true; - - var channel = IrcClient.Instance.GetChannel(IrcClient.MainChannel); - - if (channel == null) - return true; - - var spaceIndex = inputBox.Text.TrimEnd().LastIndexOf(' '); - var tabMatchtext = inputBox.Text.Substring(spaceIndex + 1); - - if (tabMatchesIndex < 0 || !tabMatches.Any() || tabMatchtext != tabMatches[tabMatchesIndex]) - tabMatches = channel.Users.Keys.Where(u => u.StartsWith(tabMatchtext, StringComparison.OrdinalIgnoreCase)).ToList(); - - if (!tabMatches.Any()) - return true; - - tabMatchesIndex = (tabMatchesIndex + 1) % tabMatches.Count; - inputBox.Text = inputBox.Text.Remove(spaceIndex + 1) + tabMatches[tabMatchesIndex]; - inputBox.CursorPosition = inputBox.Text.Length; - - return true; - } - } -} diff --git a/OpenRA.Mods.RA/Widgets/Logic/ServerBrowserLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/ServerBrowserLogic.cs index bab0f4dd40..65da1d1834 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/ServerBrowserLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/ServerBrowserLogic.cs @@ -107,7 +107,6 @@ namespace OpenRA.Mods.RA.Widgets.Logic showIncompatibleCheckbox.OnClick = () => { showIncompatible ^= true; RefreshServerList(); }; } - // Game.LoadWidget(null, "SERVERBROWSER_IRC", panel.Get("IRC_ROOT"), new WidgetArgs()); RefreshServerList(); } diff --git a/OpenRA.sln b/OpenRA.sln index b03bf4976d..89b342a0ab 100644 --- a/OpenRA.sln +++ b/OpenRA.sln @@ -21,8 +21,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.D2k", "OpenRA.M EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.TS", "OpenRA.Mods.TS\OpenRA.Mods.TS.csproj", "{5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Irc", "OpenRA.Irc\OpenRA.Irc.csproj", "{85B48234-8B31-4BE6-AF9C-665CC6866841}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Renderer.Sdl2", "OpenRA.Renderer.Sdl2\OpenRA.Renderer.Sdl2.csproj", "{33D03738-C154-4028-8EA8-63A3C488A651}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.Common", "OpenRA.Mods.Common\OpenRA.Mods.Common.csproj", "{FE6C8CC0-2F07-442A-B29F-17617B3B7FC6}" @@ -101,8 +99,6 @@ Global {C0B0465C-6BE2-409C-8770-3A9BF64C4344}.Debug|x86.Build.0 = Debug|x86 {5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}.Debug|x86.ActiveCfg = Debug|x86 {5457CBF5-4CE4-421E-A8BF-9FD6C9732E1D}.Debug|x86.Build.0 = Debug|x86 - {85B48234-8B31-4BE6-AF9C-665CC6866841}.Debug|x86.ActiveCfg = Debug|x86 - {85B48234-8B31-4BE6-AF9C-665CC6866841}.Debug|x86.Build.0 = Debug|x86 {33D03738-C154-4028-8EA8-63A3C488A651}.Debug|x86.ActiveCfg = Debug|x86 {33D03738-C154-4028-8EA8-63A3C488A651}.Debug|x86.Build.0 = Debug|x86 {47F1B0EE-EB35-47F2-93E4-273C70909157}.Debug|x86.ActiveCfg = Debug|x86 diff --git a/mods/cnc/chrome/irc.yaml b/mods/cnc/chrome/irc.yaml deleted file mode 100644 index 0165e25cf3..0000000000 --- a/mods/cnc/chrome/irc.yaml +++ /dev/null @@ -1,70 +0,0 @@ -Container@SERVERBROWSER_IRC: - Logic: IrcLogic - Width: 700 - Height: 250 - Children: - Container@IRC_CONTAINER: - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Children: - ScrollPanel@HISTORY_PANEL: - Width: 565 - Height: PARENT_BOTTOM - 30 - ItemSpacing: 5 - Label@HISTORY_TEMPLATE: - X: 5 - Width: 530 - Height: 25 - WordWrap: True - TextField@INPUT_BOX: - Y: PARENT_BOTTOM - 25 - Width: 565 - Height: 25 - ScrollPanel@NICKNAME_PANEL: - X: 570 - Width: 130 - Height: PARENT_BOTTOM - 30 - Label@NICKNAME_TEMPLATE: - X: 5 - Button@DISCONNECT_BUTTON: - X: 570 - Y: PARENT_BOTTOM - 25 - Width: 130 - Height: 25 - Text: Disconnect - Font: Bold - Background@IRC_CONNECT_BG: - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Background: scrollpanel-bg - Children: - Label@GLOBAL_CHAT_LABEL: - Y: PARENT_BOTTOM / 4 - Width: PARENT_RIGHT - Align: Center - Text: Global Chat - Font: Bold - Label@NICKNAME_LABEL: - X: 200 - Y: PARENT_BOTTOM / 4 + 35 - Text: Nickname: - TextField@NICKNAME_BOX: - X: 270 - Y: PARENT_BOTTOM / 4 + 25 - Width: 150 - Height: 25 - Checkbox@CONNECT_AUTOMATICALLY_CHECKBOX: - X: 270 - Y: PARENT_BOTTOM / 4 + 75 - Height: 20 - Width: 180 - Font: Regular - Text: Connect Automatically - Button@CONNECT_BUTTON: - X: 430 - Y: PARENT_BOTTOM / 4 + 25 - Width: 100 - Height: 25 - Text: Connect - Font: Bold - diff --git a/mods/cnc/mod.yaml b/mods/cnc/mod.yaml index c7d0354c08..7f05f07f05 100644 --- a/mods/cnc/mod.yaml +++ b/mods/cnc/mod.yaml @@ -103,7 +103,6 @@ ChromeLayout: ./mods/cnc/chrome/credits.yaml ./mods/cnc/chrome/dialogs.yaml ./mods/cnc/chrome/tooltips.yaml - ./mods/cnc/chrome/irc.yaml ./mods/cnc/chrome/assetbrowser.yaml ./mods/cnc/chrome/missionbrowser.yaml diff --git a/mods/d2k/mod.yaml b/mods/d2k/mod.yaml index 293fd183e8..64fe2a567e 100644 --- a/mods/d2k/mod.yaml +++ b/mods/d2k/mod.yaml @@ -91,7 +91,6 @@ ChromeLayout: ./mods/ra/chrome/musicplayer.yaml ./mods/d2k/chrome/tooltips.yaml ./mods/ra/chrome/assetbrowser.yaml - ./mods/ra/chrome/irc.yaml ./mods/ra/chrome/missionbrowser.yaml ./mods/ra/chrome/confirmation-dialogs.yaml diff --git a/mods/ra/chrome/irc.yaml b/mods/ra/chrome/irc.yaml deleted file mode 100644 index 7926b90704..0000000000 --- a/mods/ra/chrome/irc.yaml +++ /dev/null @@ -1,69 +0,0 @@ -Container@SERVERBROWSER_IRC: - Logic: IrcLogic - Width: 700 - Height: 250 - Children: - Container@IRC_CONTAINER: - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Children: - ScrollPanel@HISTORY_PANEL: - Width: 565 - Height: PARENT_BOTTOM - 30 - ItemSpacing: 5 - Label@HISTORY_TEMPLATE: - X: 5 - Width: 530 - Height: 25 - WordWrap: True - TextField@INPUT_BOX: - Y: PARENT_BOTTOM - 25 - Width: 565 - Height: 25 - ScrollPanel@NICKNAME_PANEL: - X: 570 - Width: 130 - Height: PARENT_BOTTOM - 30 - Label@NICKNAME_TEMPLATE: - X: 5 - Button@DISCONNECT_BUTTON: - X: 570 - Y: PARENT_BOTTOM - 25 - Width: 130 - Height: 25 - Text: Disconnect - Font: Bold - Background@IRC_CONNECT_BG: - Width: PARENT_RIGHT - Height: PARENT_BOTTOM - Background: scrollpanel-bg - Children: - Label@GLOBAL_CHAT_LABEL: - Y: PARENT_BOTTOM / 4 - Width: PARENT_RIGHT - Align: Center - Text: Global Chat - Font: Bold - Label@NICKNAME_LABEL: - X: 200 - Y: PARENT_BOTTOM / 4 + 35 - Text: Nickname: - TextField@NICKNAME_BOX: - X: 270 - Y: PARENT_BOTTOM / 4 + 25 - Width: 150 - Height: 25 - Checkbox@CONNECT_AUTOMATICALLY_CHECKBOX: - X: 270 - Y: PARENT_BOTTOM / 4 + 75 - Height: 20 - Width: 180 - Text: Connect Automatically - Button@CONNECT_BUTTON: - X: 430 - Y: PARENT_BOTTOM / 4 + 25 - Width: 100 - Height: 25 - Text: Connect - Font: Bold - diff --git a/mods/ra/mod.yaml b/mods/ra/mod.yaml index 1231ab89f2..640a46fe29 100644 --- a/mods/ra/mod.yaml +++ b/mods/ra/mod.yaml @@ -104,7 +104,6 @@ ChromeLayout: ./mods/ra/chrome/musicplayer.yaml ./mods/ra/chrome/tooltips.yaml ./mods/ra/chrome/assetbrowser.yaml - ./mods/ra/chrome/irc.yaml ./mods/ra/chrome/missionbrowser.yaml ./mods/ra/chrome/confirmation-dialogs.yaml diff --git a/mods/ts/mod.yaml b/mods/ts/mod.yaml index cc905d1d50..8180d55692 100644 --- a/mods/ts/mod.yaml +++ b/mods/ts/mod.yaml @@ -133,7 +133,6 @@ ChromeLayout: ./mods/ra/chrome/musicplayer.yaml ./mods/ra/chrome/tooltips.yaml ./mods/ra/chrome/assetbrowser.yaml - ./mods/ra/chrome/irc.yaml ./mods/ra/chrome/missionbrowser.yaml ./mods/ra/chrome/confirmation-dialogs.yaml diff --git a/packaging/package-all.sh b/packaging/package-all.sh index 7767970584..4bf50a5194 100755 --- a/packaging/package-all.sh +++ b/packaging/package-all.sh @@ -31,7 +31,7 @@ markdown Lua-API.md > Lua-API.html # List of files that are packaged on all platforms FILES=('OpenRA.Game.exe' 'OpenRA.Editor.exe' 'OpenRA.Utility.exe' 'OpenRA.CrashDialog.exe' \ -'OpenRA.Renderer.Sdl2.dll' 'OpenRA.Renderer.Null.dll' 'OpenRA.Irc.dll' \ +'OpenRA.Renderer.Sdl2.dll' 'OpenRA.Renderer.Null.dll' \ 'FreeSans.ttf' 'FreeSansBold.ttf' 'lua' \ 'glsl' 'mods/common' 'mods/ra' 'mods/cnc' 'mods/d2k' 'mods/modchooser' \ 'AUTHORS' 'COPYING' \ diff --git a/packaging/windows/OpenRA.nsi b/packaging/windows/OpenRA.nsi index 2caead9fe8..f4f59bc98b 100644 --- a/packaging/windows/OpenRA.nsi +++ b/packaging/windows/OpenRA.nsi @@ -70,7 +70,6 @@ Section "Game" GAME File "${SRCDIR}\OpenRA.CrashDialog.exe" File "${SRCDIR}\OpenRA.Renderer.Null.dll" File "${SRCDIR}\OpenRA.Renderer.Sdl2.dll" - File "${SRCDIR}\OpenRA.Irc.dll" File "${SRCDIR}\ICSharpCode.SharpZipLib.dll" File "${SRCDIR}\FuzzyLogicLibrary.dll" File "${SRCDIR}\Mono.Nat.dll" @@ -190,7 +189,6 @@ Function ${UN}Clean Delete $INSTDIR\OpenRA.Editor.exe Delete $INSTDIR\OpenRA.Renderer.Null.dll Delete $INSTDIR\OpenRA.Renderer.Sdl2.dll - Delete $INSTDIR\OpenRA.Irc.dll Delete $INSTDIR\ICSharpCode.SharpZipLib.dll Delete $INSTDIR\FuzzyLogicLibrary.dll Delete $INSTDIR\Mono.Nat.dll