diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-13 19:46:57 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-13 20:20:41 +0300 |
commit | 041a5a85ba09650a85f3ac7a3e88e183c6b88c28 (patch) | |
tree | 339c55634ac1578807921136bd64acf3e57b6aac /src/net/eathena | |
parent | f2a4cf2dde41017c199cdf51044180df6e6ff193 (diff) | |
download | manaverse-041a5a85ba09650a85f3ac7a3e88e183c6b88c28.tar.gz manaverse-041a5a85ba09650a85f3ac7a3e88e183c6b88c28.tar.bz2 manaverse-041a5a85ba09650a85f3ac7a3e88e183c6b88c28.tar.xz manaverse-041a5a85ba09650a85f3ac7a3e88e183c6b88c28.zip |
eathena: show error for non existing channel in channel tab.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/chathandler.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index dd4618482..0a5029b6e 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -37,6 +37,7 @@ #include "resources/chatobject.h" +#include "utils/gettext.h" #include "utils/stringutils.h" #include <string> @@ -503,6 +504,21 @@ void ChatHandler::processWhisperResponse(Net::MessageIn &msg) const uint8_t type = msg.readUInt8("response"); msg.readInt32("unknown"); + if (type == 1 && chatWindow) + { + const std::string nick = getLastWhisperNick(); + if (nick.size() > 1 && nick[0] == '#') + { + chatWindow->channelChatLog(nick, + // TRANSLATORS: chat message + strprintf(_("Message could not be sent, channel " + "%s is not exists."), nick.c_str()), + ChatMsgType::BY_SERVER, false, false); + if (!mSentWhispers.empty()) + mSentWhispers.pop(); + return; + } + } processWhisperResponseContinue(type); } |