mirror of
https://github.com/matrix-construct/construct
synced 2024-10-02 21:59:02 +02:00
modules/console: Fix hostport parse; fix peer.hostcanon reference.
This commit is contained in:
parent
41602087f4
commit
587bf4e820
1 changed files with 5 additions and 11 deletions
|
@ -3289,7 +3289,7 @@ console_cmd__peer(opt &out, const string_view &line)
|
|||
server::find(hostport)
|
||||
};
|
||||
|
||||
print(peer.hostname, peer);
|
||||
print(peer.hostcanon, peer);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -3561,20 +3561,14 @@ catch(const std::out_of_range &e)
|
|||
bool
|
||||
console_cmd__net__host(opt &out, const string_view &line)
|
||||
{
|
||||
const params token
|
||||
const params param{line, " ",
|
||||
{
|
||||
line, " ", {"host", "service"}
|
||||
};
|
||||
|
||||
const auto &host{token.at(0)};
|
||||
const auto &service
|
||||
{
|
||||
token.count() > 1? token.at(1) : string_view{}
|
||||
};
|
||||
"hostport"
|
||||
}};
|
||||
|
||||
const net::hostport hostport
|
||||
{
|
||||
host, service
|
||||
param["hostport"]
|
||||
};
|
||||
|
||||
ctx::dock dock;
|
||||
|
|
Loading…
Reference in a new issue