diff options
Diffstat (limited to 'src/commandhandler.cpp')
-rw-r--r-- | src/commandhandler.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp index f3947bd9..dcaf6f0a 100644 --- a/src/commandhandler.cpp +++ b/src/commandhandler.cpp @@ -126,6 +126,10 @@ void CommandHandler::handleCommand(const std::string &command, ChatTab *tab) { handleShowIp(args, tab); } + else if (type == "away") + { + handleAway(args, tab); + } else { tab->chatLog(_("Unknown command.")); @@ -173,6 +177,9 @@ void CommandHandler::handleHelp(const std::string &args, ChatTab *tab) "with another user")); tab->chatLog(_("/q > Alias of query")); + tab->chatLog(_("/away > Tell the other whispering players " + "you're away from keyboard.")); + tab->chatLog(_("/ignore > ignore a player")); tab->chatLog(_("/unignore > stop ignoring a player")); @@ -257,6 +264,14 @@ void CommandHandler::handleHelp(const std::string &args, ChatTab *tab) tab->chatLog(_("This command tries to make a tab for whispers between" "you and <nick>.")); } + else if (args == "away") + { + tab->chatLog(_("Command: /away <afk reason>")); + tab->chatLog(_("This command tells " + "you're away from keyboard with the given reason.")); + tab->chatLog(_("Command: /away")); + tab->chatLog(_("This command clears the away status and message.")); + } else if (args == "createparty") { tab->chatLog(_("Command: /createparty <name>")); @@ -545,3 +560,8 @@ void CommandHandler::handleUnignore(const std::string &args, ChatTab *tab) else tab->chatLog(_("Player could not be unignored!"), BY_SERVER); } + +void CommandHandler::handleAway(const std::string &args, ChatTab *tab) +{ + player_node->setAway(args); +} |