summaryrefslogtreecommitdiff
path: root/src/net/eathena/mail2handler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-25 23:55:43 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-25 23:55:43 +0300
commitd0768817618143739b8fd81cfa9124e8f60e1b12 (patch)
tree94450009f3bf4cd7726250633865f0a112f625fb /src/net/eathena/mail2handler.cpp
parentf7d3792df9fd01ea7baabaf9b612031b1f28d7ab (diff)
downloadmv-d0768817618143739b8fd81cfa9124e8f60e1b12.tar.gz
mv-d0768817618143739b8fd81cfa9124e8f60e1b12.tar.bz2
mv-d0768817618143739b8fd81cfa9124e8f60e1b12.tar.xz
mv-d0768817618143739b8fd81cfa9124e8f60e1b12.zip
Validate destination name after it entered in mail edit window.
Diffstat (limited to 'src/net/eathena/mail2handler.cpp')
-rw-r--r--src/net/eathena/mail2handler.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/net/eathena/mail2handler.cpp b/src/net/eathena/mail2handler.cpp
index bc749b0bf..ae48fc3ed 100644
--- a/src/net/eathena/mail2handler.cpp
+++ b/src/net/eathena/mail2handler.cpp
@@ -49,6 +49,7 @@ Mail2Handler::Mail2Handler()
Mail2Handler::~Mail2Handler()
{
mail2Handler = nullptr;
+ Mail2Recv::mCheckedName.clear();
while (!Mail2Recv::mMailQueue.empty())
{
MailQueue *const mail = Mail2Recv::mMailQueue.front();
@@ -135,6 +136,7 @@ void Mail2Handler::sendMail(const std::string &to,
outMsg.writeInt32(0, "to char id");
outMsg.writeString(title, titleSz, "title");
outMsg.writeString(body, bodySz, "body");
+ Mail2Recv::mCheckedName.clear();
}
void Mail2Handler::queueCheckName(const MailQueueTypeT type,
@@ -274,4 +276,9 @@ void Mail2Handler::requestCheckName(const std::string &name) const
outMsg.writeString(name, 24, "name");
}
+std::string Mail2Handler::getCheckedName() const
+{
+ return Mail2Recv::mCheckedName;
+}
+
} // namespace EAthena