source: binary-improvements/AllocsCommands/Commands/Reply.cs@ 289

Last change on this file since 289 was 251, checked in by peter.souza, 9 years ago

Enemies (zombies and hostile animal entities) are now shown on the map as Hostiles and require permission level 'webapi.gethostilelocation' for web viewers to see.

Animals (non-hostile entities) are now shown on the map as Animals and require permission level 'webapi.getanimalslocation' for web viewers to see.

Permission level for 'webapi.viewallclaims' is now required for a viewer to see all claims, otherwise the permission level for 'webapi.getlandclaims' will only show viewer-owned claims. A viewer requires both 'webapi.getlandclaims' and 'webapi.viewallclaims' to be set for all claims to show (you can't just set 'webapi.viewallclaims').
https://7daystodie.com/forums/showthread.php?12837-Improvements-for-the-dedicated-server&p=317405&viewfull=1#post317405

Permission level for 'webapi.viewallplayers' is now required for a viewer to see all players, otherwise the permission level for 'webapi.getplayerslocation' will only show the player for the currently-authenticated viewer. A viewer requires both 'webapi.getplayerslocation' and 'webapi.viewallplayers' to be set for all players to show (you can't just set 'webapi.viewallplayers').
https://7daystodie.com/forums/showthread.php?12837-Improvements-for-the-dedicated-server&p=317405&viewfull=1#post317405

Banned players are now hidden from the web map.
https://7daystodie.com/forums/showthread.php?12837-Improvements-for-the-dedicated-server&p=320702&viewfull=1#post320702

Items using 'CustomIcon' and 'CustomIconTint' are now supported (although the exact tinting may not be perfectly the same as the game).
https://7daystodie.com/forums/showthread.php?12837-Improvements-for-the-dedicated-server&p=317117&viewfull=1#post317117
https://7daystodie.com/forums/showthread.php?12837-Improvements-for-the-dedicated-server&p=317679&viewfull=1#post317679

Map marker icons for players, hostiles, and animals have been updated.

File size: 1.4 KB
Line 
1using System;
2using System.Collections.Generic;
3
4namespace AllocsFixes.CustomCommands
5{
6 public class Reply : ConsoleCmdAbstract
7 {
8 public override string GetDescription ()
9 {
10 return "send a message to the player who last sent you a PM";
11 }
12
13 public override string GetHelp () {
14 return "Usage:\n" +
15 " reply <message>\n" +
16 "Send the given message to the user you last received a PM from.";
17 }
18
19 public override string[] GetCommands ()
20 {
21 return new string[] { "reply", "re" };
22 }
23
24 private void RunInternal (ClientInfo _sender, List<string> _params)
25 {
26 if (_params.Count < 1) {
27 SdtdConsole.Instance.Output ("Usage: reply <message>");
28 return;
29 }
30
31 string message = _params [0];
32
33 ClientInfo receiver = PrivateMessageConnections.GetLastPMSenderForPlayer (_sender);
34 if (receiver != null) {
35 Chat.SendMessage (receiver, _sender, message);
36 } else {
37 if (receiver != null) {
38 SdtdConsole.Instance.Output ("The sender of the PM you last received is currently not online.");
39 } else {
40 SdtdConsole.Instance.Output ("You have not received a PM so far.");
41 }
42 }
43 }
44
45 public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) {
46 if (_senderInfo.RemoteClientInfo == null) {
47 Log.Out ("Command \"reply\" can only be used on clients!");
48 } else {
49 RunInternal (_senderInfo.RemoteClientInfo, _params);
50 }
51 }
52 }
53}
Note: See TracBrowser for help on using the repository browser.