summaryrefslogtreecommitdiff
path: root/src/commandhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2010-04-19 20:05:35 +0300
committerBertram <yohanndotferreiraatorange.fr>2010-04-19 23:19:03 +0200
commit959708c60c119e03183ba97177f13e92d61e342c (patch)
tree86c8803ed1751dcf84a4feec9c05e47a695f78d8 /src/commandhandler.cpp
parentd5390fa51b47cc70052902301ade7d137eff9d61 (diff)
downloadmana-959708c60c119e03183ba97177f13e92d61e342c.tar.gz
mana-959708c60c119e03183ba97177f13e92d61e342c.tar.bz2
mana-959708c60c119e03183ba97177f13e92d61e342c.tar.xz
mana-959708c60c119e03183ba97177f13e92d61e342c.zip
Add afk mode for player.
Add variable cur_time for current time. Add command /away [text] Reviewed by: Bertram
Diffstat (limited to 'src/commandhandler.cpp')
-rw-r--r--src/commandhandler.cpp9
1 files changed, 9 insertions, 0 deletions
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);
+}