Remove more obsolete code; fix tab/space screwup in TSPlayer
This commit is contained in:
parent
78c6f4db84
commit
cbce64f1eb
13 changed files with 329 additions and 340 deletions
|
|
@ -213,7 +213,7 @@ namespace Rests
|
|||
object result = cmd.Execute(verbs, parms, request);
|
||||
if (cmd.DoLog && TShock.Config.LogRest)
|
||||
{
|
||||
Log.ConsoleInfo("Anonymous requested REST endpoint: " + BuildRequestUri(cmd, verbs, parms, false));
|
||||
TShock.Log.ConsoleInfo("Anonymous requested REST endpoint: " + BuildRequestUri(cmd, verbs, parms, false));
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ namespace TShockAPI
|
|||
var msg = args.Parameters["msg"];
|
||||
if (string.IsNullOrWhiteSpace(msg))
|
||||
return RestMissingParam("msg");
|
||||
TShock.Utils.Broadcast(msg);
|
||||
TSPlayer.All.SendInfoMessage(msg);
|
||||
return RestResponse("The message was broadcasted successfully");
|
||||
}
|
||||
|
||||
|
|
@ -660,7 +660,7 @@ namespace TShockAPI
|
|||
TSPlayer player = (TSPlayer)ret;
|
||||
player.DamagePlayer(999999);
|
||||
var from = string.IsNullOrWhiteSpace(args.Parameters["from"]) ? "Server Admin" : args.Parameters["from"];
|
||||
player.SendMessage(string.Format("{0} just killed you!", from));
|
||||
player.SendInfoMessage(string.Format("{0} just killed you!", from));
|
||||
return RestResponse("Player " + player.Name + " was killed");
|
||||
}
|
||||
|
||||
|
|
@ -916,7 +916,7 @@ namespace TShockAPI
|
|||
TSPlayer player = (TSPlayer)ret;
|
||||
player.mute = mute;
|
||||
var verb = mute ? "muted" : "unmuted";
|
||||
player.SendMessage("You have been remotely " + verb);
|
||||
player.SendInfoMessage("You have been remotely " + verb);
|
||||
return RestResponse("Player " + player.Name + " was " + verb);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ namespace Rests
|
|||
"The old model will be removed with the next maintenance release of TShock. In order to switch to the new model, ",
|
||||
"change the config setting \"RestUseNewPermissionModel\" to true."
|
||||
);
|
||||
Log.Warn(warningMessage);
|
||||
TShock.Log.Warn(warningMessage);
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.WriteLine(warningMessage);
|
||||
Console.ForegroundColor = ConsoleColor.Gray;
|
||||
|
|
@ -80,7 +80,7 @@ namespace Rests
|
|||
"with existing REST services. If compatibility problems occur, you can switch back to the unsecure permission ",
|
||||
"model by changing the config setting \"RestUseNewPermissionModel\" to false, which is not recommended."
|
||||
);
|
||||
Log.ConsoleInfo(warningMessage);
|
||||
TShock.Log.ConsoleInfo(warningMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue