]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/clientprotocolmsg.h
Fix the behaviour of multi-value PING and PONG messages.
[user/henk/code/inspircd.git] / include / clientprotocolmsg.h
index 863cdf8b24880e43d352b1f432b4018e1a8226c4..07f32b686d6058707f33b37b8d3fe34c494edfb1 100644 (file)
@@ -663,11 +663,14 @@ struct ClientProtocol::Messages::Pong : public ClientProtocol::Message
 {
        /** Constructor.
         * @param cookie Ping cookie. Must remain valid as long as this object is alive.
+        * @param server Pinged server. Must remain valid as long as this object is alive if non-empty.
         */
-       Pong(const std::string& cookie)
+       Pong(const std::string& cookie, const std::string& server = "")
                : ClientProtocol::Message("PONG", ServerInstance->Config->ServerName)
        {
                PushParamRef(ServerInstance->Config->ServerName);
+               if (!server.empty())
+                       PushParamRef(server);
                PushParamRef(cookie);
        }
 };