summaryrefslogtreecommitdiff
path: root/src/commandhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/commandhandler.cpp')
-rw-r--r--src/commandhandler.cpp31
1 files changed, 5 insertions, 26 deletions
diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp
index 1c375ad9..f3947bd9 100644
--- a/src/commandhandler.cpp
+++ b/src/commandhandler.cpp
@@ -21,15 +21,13 @@
#include "commandhandler.h"
-#include "beingmanager.h"
+#include "actorspritemanager.h"
#include "channelmanager.h"
#include "channel.h"
#include "game.h"
#include "localplayer.h"
#include "playerrelations.h"
-#include "gui/chat.h"
-
#include "gui/widgets/channeltab.h"
#include "gui/widgets/chattab.h"
@@ -49,7 +47,8 @@ void CommandHandler::handleCommand(const std::string &command, ChatTab *tab)
{
std::string::size_type pos = command.find(' ');
std::string type(command, 0, pos);
- std::string args(command, pos == std::string::npos ? command.size() : pos + 1);
+ std::string args(command, pos == std::string::npos ?
+ command.size() : pos + 1);
if (type == "help") // Do help before tabs so they can't override it
{
@@ -123,10 +122,6 @@ void CommandHandler::handleCommand(const std::string &command, ChatTab *tab)
{
handlePresent(args, tab);
}
- else if (type == "away")
- {
- handleAway(args, tab);
- }
else if (type == "showip" && Net::getNetworkType() == ServerInfo::TMWATHENA)
{
handleShowIp(args, tab);
@@ -178,9 +173,6 @@ 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"));
@@ -265,14 +257,6 @@ 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>"));
@@ -394,7 +378,7 @@ void CommandHandler::handleMsg(const std::string &args, ChatTab *tab)
if (tempNick.compare(playerName) == 0 || args.empty())
return;
- chatWindow->whisper(recvnick, msg, true);
+ chatWindow->whisper(recvnick, msg, BY_PLAYER);
}
else
tab->chatLog(_("Cannot send empty whispers!"), BY_SERVER);
@@ -510,7 +494,7 @@ void CommandHandler::handleShowIp(const std::string &args, ChatTab *tab)
return;
}
- beingManager->updatePlayerNames();
+ actorSpriteManager->updatePlayerNames();
}
void CommandHandler::handlePresent(const std::string &args, ChatTab *tab)
@@ -561,8 +545,3 @@ 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);
-}