summaryrefslogtreecommitdiff
path: root/src/commandhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/commandhandler.cpp')
-rw-r--r--src/commandhandler.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp
index 1c375ad9..dcaf6f0a 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,14 +122,14 @@ 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);
}
+ else if (type == "away")
+ {
+ handleAway(args, tab);
+ }
else
{
tab->chatLog(_("Unknown command."));
@@ -394,7 +393,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 +509,7 @@ void CommandHandler::handleShowIp(const std::string &args, ChatTab *tab)
return;
}
- beingManager->updatePlayerNames();
+ actorSpriteManager->updatePlayerNames();
}
void CommandHandler::handlePresent(const std::string &args, ChatTab *tab)