Changeset 133 for binary-improvements/7dtd-server-fixes/src
- Timestamp:
- Aug 27, 2014, 3:29:15 AM (10 years ago)
- Location:
- binary-improvements/7dtd-server-fixes/src/NetConnections
- Files:
-
- 6 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/NetConnections/NetTelnetServer.cs
r132 r133 6 6 using System.Reflection; 7 7 using System.Threading; 8 using UnityEngine; 8 9 9 10 namespace AllocsFixes.NetConnections … … 11 12 public class NetTelnetServer 12 13 { 13 private static List<IServer> servers = new List<IServer> ();14 private static List<IServer> servers = new List<IServer> (); 14 15 15 16 public static void init (int port) … … 17 18 try { 18 19 Log.Out ("[7dtd-server-fixes by Alloc] Version: " + Assembly.GetExecutingAssembly ().GetName ().Version); 19 servers.Add(new Servers.Telnet.Telnet(port)); 20 servers.Add (new Servers.Telnet.Telnet (port)); 21 22 int webPort = GamePrefs.GetInt (EnumGamePrefs.ControlPanelPort); 23 if (GamePrefs.GetBool (EnumGamePrefs.ControlPanelEnabled) && webPort > 0 && webPort < 65534) { 24 if (Directory.Exists (Application.dataPath + "/../webserver")) { 25 servers.Add (new Servers.Web.Web (webPort + 2)); 26 } 27 } 20 28 } catch (Exception e) { 21 Log.Out ("Error in AllocsTelnetServer.init: " + e);29 Log.Out ("Error in NetTelnetServer.init: " + e); 22 30 } 23 31 } … … 30 38 { 31 39 foreach (IServer s in servers) 32 s.Disconnect ();40 s.Disconnect (); 33 41 } 34 42 … … 39 47 } 40 48 foreach (IServer s in servers) 41 s.WriteToClient (line);49 s.WriteToClient (line); 42 50 } 43 51 … … 48 56 } 49 57 foreach (IServer s in servers) 50 s.WriteToClient_Single (line, client);58 s.WriteToClient_Single (line, client); 51 59 } 52 60 }
Note:
See TracChangeset
for help on using the changeset viewer.