Add Tier 4 commands: AFK/DND status and whisper reply

- AFK commands: /afk, /away to toggle AFK status with optional message
- DND commands: /dnd, /busy to toggle DND (Do Not Disturb) with optional message
- Reply command: /r, /reply to respond to the last received whisper
- Track last whisper sender automatically when receiving whispers
- AFK and DND are mutually exclusive (activating one clears the other)
This commit is contained in:
kelsi davis 2026-02-07 13:17:01 -08:00
parent 85a7d66c4e
commit 41844ecc69
3 changed files with 110 additions and 0 deletions

View file

@ -1306,6 +1306,30 @@ void GameScreen::sendChatMessage(game::GameHandler& gameHandler) {
return;
}
// AFK command
if (cmdLower == "afk" || cmdLower == "away") {
std::string afkMsg = (spacePos != std::string::npos) ? command.substr(spacePos + 1) : "";
gameHandler.toggleAfk(afkMsg);
chatInputBuffer[0] = '\0';
return;
}
// DND command
if (cmdLower == "dnd" || cmdLower == "busy") {
std::string dndMsg = (spacePos != std::string::npos) ? command.substr(spacePos + 1) : "";
gameHandler.toggleDnd(dndMsg);
chatInputBuffer[0] = '\0';
return;
}
// Reply command
if (cmdLower == "r" || cmdLower == "reply") {
std::string replyMsg = (spacePos != std::string::npos) ? command.substr(spacePos + 1) : "";
gameHandler.replyToLastWhisper(replyMsg);
chatInputBuffer[0] = '\0';
return;
}
// Chat channel slash commands
bool isChannelCommand = false;
if (cmdLower == "s" || cmdLower == "say") {