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

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

Fixes

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