diff options
-rw-r--r-- | include/clientprotocolmsg.h | 7 | ||||
-rw-r--r-- | src/coremods/core_user/core_user.cpp | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/include/clientprotocolmsg.h b/include/clientprotocolmsg.h index 53122cff9..144af9e44 100644 --- a/include/clientprotocolmsg.h +++ b/include/clientprotocolmsg.h @@ -668,9 +668,10 @@ struct ClientProtocol::Messages::Pong : public ClientProtocol::Message Pong(const std::string& cookie, const std::string& server = "") : ClientProtocol::Message("PONG", ServerInstance->Config->GetServerName()) { - PushParamRef(ServerInstance->Config->GetServerName()); - if (!server.empty()) - PushParamRef(server); + if (server.empty()) + PushParamRef(ServerInstance->Config->GetServerName()); + else + PushParam(server); PushParamRef(cookie); } }; diff --git a/src/coremods/core_user/core_user.cpp b/src/coremods/core_user/core_user.cpp index 2431215f3..622e82c75 100644 --- a/src/coremods/core_user/core_user.cpp +++ b/src/coremods/core_user/core_user.cpp @@ -83,7 +83,7 @@ class CommandPing : public SplitCommand return CMD_FAILURE; } - ClientProtocol::Messages::Pong pong(parameters[0], origin ? parameters[1] : ""); + ClientProtocol::Messages::Pong pong(parameters[0], origin ? parameters[1] : ServerInstance->Config->GetServerName()); user->Send(ServerInstance->GetRFCEvents().pong, pong); return CMD_SUCCESS; } |