From 959708c60c119e03183ba97177f13e92d61e342c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 19 Apr 2010 20:05:35 +0300 Subject: Add afk mode for player. Add variable cur_time for current time. Add command /away [text] Reviewed by: Bertram --- src/commandhandler.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/commandhandler.cpp') diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp index 8d70b717..80a3b99f 100644 --- a/src/commandhandler.cpp +++ b/src/commandhandler.cpp @@ -122,6 +122,10 @@ void CommandHandler::handleCommand(const std::string &command, ChatTab *tab) { handlePresent(args, tab); } + else if (type == "away") + { + handleAway(args, tab); + } else { tab->chatLog(_("Unknown command.")); @@ -507,3 +511,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); +} -- cgit v1.2.3-70-g09d2