summaryrefslogtreecommitdiff
path: root/src/net/tmwa/chathandler.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-01-28 20:55:19 +0100
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2012-02-12 20:26:50 +0100
commit4f9888c281ff9b4953159fba1a03f59e7dcb116b (patch)
tree99b76554fb6986e8da0eee73cd0e84df99432ebd /src/net/tmwa/chathandler.cpp
parentbce513e08316ec01bf3384062740b4d8198cdb3e (diff)
downloadmana-4f9888c281ff9b4953159fba1a03f59e7dcb116b.tar.gz
mana-4f9888c281ff9b4953159fba1a03f59e7dcb116b.tar.bz2
mana-4f9888c281ff9b4953159fba1a03f59e7dcb116b.tar.xz
mana-4f9888c281ff9b4953159fba1a03f59e7dcb116b.zip
Ignore ManaPlus shop commands
This shopping mechanism is not supported by this client at the moment, and it's annoying to have these turn up in whispers. Reviewed-by: Stefan Beller Reviewed-by: Erik Schilling
Diffstat (limited to 'src/net/tmwa/chathandler.cpp')
-rw-r--r--src/net/tmwa/chathandler.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/net/tmwa/chathandler.cpp b/src/net/tmwa/chathandler.cpp
index 280ef622..134db59f 100644
--- a/src/net/tmwa/chathandler.cpp
+++ b/src/net/tmwa/chathandler.cpp
@@ -111,8 +111,21 @@ void ChatHandler::handleMessage(Net::MessageIn &msg)
chatMsg = msg.readString(chatMsgLength);
+ // This is a sure sign of some special command, none of which are
+ // supported at the moment.
+ if (chatMsg.compare(0, 3, "\302\202!") == 0)
+ return;
+
if (nick != "Server")
{
+ // Ignore the shop commands since this client doesn't support
+ // them at the moment.
+ if (chatMsg.find("!selllist ") == 0 ||
+ chatMsg.find("!buylist ") == 0 ||
+ chatMsg.find("!buyitem ") == 0 ||
+ chatMsg.find("!sellitem ") == 0)
+ return;
+
if (player_relations.hasPermission(nick, PlayerRelation::WHISPER))
{
Event event(Event::Whisper);