source: binary-improvements/AllocsCommands/PrivateMassageConnections.cs@ 248

Last change on this file since 248 was 230, checked in by alloc, 10 years ago

Binary improvements

File size: 659 bytes
RevLine 
[230]1using System;
2using System.Collections.Generic;
3
4namespace AllocsFixes.CustomCommands
5{
6 public class PrivateMassageConnections
7 {
8 private static Dictionary<ClientInfo, ClientInfo> senderOfLastPM = new Dictionary<ClientInfo, ClientInfo> ();
9
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 }
17
18 public static ClientInfo GetLastPMSenderForPlayer (ClientInfo _player)
19 {
20 if (senderOfLastPM.ContainsKey (_player))
21 return senderOfLastPM [_player];
22 return null;
23 }
24 }
25}
Note: See TracBrowser for help on using the repository browser.