DirectMessageHandler
Manages direct message state including reply targets. Tracks the last player who messaged each player for /reply functionality.
Constructors
Properties
Registry of proxy-wide player presence. Set when cross-server direct messages are enabled; used to validate ReplyTarget.Remote reply targets.
Functions
Clears message history for a player (called on disconnect). Removes entries where this player is either the sender or a local target.
Gets the target to reply to. First checks if someone has messaged this player, otherwise falls back to the last person they messaged. Targets that are no longer reachable (offline locally, or absent from the proxy roster) are skipped.
Handles the receiver-side display of an incoming cross-server direct message. The message body is already romaji-converted by the sending server.
Handles the sender-side display of an outgoing cross-server direct message. Applies romaji conversion, shows the message to the sender, notifies spies, and records the remote reply target.
Records a local direct message between two players. Updates both the sender's last recipient and the receiver's last messager.
Sends a direct message from one player to another on the same server. Handles formatting and recording the conversation. Applies romaji-to-Japanese conversion if sender has it enabled.