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:
parent
dddb8e4254
commit
9cceed8d34
1 changed files with 8 additions and 0 deletions
|
@ -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)",
|
||||
|
|
Loading…
Reference in a new issue