private FindExactClassyName ( [ fullName ) : string | ||
fullName | [ | |
return | string |
static void ReplyHandler([NotNull] Player player, [NotNull] CommandReader cmd) { string messageText = cmd.NextAll(); if (messageText.Length == 0) { player.Message("Reply: No message to send!"); return; } string targetName = player.LastPrivateMessageSender; if (targetName != null) { Player targetPlayer = Server.FindPlayerExact(player, targetName, SearchOptions.IncludeHidden); if (targetPlayer != null) { if (player.CanSee(targetPlayer)) { if (targetPlayer.IsDeaf) { player.Message("Cannot PM {0}&S: they are currently deaf.", targetPlayer.ClassyName); } else if (targetPlayer.IsIgnoring(player.Info)) { player.Message("&WCannot PM {0}&W: you are ignored.", targetPlayer.ClassyName); } else { Chat.SendPM(player, targetPlayer, messageText); player.MessageNow("&Pto {0}: {1}", targetPlayer.Name, messageText); } } else { player.Message("Reply: Cannot send message; player {0}&S is offline.", PlayerDB.FindExactClassyName(targetName)); if (targetPlayer.CanHear(player)) { Chat.SendPM(player, targetPlayer, messageText); player.Info.DecrementMessageWritten(); } } } else { player.Message("Reply: Cannot send message; player {0}&S is offline.", PlayerDB.FindExactClassyName(targetName)); } } else { player.Message("Reply: You have not sent any messages yet."); } }