Changeset 93 for binary-improvements/7dtd-server-fixes
- Timestamp:
- Jul 20, 2014, 8:50:13 PM (10 years ago)
- Location:
- binary-improvements/7dtd-server-fixes
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/7dtd-server-fixes.csproj
r84 r93 48 48 <Compile Include="src\TelnetCommands\SetTimeReal.cs" /> 49 49 <Compile Include="src\AdminToolsStuff.cs" /> 50 <Compile Include="src\TelnetCommands\ShowInventory.cs" /> 51 <Compile Include="src\PlayerDataStuff.cs" /> 50 52 </ItemGroup> 51 53 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> -
binary-improvements/7dtd-server-fixes/7dtd-server-fixes.userprefs
r91 r93 4 4 <Files> 5 5 <File FileName="src/AssemblyInfo.cs" Line="20" Column="40" /> 6 <File FileName="src/AllocsNetTelnetServer.cs" Line=" 33" Column="1" />6 <File FileName="src/AllocsNetTelnetServer.cs" Line="93" Column="50" /> 7 7 <File FileName="src/AllocsTelnetConnection.cs" Line="44" Column="42" /> 8 8 <File FileName="src/AllocsLogFunctions.cs" Line="27" Column="42" /> 9 <File FileName="src/TelnetCommands/GetGamePrefs.cs" Line="7 1" Column="3" />10 <File FileName="src/TelnetCommands/ListPlayersExtended.cs" Line=" 49" Column="17" />9 <File FileName="src/TelnetCommands/GetGamePrefs.cs" Line="77" Column="1" /> 10 <File FileName="src/TelnetCommands/ListPlayersExtended.cs" Line="64" Column="31" /> 11 11 <File FileName="src/TelnetCommands/SayToPlayer.cs" Line="75" Column="33" /> 12 12 <File FileName="src/AdminToolsStuff.cs" Line="30" Column="54" /> -
binary-improvements/7dtd-server-fixes/src/AllocsNetTelnetServer.cs
r91 r93 14 14 private static bool closed = false; 15 15 private static bool authEnabled = false; 16 private static List<AllocsTelnetConnection> conn s = new List<AllocsTelnetConnection> ();16 private static List<AllocsTelnetConnection> connections = new List<AllocsTelnetConnection> (); 17 17 18 18 public static void init (int port) … … 38 38 if (listener.Pending ()) { 39 39 AllocsTelnetConnection c = new AllocsTelnetConnection (listener.AcceptTcpClient (), authEnabled); 40 conn s.Add (c);40 connections.Add (c); 41 41 Log.Out ("Telnet connection from: " + c.GetEndPoint ()); 42 42 if (authEnabled) { … … 47 47 } 48 48 49 foreach (AllocsTelnetConnection c in conn s) {49 foreach (AllocsTelnetConnection c in connections) { 50 50 if (c.IsClosed ()) { 51 51 c.Close (); 52 conn s.Remove (c);52 connections.Remove (c); 53 53 break; 54 54 } … … 70 70 Log.Out ("Telnet connection closed by client: " + c.GetEndPoint ()); 71 71 c.Close (); 72 conn s.Remove (c);72 connections.Remove (c); 73 73 break; 74 74 } … … 124 124 listener.Stop (); 125 125 } 126 foreach (AllocsTelnetConnection c in conn s) {126 foreach (AllocsTelnetConnection c in connections) { 127 127 c.Close (); 128 128 } … … 139 139 console.AddCommand(new SayToPlayer(console)); 140 140 console.AddCommand(new SetTimeReal(console)); 141 console.AddCommand(new ShowInventory(console)); 141 142 } 142 143 143 144 private static void RemoveClosedConnections () 144 145 { 145 foreach (AllocsTelnetConnection c in conn s) {146 foreach (AllocsTelnetConnection c in connections) { 146 147 if (c.IsClosed ()) { 147 148 c.Close (); … … 156 157 } 157 158 RemoveClosedConnections (); 158 foreach (AllocsTelnetConnection c in conn s) {159 foreach (AllocsTelnetConnection c in connections) { 159 160 if (c.IsAuthenticated ()) 160 161 c.WriteLine (line);
Note:
See TracChangeset
for help on using the changeset viewer.