Rev | Line | |
---|
[224] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 |
|
---|
| 4 | namespace 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.