summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2020-10-26 18:02:23 +0000
committerSadie Powell <sadie@witchery.services>2020-10-26 18:02:23 +0000
commit581d1d8fa0ef62e20409543570390613c78e6f5b (patch)
treef21e89ef87f902a10352abdf4e22f643c07971db /include
parentbf162f683707a2774a60c3801ac4023231998bf5 (diff)
Fix the behaviour of multi-value PING and PONG messages.
Diffstat (limited to 'include')
-rw-r--r--include/clientprotocolmsg.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/clientprotocolmsg.h b/include/clientprotocolmsg.h
index 863cdf8b2..07f32b686 100644
--- a/include/clientprotocolmsg.h
+++ b/include/clientprotocolmsg.h
@@ -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);
}
};