source: binary-improvements/7dtd-server-fixes/src/CustomCommands/PrivateMassageConnections.cs@ 173

Last change on this file since 173 was 130, checked in by alloc, 10 years ago

Fixes

File size: 659 bytes
Line 
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.