Fix /r against offline players.
- Offline players will no longer be valid /r targets.
This commit is contained in:
parent
6f95b684d4
commit
663041e8b0
2 changed files with 6 additions and 1 deletions
|
|
@ -17,6 +17,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
|
||||||
* Added handling to the PlayerChat hook event. (@QuiCM - Thanks for the suggestion @Arthri)
|
* Added handling to the PlayerChat hook event. (@QuiCM - Thanks for the suggestion @Arthri)
|
||||||
* Changed the spawnboss command to support silent command specifiers. (@QuiCM, suggested by @nojomyth-dev)
|
* Changed the spawnboss command to support silent command specifiers. (@QuiCM, suggested by @nojomyth-dev)
|
||||||
* Updated /godmode to use Journey Mode's Godmode power instead of healing on damage. (requested by @tlworks, backported by @bartico6, implemented preemptive bugfix for creative powers mentioned by @Stealownz)
|
* Updated /godmode to use Journey Mode's Godmode power instead of healing on damage. (requested by @tlworks, backported by @bartico6, implemented preemptive bugfix for creative powers mentioned by @Stealownz)
|
||||||
|
* Fixed /r attempting to send messages to players that have since disconnected. (@bartico6, reported by @Arthri)
|
||||||
|
|
||||||
## TShock 4.5.0.1
|
## TShock 4.5.0.1
|
||||||
* Fixed conversion from old to new ban system for MySQL hosted ban databases. (@DeathCradle, @ATFGK)
|
* Fixed conversion from old to new ban system for MySQL hosted ban databases. (@DeathCradle, @ATFGK)
|
||||||
|
|
|
||||||
|
|
@ -5366,12 +5366,16 @@ namespace TShockAPI
|
||||||
{
|
{
|
||||||
args.Player.SendErrorMessage("You are muted.");
|
args.Player.SendErrorMessage("You are muted.");
|
||||||
}
|
}
|
||||||
else if (args.Player.LastWhisper != null)
|
else if (args.Player.LastWhisper != null && args.Player.LastWhisper.Active)
|
||||||
{
|
{
|
||||||
var msg = string.Join(" ", args.Parameters);
|
var msg = string.Join(" ", args.Parameters);
|
||||||
args.Player.LastWhisper.SendMessage(String.Format("<From {0}> {1}", args.Player.Name, msg), Color.MediumPurple);
|
args.Player.LastWhisper.SendMessage(String.Format("<From {0}> {1}", args.Player.Name, msg), Color.MediumPurple);
|
||||||
args.Player.SendMessage(String.Format("<To {0}> {1}", args.Player.LastWhisper.Name, msg), Color.MediumPurple);
|
args.Player.SendMessage(String.Format("<To {0}> {1}", args.Player.LastWhisper.Name, msg), Color.MediumPurple);
|
||||||
}
|
}
|
||||||
|
else if (args.Player.LastWhisper != null)
|
||||||
|
{
|
||||||
|
args.Player.SendErrorMessage("The player you're attempting to reply to is no longer online.");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
args.Player.SendErrorMessage("You haven't previously received any whispers. Please use {0}whisper to whisper to other people.", Specifier);
|
args.Player.SendErrorMessage("You haven't previously received any whispers. Please use {0}whisper to whisper to other people.", Specifier);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue