summaryrefslogtreecommitdiff
path: root/src/commandhandler.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2010-12-28 22:04:41 +0100
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2010-12-28 22:24:44 +0100
commit780bcbc2ea75603f2eef7369a6f7b5ddfc5888b5 (patch)
tree9fe66ca3a9b3c65d3da9490411c4a621dc9046e2 /src/commandhandler.cpp
parent6385f680fd3e42bd9137f9184e702dd36d20322f (diff)
downloadmana-780bcbc2ea75603f2eef7369a6f7b5ddfc5888b5.tar.gz
mana-780bcbc2ea75603f2eef7369a6f7b5ddfc5888b5.tar.bz2
mana-780bcbc2ea75603f2eef7369a6f7b5ddfc5888b5.tar.xz
mana-780bcbc2ea75603f2eef7369a6f7b5ddfc5888b5.zip
Revert "Remove the AFK response system"
This reverts commit 3d6a2d9c80a969c3613f567dd7029e75ef59b5cb. I've by that readded the AFK system on master. Please, remove it when we've got a proper replacement.
Diffstat (limited to 'src/commandhandler.cpp')
-rw-r--r--src/commandhandler.cpp20
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);
+}