From 4f9888c281ff9b4953159fba1a03f59e7dcb116b Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Sat, 28 Jan 2012 20:55:19 +0100 Subject: 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 --- src/net/tmwa/chathandler.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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); -- cgit v1.2.3-60-g2f50