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
|
|
@ -5366,12 +5366,16 @@ namespace TShockAPI
|
|||
{
|
||||
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);
|
||||
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);
|
||||
}
|
||||
else if (args.Player.LastWhisper != null)
|
||||
{
|
||||
args.Player.SendErrorMessage("The player you're attempting to reply to is no longer online.");
|
||||
}
|
||||
else
|
||||
{
|
||||
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