diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-08-23 21:39:26 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-08-23 21:39:26 +0300 |
commit | c790484ce0eeee9f44b8ab0aa1e44c6bc5f47c30 (patch) | |
tree | 96ae50acb4643c96d5d7d33254da5f7903126b36 /src | |
parent | bfdee54a34531631a021f9f112186504cebde4c7 (diff) | |
download | plus-c790484ce0eeee9f44b8ab0aa1e44c6bc5f47c30.tar.gz plus-c790484ce0eeee9f44b8ab0aa1e44c6bc5f47c30.tar.bz2 plus-c790484ce0eeee9f44b8ab0aa1e44c6bc5f47c30.tar.xz plus-c790484ce0eeee9f44b8ab0aa1e44c6bc5f47c30.zip |
Add support for /mailto chat command in new mail system.
Diffstat (limited to 'src')
-rw-r--r-- | src/actions/commands.cpp | 14 | ||||
-rw-r--r-- | src/net/eathena/mail2recv.cpp | 6 |
2 files changed, 18 insertions, 2 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index 557d7891a..1ed0d3c81 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -1638,7 +1638,19 @@ impHandler(mailTo) { if (mailWindow == nullptr) return false; - mailWindow->createMail(event.args); + const std::string args = event.args; + if (settings.enableNewMailSystem) + { + mail2Handler->queueCheckName(MailQueueType::EditMail, + args, + std::string(), + std::string(), + 0); + } + else + { + mailWindow->createMail(args); + } return true; } diff --git a/src/net/eathena/mail2recv.cpp b/src/net/eathena/mail2recv.cpp index 04f7751a3..a28455a83 100644 --- a/src/net/eathena/mail2recv.cpp +++ b/src/net/eathena/mail2recv.cpp @@ -28,6 +28,8 @@ #include "enums/resources/notifytypes.h" +#include "gui/windows/mailwindow.h" + #include "net/messagein.h" #include "net/eathena/mail2handler.h" @@ -124,8 +126,10 @@ void Mail2Recv::processCheckNameResult(Net::MessageIn &msg) mail->body, mail->money); break; - case MailQueueType::Unknown: case MailQueueType::EditMail: + mailWindow->createMail(mail->to); + break; + case MailQueueType::Unknown: case MailQueueType::ValidateTO: default: reportAlways("Not implemented yet."); |