summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-04-25 16:30:20 -0600
committerJared Adams <jaxad0127@gmail.com>2009-04-25 16:30:20 -0600
commitc694500e3ad9b958910ce6b230378caecfa83257 (patch)
tree47197fcab7dfab4a88edb6df5210908ed84c74af /src
parent19b2ed2df87753ab8f767652f728ec6c30bb3ee6 (diff)
downloadmana-client-c694500e3ad9b958910ce6b230378caecfa83257.tar.gz
mana-client-c694500e3ad9b958910ce6b230378caecfa83257.tar.bz2
mana-client-c694500e3ad9b958910ce6b230378caecfa83257.tar.xz
mana-client-c694500e3ad9b958910ce6b230378caecfa83257.zip
Fix chat actions
Diffstat (limited to 'src')
-rw-r--r--src/gui/widgets/chattab.cpp3
-rw-r--r--src/net/ea/chathandler.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp
index 01d8b62b..2f967162 100644
--- a/src/gui/widgets/chattab.cpp
+++ b/src/gui/widgets/chattab.cpp
@@ -97,10 +97,11 @@ void ChatTab::chatLog(std::string line, int own, bool ignoreRecord)
}
// *implements actions in a backwards compatible way*
- if (own == BY_PLAYER &&
+ if ((own == BY_PLAYER || own == BY_OTHER) &&
tmp.text.at(0) == '*' &&
tmp.text.at(tmp.text.length()-1) == '*')
{
+ printf("Action from %s: %s\n", tmp.nick.c_str(), tmp.text.c_str());
tmp.text[0] = ' ';
tmp.text.erase(tmp.text.length() - 1);
own = ACT_IS;
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp
index 2446e26e..26af36dd 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/ea/chathandler.cpp
@@ -186,7 +186,7 @@ void ChatHandler::me(const std::string &text)
{
std::string action = strprintf("*%s*", text.c_str());
- talk(text);
+ talk(action);
}
void ChatHandler::privateMessage(const std::string &recipient,