# HG changeset patch # User David Demelier # Date 1541591700 -3600 # Node ID 7145a3df4cb79e12069c912631d093e787b7fbe7 # Parent d0bd1918374350290a7fba228fcade277639d769 misc: rename host to hostname, closes #941 @2h diff -r d0bd19183743 -r 7145a3df4cb7 MIGRATING.md --- a/MIGRATING.md Mon Nov 05 13:47:51 2018 +0100 +++ b/MIGRATING.md Wed Nov 07 12:55:00 2018 +0100 @@ -8,74 +8,88 @@ ### Irccdctl - - The functions `server-cnotice` and `server-cmode` have been removed, use - `server-notice` and `server-mode` instead, - - The option `connect.host` has been renamed to `connect.hostname` (#941). +- The functions `server-cnotice` and `server-cmode` have been removed, use + `server-notice` and `server-mode` instead, +- The option `connect.host` has been renamed to `connect.hostname`, +- The option `--host` has been renamed to `--hostname`. ### Plugins #### Logger - - The keyword `source` has been removed and replaced by `channel`, - - The keyword `origin` has been added, - - Formats `cnotice`, `cmode`, `query` have been removed. +- The keyword `source` has been removed and replaced by `channel`, +- The keyword `origin` has been added, +- Formats `cnotice`, `cmode`, `query` have been removed. ### Network API - - The requests `server-cnotice` and `server-cmode` have been removed, use - `server-notice` and `server-mode` instead, - - The request `server-mode` command requires a new argument `channel`. +- The requests `server-cnotice` and `server-cmode` have been removed, use + `server-notice` and `server-mode` instead, +- The request `server-mode` command requires a new argument `channel`. +- The property `host` in request `server-connect` has been renamed to + `hostname`, +- The request `server-info` sends `hostname` property instead of `host`, +- The event `onWhois` sends `hostname` property instead of `host`. ### CMake options - - All options are now starting with `IRCCD_` for better compatibility with - external projects, - - CMake now use GNUInstallDirs module to specify installation paths, all - IRCCD_WITH_ options have been replaced by CMAKE_INSTALL_ equivalents. +- All options are now starting with `IRCCD_` for better compatibility with + external projects, +- CMake now use GNUInstallDirs module to specify installation paths, all + IRCCD\_WITH\_ options have been replaced by CMAKE\_INSTALL\_ equivalents. ### Paths - - The default plugins path has been changed from **share/irccd/plugins** to - **lib64/irccd**. +- The default plugins path has been changed from **share/irccd/plugins** to + **lib64/irccd**. ### Javascript API #### Events - - The events `onChannelMode` and `onChannelNotice` have been removed, plugins - must use `Server.isSelf(target)` to determine a channel/private message, - - The event `onNotice` takes a new `channel` argument, - - The event `onMode` takes new `channel`, `limit`, `user`, `mask` arguments. +- The events `onChannelMode` and `onChannelNotice` have been removed, plugins + must use `Server.isSelf(target)` to determine a channel/private message, +- The event `onNotice` takes a new `channel` argument, +- The event `onMode` takes new `channel`, `limit`, `user`, `mask` arguments, +- The object information in `onWhois` event now has `hostname` property instead + of `host`. #### Module Server - - The methods `Server.cmode` and `Server.cnotice` have been removed, use - `Server.mode` and `Server.notice` instead, - - The method `Server.mode` requires a new argument `channel`. +- The methods `Server.cmode` and `Server.cnotice` have been removed, use + `Server.mode` and `Server.notice` instead, +- The method `Server.mode` requires a new argument `channel`, +- The object returned in the method `Server.info` now has a `hostname` property + instead of `host`. #### Module ElapsedTimer - - The method ElapsedTimer.reset has been removed, just use `start` instead - when you want to accumulate time. +- The method ElapsedTimer.reset has been removed, just use `start` instead + when you want to accumulate time. #### Module Directory - - The property `Directory.count` has been removed. +- The property `Directory.count` has been removed. #### Module Plugin The following properties in `Irccd.Plugin` has been renamed: - - **cachePath** renamed to **paths.cache**, - - **configPath** renamed to **paths.config**, - - **dataPath renamed** to **paths.data**. +- **cachePath** renamed to **paths.cache**, +- **configPath** renamed to **paths.config**, +- **dataPath** renamed to **paths.data**. Note: these paths are no more automatically detected and set with the new `[paths]` and `[paths.]` sections. +#### Module Server + +- The property `host` in the function `Irccd.Server` has been renamed to + `hostname`. + #### Module System - - The function `Irccd.System.name` has now well defined return value. +- The function `Irccd.System.name` has now well defined return value. ### Irccd diff -r d0bd19183743 -r 7145a3df4cb7 irccd-test/main.cpp --- a/irccd-test/main.cpp Mon Nov 05 13:47:51 2018 +0100 +++ b/irccd-test/main.cpp Wed Nov 07 12:55:00 2018 +0100 @@ -452,7 +452,7 @@ ev.server = get_server(get_arg(args, 0)); ev.whois.nick = get_arg(args, 1); ev.whois.user = get_arg(args, 2); - ev.whois.host = get_arg(args, 3); + ev.whois.hostname = get_arg(args, 3); ev.whois.realname = get_arg(args, 4); if (args.size() >= 5) diff -r d0bd19183743 -r 7145a3df4cb7 irccdctl/cli.cpp --- a/irccdctl/cli.cpp Mon Nov 05 13:47:51 2018 +0100 +++ b/irccdctl/cli.cpp Wed Nov 07 12:55:00 2018 +0100 @@ -165,7 +165,7 @@ std::cout << "server: " << json_util::pretty(v.value("server", "(unknown)")) << "\n"; std::cout << "nickname: " << json_util::pretty(v.value("nickname", "(unknown)")) << "\n"; std::cout << "username: " << json_util::pretty(v.value("username", "(unknown)")) << "\n"; - std::cout << "host: " << json_util::pretty(v.value("host", "(unknown)")) << "\n"; + std::cout << "hostname: " << json_util::pretty(v.value("hostname", "(unknown)")) << "\n"; std::cout << "realname: " << json_util::pretty(v.value("realname", "(unknown)")) << "\n"; } @@ -775,7 +775,7 @@ auto object = nlohmann::json::object({ { "command", "server-connect" }, { "name", copy[0] }, - { "host", copy[1] } + { "hostname", copy[1] } }); if (copy.size() == 3) { @@ -844,7 +844,7 @@ request(ctl, std::move(json), [] (auto result) { std::cout << std::boolalpha; std::cout << "Name : " << json_util::pretty(result["name"]) << std::endl; - std::cout << "Host : " << json_util::pretty(result["host"]) << std::endl; + std::cout << "Hostname : " << json_util::pretty(result["hostname"]) << std::endl; std::cout << "Port : " << json_util::pretty(result["port"]) << std::endl; std::cout << "Ipv6 : " << json_util::pretty(result["ipv6"]) << std::endl; std::cout << "SSL : " << json_util::pretty(result["ssl"]) << std::endl; diff -r d0bd19183743 -r 7145a3df4cb7 irccdctl/main.cpp --- a/irccdctl/main.cpp Mon Nov 05 13:47:51 2018 +0100 +++ b/irccdctl/main.cpp Wed Nov 07 12:55:00 2018 +0100 @@ -79,8 +79,8 @@ * type = "ip" * hostname = "ip or hostname" * port = "port number or service" - * family = "ipv4, ipv6" (Optional, default: ipv4) - * ssl = true | false + * family = "ipv4, ipv6" (Optional, default: ipv4, ipv6) + * ssl = true | false (Optional, default: false) */ auto read_connect_ip(const ini::section& sc) -> std::unique_ptr { @@ -278,7 +278,7 @@ * Parse internet connection from command line. * * -t ip | ipv6 - * -h host or ip + * -h hostname or ip * -p port */ auto parse_connect_ip(std::string_view type, const option::result& options) -> std::unique_ptr @@ -286,7 +286,7 @@ option::result::const_iterator it; // Host (-h or --host). - if ((it = options.find("-h")) == options.end() && (it = options.find("--host")) == options.end()) + if ((it = options.find("-h")) == options.end() && (it = options.find("--hostname")) == options.end()) throw transport_error(transport_error::invalid_hostname); const auto hostname = it->second; @@ -364,7 +364,7 @@ { "--config", true }, { "-h", true }, { "--help", false }, - { "--host", true }, + { "--hostname", true }, { "-p", true }, { "--port", true }, { "-P", true }, diff -r d0bd19183743 -r 7145a3df4cb7 libirccd-core/irccd/connector.hpp --- a/libirccd-core/irccd/connector.hpp Mon Nov 05 13:47:51 2018 +0100 +++ b/libirccd-core/irccd/connector.hpp Wed Nov 07 12:55:00 2018 +0100 @@ -203,13 +203,13 @@ } inline ip_connector::ip_connector(boost::asio::io_context& service, - std::string host, + std::string hostname, std::string port, bool ipv4, bool ipv6) noexcept : socket_connector_base(service) , resolver_(service) - , hostname_(std::move(host)) + , hostname_(std::move(hostname)) , port_(std::move(port)) , ipv4_(ipv4) , ipv6_(ipv6) diff -r d0bd19183743 -r 7145a3df4cb7 libirccd-js/irccd/js/js_plugin.cpp --- a/libirccd-js/irccd/js/js_plugin.cpp Mon Nov 05 13:47:51 2018 +0100 +++ b/libirccd-js/irccd/js/js_plugin.cpp Wed Nov 07 12:55:00 2018 +0100 @@ -355,8 +355,8 @@ duk_put_prop_string(ctx, -2, "username"); duk::push(ctx, whois.realname); duk_put_prop_string(ctx, -2, "realname"); - duk::push(ctx, whois.host); - duk_put_prop_string(ctx, -2, "host"); + duk::push(ctx, whois.hostname); + duk_put_prop_string(ctx, -2, "hostname"); duk::push(ctx, whois.channels); duk_put_prop_string(ctx, -2, "channels"); } diff -r d0bd19183743 -r 7145a3df4cb7 libirccd-js/irccd/js/server_js_api.cpp --- a/libirccd-js/irccd/js/server_js_api.cpp Mon Nov 05 13:47:51 2018 +0100 +++ b/libirccd-js/irccd/js/server_js_api.cpp Wed Nov 07 12:55:00 2018 +0100 @@ -87,8 +87,8 @@ duk_push_object(ctx); duk::push(ctx, server->get_id()); duk_put_prop_string(ctx, -2, "name"); - duk::push(ctx, server->get_host()); - duk_put_prop_string(ctx, -2, "host"); + duk::push(ctx, server->get_hostname()); + duk_put_prop_string(ctx, -2, "hostname"); duk_push_int(ctx, server->get_port()); duk_put_prop_string(ctx, -2, "port"); duk_push_boolean(ctx, @@ -595,7 +595,7 @@ * Params must be filled with the following properties: * * name: the name, - * host: the host, + * hostname: the hostname, * ipv6: true to use ipv6, (Optional: default false) * port: the port number, (Optional: default 6667) * password: the password, (Optional: default none) diff -r d0bd19183743 -r 7145a3df4cb7 libirccd/irccd/daemon/command.cpp --- a/libirccd/irccd/daemon/command.cpp Mon Nov 05 13:47:51 2018 +0100 +++ b/libirccd/irccd/daemon/command.cpp Wed Nov 07 12:55:00 2018 +0100 @@ -523,7 +523,7 @@ // General stuff. response.push_back({"command", "server-info"}); response.push_back({"name", server->get_id()}); - response.push_back({"host", server->get_host()}); + response.push_back({"hostname", server->get_hostname()}); response.push_back({"port", server->get_port()}); response.push_back({"nickname", server->get_nickname()}); response.push_back({"username", server->get_username()}); diff -r d0bd19183743 -r 7145a3df4cb7 libirccd/irccd/daemon/server.cpp --- a/libirccd/irccd/daemon/server.cpp Mon Nov 05 13:47:51 2018 +0100 +++ b/libirccd/irccd/daemon/server.cpp Wed Nov 07 12:55:00 2018 +0100 @@ -357,7 +357,7 @@ * params[0] == originator * params[1] == nickname * params[2] == username - * params[3] == host + * params[3] == hostname * params[4] == * (no idea what is that) * params[5] == realname */ @@ -368,7 +368,7 @@ info.nick = msg.get(1); info.user = msg.get(2); - info.host = msg.get(3); + info.hostname = msg.get(3); info.realname = msg.get(5); whois_map_.emplace(info.nick, info); @@ -497,13 +497,13 @@ handler(code); } -server::server(boost::asio::io_service& service, std::string id, std::string host) +server::server(boost::asio::io_service& service, std::string id, std::string hostname) : id_(std::move(id)) - , host_(std::move(host)) + , hostname_(std::move(hostname)) , service_(service) , timer_(service) { - assert(!host_.empty()); + assert(!hostname_.empty()); // Initialize nickname and username. auto user = sys::username(); @@ -528,9 +528,9 @@ return id_; } -auto server::get_host() const noexcept -> const std::string& +auto server::get_hostname() const noexcept -> const std::string& { - return host_; + return hostname_; } auto server::get_password() const noexcept -> const std::string& @@ -687,7 +687,7 @@ const auto self = shared_from_this(); - conn_->connect(host_, std::to_string(port_), [this, handler, c = conn_] (auto code) { + conn_->connect(hostname_, std::to_string(port_), [this, handler, c = conn_] (auto code) { handle_connect(code, handler); }); } diff -r d0bd19183743 -r 7145a3df4cb7 libirccd/irccd/daemon/server.hpp --- a/libirccd/irccd/daemon/server.hpp Mon Nov 05 13:47:51 2018 +0100 +++ b/libirccd/irccd/daemon/server.hpp Wed Nov 07 12:55:00 2018 +0100 @@ -69,7 +69,7 @@ struct whois_info { std::string nick; //!< user's nickname std::string user; //!< user's user - std::string host; //!< hostname + std::string hostname; //!< hostname std::string realname; //!< realname std::vector channels; //!< the channels where the user is }; @@ -284,7 +284,7 @@ std::string id_; // Connection information. - std::string host_; + std::string hostname_; std::string password_; std::uint16_t port_{6667}; options flags_{options::none}; @@ -345,9 +345,9 @@ * \pre !host.empty() * \param service the service * \param name the identifier - * \param host the hostname + * \param hostname the hostname */ - server(boost::asio::io_service& service, std::string id, std::string host = "localhost"); + server(boost::asio::io_service& service, std::string id, std::string hostname = "localhost"); /** * Destructor. Close the connection if needed. @@ -373,7 +373,7 @@ * * \return the hostname */ - auto get_host() const noexcept -> const std::string&; + auto get_hostname() const noexcept -> const std::string&; /** * Get the password. diff -r d0bd19183743 -r 7145a3df4cb7 libirccd/irccd/daemon/server_service.cpp --- a/libirccd/irccd/daemon/server_service.cpp Mon Nov 05 13:47:51 2018 +0100 +++ b/libirccd/irccd/daemon/server_service.cpp Wed Nov 07 12:55:00 2018 +0100 @@ -431,7 +431,7 @@ irccd_.get_log().debug(*ev.server) << "event onWhois" << std::endl; irccd_.get_log().debug(*ev.server) << " nickname: " << ev.whois.nick << std::endl; irccd_.get_log().debug(*ev.server) << " username: " << ev.whois.user << std::endl; - irccd_.get_log().debug(*ev.server) << " host: " << ev.whois.host << std::endl; + irccd_.get_log().debug(*ev.server) << " hostname: " << ev.whois.hostname << std::endl; irccd_.get_log().debug(*ev.server) << " realname: " << ev.whois.realname << std::endl; irccd_.get_log().debug(*ev.server) << " channels: " << string_util::join(ev.whois.channels, ", ") << std::endl; @@ -440,7 +440,7 @@ { "server", ev.server->get_id() }, { "nickname", ev.whois.nick }, { "username", ev.whois.user }, - { "host", ev.whois.host }, + { "hostname", ev.whois.hostname }, { "realname", ev.whois.realname } })); diff -r d0bd19183743 -r 7145a3df4cb7 libirccd/irccd/daemon/server_util.cpp --- a/libirccd/irccd/daemon/server_util.cpp Mon Nov 05 13:47:51 2018 +0100 +++ b/libirccd/irccd/daemon/server_util.cpp Wed Nov 07 12:55:00 2018 +0100 @@ -225,14 +225,14 @@ // Mandatory parameters. const deserializer parser(object); const auto id = parser.get("name"); - const auto host = parser.get("host"); + const auto hostname = parser.get("hostname"); if (!id || !string_util::is_identifier(*id)) throw server_error(server_error::invalid_identifier); - if (!host || host->empty()) + if (!hostname || hostname->empty()) throw server_error(server_error::invalid_hostname); - const auto sv = std::make_shared(service, *id, *host); + const auto sv = std::make_shared(service, *id, *hostname); from_json_load_options(*sv, parser); from_json_load_flags(*sv, parser); @@ -245,14 +245,14 @@ { // Mandatory parameters. const auto id = sc.get("name"); - const auto host = sc.get("hostname"); + const auto hostname = sc.get("hostname"); if (!string_util::is_identifier(id.get_value())) throw server_error(server_error::invalid_identifier); - if (host.get_value().empty()) + if (hostname.get_value().empty()) throw server_error(server_error::invalid_hostname); - const auto sv = std::make_shared(service, id.get_value(), host.get_value()); + const auto sv = std::make_shared(service, id.get_value(), hostname.get_value()); from_config_load_channels(*sv, sc); from_config_load_flags(*sv, sc); diff -r d0bd19183743 -r 7145a3df4cb7 plugins/links/requester.cpp --- a/plugins/links/requester.cpp Mon Nov 05 13:47:51 2018 +0100 +++ b/plugins/links/requester.cpp Wed Nov 07 12:55:00 2018 +0100 @@ -149,7 +149,7 @@ req_.version(11); req_.method(verb::get); req_.target(uri_.path); - req_.set(field::host, uri_.host); + req_.set(field::host, uri_.hostname); req_.set(field::user_agent, BOOST_BEAST_VERSION_STRING); const auto self = shared_from_this(); @@ -247,7 +247,7 @@ auto self = shared_from_this(); timer(); - resolver_.async_resolve(uri_.host, uri_.port, [self] (auto code, auto eps) { + resolver_.async_resolve(uri_.hostname, uri_.port, [self] (auto code, auto eps) { self->handle_resolve(code, eps); }); } diff -r d0bd19183743 -r 7145a3df4cb7 plugins/links/uri.cpp --- a/plugins/links/uri.cpp Mon Nov 05 13:47:51 2018 +0100 +++ b/plugins/links/uri.cpp Wed Nov 07 12:55:00 2018 +0100 @@ -68,7 +68,7 @@ ret.port = ret.scheme == "http" ? "80" : "443"; if (hnd.hostText.first) - ret.host = string(hnd.hostText.first, hnd.hostText.afterLast - hnd.hostText.first); + ret.hostname = string(hnd.hostText.first, hnd.hostText.afterLast - hnd.hostText.first); if (hnd.portText.first) ret.port = string(hnd.portText.first, hnd.portText.afterLast - hnd.portText.first); diff -r d0bd19183743 -r 7145a3df4cb7 plugins/links/uri.hpp --- a/plugins/links/uri.hpp Mon Nov 05 13:47:51 2018 +0100 +++ b/plugins/links/uri.hpp Wed Nov 07 12:55:00 2018 +0100 @@ -34,7 +34,7 @@ */ struct uri { std::string scheme; //!< scheme (e.g. http) - std::string host; //!< host (e.g. example.org) + std::string hostname; //!< host (e.g. example.org) std::string port; //!< port (e.g. 8080) std::string path; //!< path (e.g. /foo/bar) diff -r d0bd19183743 -r 7145a3df4cb7 tests/src/irccdctl/cli-server-info/main.cpp --- a/tests/src/irccdctl/cli-server-info/main.cpp Mon Nov 05 13:47:51 2018 +0100 +++ b/tests/src/irccdctl/cli-server-info/main.cpp Wed Nov 07 12:55:00 2018 +0100 @@ -41,7 +41,7 @@ BOOST_TEST(out.size() == 10U); BOOST_TEST(err.size() == 0U); BOOST_TEST(out[0] == "Name : test"); - BOOST_TEST(out[1] == "Host : localhost"); + BOOST_TEST(out[1] == "Hostname : localhost"); BOOST_TEST(out[2] == "Port : 6667"); BOOST_TEST(out[3] == "Ipv6 : null"); BOOST_TEST(out[4] == "SSL : null"); diff -r d0bd19183743 -r 7145a3df4cb7 tests/src/libirccd/command-server-connect/main.cpp --- a/tests/src/libirccd/command-server-connect/main.cpp Mon Nov 05 13:47:51 2018 +0100 +++ b/tests/src/libirccd/command-server-connect/main.cpp Wed Nov 07 12:55:00 2018 +0100 @@ -34,7 +34,7 @@ const auto [json, code] = request({ { "command", "server-connect" }, { "name", "local" }, - { "host", "irc.example.org" } + { "hostname", "irc.example.org" } }); const auto s = irccd_.servers().get("local"); @@ -42,7 +42,7 @@ BOOST_TEST(!code); BOOST_TEST(s); BOOST_TEST(s->get_id() == "local"); - BOOST_TEST(s->get_host() == "irc.example.org"); + BOOST_TEST(s->get_hostname() == "irc.example.org"); BOOST_TEST(s->get_port() == 6667U); } @@ -53,7 +53,7 @@ const auto [json, code] = request({ { "command", "server-connect" }, { "name", "local2" }, - { "host", "irc.example2.org" }, + { "hostname", "irc.example2.org" }, { "password", "nonono" }, { "nickname", "francis" }, { "realname", "the_francis" }, @@ -72,7 +72,7 @@ BOOST_TEST(!code); BOOST_TEST(s); BOOST_TEST(s->get_id() == "local2"); - BOOST_TEST(s->get_host() == "irc.example2.org"); + BOOST_TEST(s->get_hostname() == "irc.example2.org"); BOOST_TEST(s->get_port() == 18000U); BOOST_TEST(s->get_password() == "nonono"); BOOST_TEST(s->get_nickname() == "francis"); @@ -97,7 +97,7 @@ const auto [json, code] = request({ { "command", "server-connect" }, { "name", "local" }, - { "host", "127.0.0.1" } + { "hostname", "127.0.0.1" } }); BOOST_TEST(code == server_error::already_exists); @@ -122,7 +122,7 @@ const auto [json, code] = request({ { "command", "server-connect" }, { "name", "new" }, - { "host", 123456 } + { "hostname", 123456 } }); BOOST_TEST(code == server_error::invalid_hostname); @@ -135,7 +135,7 @@ const auto [json, code] = request({ { "command", "server-connect" }, { "name", "" }, - { "host", "127.0.0.1" } + { "hostname", "127.0.0.1" } }); BOOST_TEST(code == server_error::invalid_identifier); @@ -148,7 +148,7 @@ const auto [json, code] = request({ { "command", "server-connect" }, { "name", 123456 }, - { "host", "127.0.0.1" } + { "hostname", "127.0.0.1" } }); BOOST_TEST(code == server_error::invalid_identifier); @@ -161,7 +161,7 @@ const auto [json, code] = request({ { "command", "server-connect" }, { "name", "new" }, - { "host", "127.0.0.1" }, + { "hostname", "127.0.0.1" }, { "port", "notaint" } }); @@ -175,7 +175,7 @@ const auto [json, code] = request({ { "command", "server-connect" }, { "name", "new" }, - { "host", "127.0.0.1" }, + { "hostname", "127.0.0.1" }, { "port", -123 } }); @@ -189,7 +189,7 @@ const auto [json, code] = request({ { "command", "server-connect" }, { "name", "new" }, - { "host", "127.0.0.1" }, + { "hostname", "127.0.0.1" }, { "port", 1000000 } }); @@ -205,7 +205,7 @@ const auto [json, code] = request({ { "command", "server-connect" }, { "name", "new" }, - { "host", "127.0.0.1" }, + { "hostname", "127.0.0.1" }, { "ssl", true } }); diff -r d0bd19183743 -r 7145a3df4cb7 tests/src/libirccd/command-server-info/main.cpp --- a/tests/src/libirccd/command-server-info/main.cpp Mon Nov 05 13:47:51 2018 +0100 +++ b/tests/src/libirccd/command-server-info/main.cpp Wed Nov 07 12:55:00 2018 +0100 @@ -52,7 +52,7 @@ BOOST_TEST(!code); BOOST_TEST(json.is_object()); - BOOST_TEST(json["host"].get() == "example.org"); + BOOST_TEST(json["hostname"].get() == "example.org"); BOOST_TEST(json["name"].get() == "test"); BOOST_TEST(json["nickname"].get() == "pascal"); BOOST_TEST(json["port"].get() == 8765); diff -r d0bd19183743 -r 7145a3df4cb7 tests/src/libirccd/server-util/full.json --- a/tests/src/libirccd/server-util/full.json Mon Nov 05 13:47:51 2018 +0100 +++ b/tests/src/libirccd/server-util/full.json Wed Nov 07 12:55:00 2018 +0100 @@ -1,6 +1,6 @@ { "name": "localhost", - "host": "irc.localhost", + "hostname": "irc.localhost", "port": 3344, "password": "secret", "nickname": "superbot", diff -r d0bd19183743 -r 7145a3df4cb7 tests/src/libirccd/server-util/main.cpp --- a/tests/src/libirccd/server-util/main.cpp Mon Nov 05 13:47:51 2018 +0100 +++ b/tests/src/libirccd/server-util/main.cpp Wed Nov 07 12:55:00 2018 +0100 @@ -88,7 +88,7 @@ const auto sv = server_util::from_config(ctx_, open_config("full.conf")[0]); BOOST_TEST(sv->get_id() == "localhost"); - BOOST_TEST(sv->get_host() == "irc.localhost"); + BOOST_TEST(sv->get_hostname() == "irc.localhost"); BOOST_TEST(sv->get_port() == 3344U); BOOST_TEST(sv->get_password() == "secret"); BOOST_TEST(sv->get_nickname() == "superbot"); @@ -106,7 +106,7 @@ const auto sv = server_util::from_config(ctx_, open_config("ssl.conf")[0]); BOOST_TEST(sv->get_id() == "localhost"); - BOOST_TEST(sv->get_host() == "irc.localhost"); + BOOST_TEST(sv->get_hostname() == "irc.localhost"); BOOST_TEST(sv->get_port() == 6697U); BOOST_TEST(sv->get_password() == "secret"); BOOST_TEST(sv->get_nickname() == "secure"); @@ -133,7 +133,7 @@ const auto sv = server_util::from_json(ctx_, open_json("full.json")); BOOST_TEST(sv->get_id() == "localhost"); - BOOST_TEST(sv->get_host() == "irc.localhost"); + BOOST_TEST(sv->get_hostname() == "irc.localhost"); BOOST_TEST(sv->get_port() == 3344U); BOOST_TEST(sv->get_password() == "secret"); BOOST_TEST(sv->get_nickname() == "superbot");