Skip to content

Commit 489f1a6

Browse files
committed
fix: outputmessage true
1 parent 02f889b commit 489f1a6

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/server/network/protocol/protocolgame.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ void ProtocolGame::onRecvFirstMessage(NetworkMessage &msg) {
847847
ss << "Your " << (oldProtocol ? "username" : "email") << " or password is not correct.";
848848
}
849849

850-
auto output = OutputMessagePool::getOutputMessage();
850+
auto output = OutputMessagePool::getOutputMessage(oldProtocol);
851851
output->addByte(0x14);
852852
output->addString(ss.str());
853853
send(output);
@@ -889,7 +889,7 @@ void ProtocolGame::sendLoginChallenge() {
889889
}
890890

891891
void ProtocolGame::disconnectClient(const std::string &message) const {
892-
auto output = OutputMessagePool::getOutputMessage();
892+
auto output = OutputMessagePool::getOutputMessage(oldProtocol);
893893
output->addByte(0x14);
894894
output->addString(message);
895895
send(output);

src/server/network/protocol/protocollogin.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ ProtocolLogin::ProtocolLogin(const Connection_ptr &loginConnection) :
2525
}
2626

2727
void ProtocolLogin::disconnectClient(const std::string &message) const {
28-
const auto output = OutputMessagePool::getOutputMessage();
28+
const auto output = OutputMessagePool::getOutputMessage(true);
2929

3030
output->addByte(0x0B);
3131
output->addString(message);
@@ -214,7 +214,7 @@ void ProtocolLogin::onSendMessage(const OutputMessage_ptr &msg) {
214214
}
215215

216216
void ProtocolLogin::sendLoginChallenge() {
217-
auto output = OutputMessagePool::getOutputMessage();
217+
auto output = OutputMessagePool::getOutputMessage(true);
218218
static std::random_device rd;
219219
static std::ranlux24 generator(rd());
220220
static std::uniform_int_distribution<uint16_t> randNumber(0x00, 0xFF);

0 commit comments

Comments
 (0)