source: binary-improvements/AllocsCommands/PrivateMessageConnections.cs@ 316

Last change on this file since 316 was 309, checked in by alloc, 7 years ago

Fixes 14_16_21

File size: 732 bytes
Line 
1using System;
2using System.Collections.Generic;
3using Steamworks;
4
5namespace AllocsFixes.CustomCommands
6{
7 public class PrivateMessageConnections
8 {
9 private static Dictionary<CSteamID, CSteamID> senderOfLastPM = new Dictionary<CSteamID, CSteamID> ();
10
11 public static void SetLastPMSender (ClientInfo _sender, ClientInfo _receiver)
12 {
13 senderOfLastPM [_receiver.steamId] = _sender.steamId;
14 }
15
16 public static ClientInfo GetLastPMSenderForPlayer (ClientInfo _player)
17 {
18 if (senderOfLastPM.ContainsKey (_player.steamId)) {
19 CSteamID recSteamId = senderOfLastPM [_player.steamId];
20 ClientInfo recInfo = ConnectionManager.Instance.GetClientInfoForSteamId (recSteamId);
21 return recInfo;
22 }
23 return null;
24 }
25 }
26}
Note: See TracBrowser for help on using the repository browser.