source: binary-improvements/7dtd-server-fixes/src/TelnetCommands/PrivateMassageConnections.cs@ 126

Last change on this file since 126 was 112, checked in by alloc, 10 years ago

fixes

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