diff options
Diffstat (limited to 'minecctl/rcon-commands.c')
-rw-r--r-- | minecctl/rcon-commands.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/minecctl/rcon-commands.c b/minecctl/rcon-commands.c index 5f98b72..2f1687b 100644 --- a/minecctl/rcon-commands.c +++ b/minecctl/rcon-commands.c @@ -110,30 +110,30 @@ static int rcon_login(struct cfg *cfg, struct server *server) assert_die(cfg && server, "invalid arguments"); - if (list_empty(&server->rcon_addrs)) { + if (list_empty(&server->scfg.rcons)) { error("%s: rcon address unknown", server->name); goto error; } - fd = connect_any(&server->rcon_addrs, true); + fd = connect_any(&server->scfg.rcons, true); if (fd < 0) { error("%s: unable to connect", server->name); goto error; } - if (!server->rcon_password) - server->rcon_password = ask_password(); + if (!server->scfg.rcon_password) + server->scfg.rcon_password = ask_password(); - if (!server->rcon_password) { + if (!server->scfg.rcon_password) { error("%s: can't login - password missing", server->name); goto error; } - send_msg(fd, buf, sizeof(buf), RCON_PACKET_LOGIN, server->rcon_password, + send_msg(fd, buf, sizeof(buf), RCON_PACKET_LOGIN, server->scfg.rcon_password, &rtype, &reply); explicit_bzero(buf, sizeof(buf)); - free_password(&server->rcon_password); + free_password(&server->scfg.rcon_password); if (rtype == RCON_PACKET_LOGIN_OK) verbose("%s: login ok", server->name); |