Changeset 130 for binary-improvements/7dtd-server-fixes/src/CustomCommands/PrivateMassageConnections.cs
- Timestamp:
- Aug 26, 2014, 4:41:47 PM (10 years ago)
- Location:
- binary-improvements/7dtd-server-fixes/src/CustomCommands
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/7dtd-server-fixes/src/CustomCommands/PrivateMassageConnections.cs
r112 r130 2 2 using System.Collections.Generic; 3 3 4 public class PrivateMassageConnections4 namespace AllocsFixes.CustomCommands 5 5 { 6 private static Dictionary<ClientInfo, ClientInfo> senderOfLastPM = new Dictionary<ClientInfo, ClientInfo>(); 6 public class PrivateMassageConnections 7 { 8 private static Dictionary<ClientInfo, ClientInfo> senderOfLastPM = new Dictionary<ClientInfo, ClientInfo> (); 7 9 8 public static void SetLastPMSender(ClientInfo _sender, ClientInfo _receiver) { 9 if (senderOfLastPM.ContainsKey(_receiver)) 10 senderOfLastPM[_receiver] = _sender; 11 else 12 senderOfLastPM.Add(_receiver, _sender); 13 } 10 public static void SetLastPMSender (ClientInfo _sender, ClientInfo _receiver) 11 { 12 if (senderOfLastPM.ContainsKey (_receiver)) 13 senderOfLastPM [_receiver] = _sender; 14 else 15 senderOfLastPM.Add (_receiver, _sender); 16 } 14 17 15 public static ClientInfo GetLastPMSenderForPlayer(ClientInfo _player) { 16 if (senderOfLastPM.ContainsKey(_player)) 17 return senderOfLastPM[_player]; 18 return null; 18 public static ClientInfo GetLastPMSenderForPlayer (ClientInfo _player) 19 { 20 if (senderOfLastPM.ContainsKey (_player)) 21 return senderOfLastPM [_player]; 22 return null; 23 } 19 24 } 20 25 } 21
Note:
See TracChangeset
for help on using the changeset viewer.