summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-04-30 13:00:48 +0300
committerAndrei Karas <akaras@inbox.ru>2015-04-30 13:00:48 +0300
commit11e63a9fe8496302dc789c74b2b6ba39a14b568a (patch)
tree21525c638446ce670244bbc3431f9e00fb75e632 /src/net/eathena
parent7b8493a8a977032b502e6df00b89f6b1a813b78b (diff)
downloadmanaplus-11e63a9fe8496302dc789c74b2b6ba39a14b568a.tar.gz
manaplus-11e63a9fe8496302dc789c74b2b6ba39a14b568a.tar.bz2
manaplus-11e63a9fe8496302dc789c74b2b6ba39a14b568a.tar.xz
manaplus-11e63a9fe8496302dc789c74b2b6ba39a14b568a.zip
Impliment packet SMSG_MAIL_NEW_MAIL.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/mailhandler.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/net/eathena/mailhandler.cpp b/src/net/eathena/mailhandler.cpp
index 040828e9b..68a3a2e67 100644
--- a/src/net/eathena/mailhandler.cpp
+++ b/src/net/eathena/mailhandler.cpp
@@ -34,6 +34,7 @@
#include "resources/notifytypes.h"
+#include "utils/gettext.h"
#include "utils/stringutils.h"
#include "debug.h"
@@ -209,11 +210,12 @@ void MailHandler::processSendMailAck(Net::MessageIn &msg)
void MailHandler::processNewMail(Net::MessageIn &msg)
{
- UNIMPLIMENTEDPACKET;
-
msg.readInt32("message id");
- msg.readString(40, "title");
- msg.readString(24, "sender name");
+ const std::string subj = msg.readString(40, "title");
+ const std::string sender = msg.readString(24, "sender name");
+ NotifyManager::notify(NotifyTypes::NEW_MAIL,
+ strprintf(_("You have new mail from %s with subject %s"),
+ sender.c_str(), subj.c_str()));
}
void MailHandler::processSetAttachmentAck(Net::MessageIn &msg)