0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 02:02:38 +01:00

Revert "ircd::net: Remove string(net::hostport) branch ..." w/ improvement.

This reverts commit fa19b9b182 with modification.
This commit is contained in:
Jason Volk 2020-03-07 14:20:51 -08:00
parent dddb8e4254
commit 9cceed8d34

View file

@ -4496,6 +4496,14 @@ ircd::net::string(const mutable_buffer &buf,
port(hp)
};
if(!empty(service(hp)) && port(hp) == 0)
return fmt::sprintf
{
buf, "%s:%s",
tolower(tlbuf[0], host(hp)),
tolower(tlbuf[1], service(hp)),
};
return fmt::sprintf
{
buf, "%s:%u (%s)",