diff --git a/src/fe-common/core/fe-common-core.c b/src/fe-common/core/fe-common-core.c index a475f056..341902df 100644 --- a/src/fe-common/core/fe-common-core.c +++ b/src/fe-common/core/fe-common-core.c @@ -326,8 +326,11 @@ static void autoconnect_servers(void) if (autocon_server != NULL) { /* connect to specified server */ - str = g_strdup_printf(autocon_password == NULL ? "%s %d" : "%s %d %s", - autocon_server, autocon_port, autocon_password); + if (autocon_password == NULL) + str = g_strdup_printf("%s %d", autocon_server, autocon_port); + else + str = g_strdup_printf("%s %d %s", autocon_server, autocon_port, autocon_password); + signal_emit("command connect", 1, str); g_free(str); return; diff --git a/src/irc/core/irc-channels.c b/src/irc/core/irc-channels.c index add18acf..682be4c2 100644 --- a/src/irc/core/irc-channels.c +++ b/src/irc/core/irc-channels.c @@ -146,11 +146,13 @@ static void irc_channels_join(IRC_SERVER_REC *server, const char *data, continue; } if (outchans->len > 0) { - g_string_truncate(outchans, outchans->len-1); - g_string_truncate(outkeys, outkeys->len-1); - irc_send_cmdv(IRC_SERVER(server), - use_keys ? "JOIN %s %s" : "JOIN %s", - outchans->str, outkeys->str); + g_string_truncate(outchans, outchans->len - 1); + g_string_truncate(outkeys, outkeys->len - 1); + + if (use_keys) + irc_send_cmdv(IRC_SERVER(server), "JOIN %s %s", outchans->str, outkeys->str); + else + irc_send_cmdv(IRC_SERVER(server), "JOIN %s", outchans->str); } cmdlen = 0; g_string_truncate(outchans,0); diff --git a/src/irc/core/servers-redirect.c b/src/irc/core/servers-redirect.c index f0a285df..aeb9c010 100644 --- a/src/irc/core/servers-redirect.c +++ b/src/irc/core/servers-redirect.c @@ -433,9 +433,11 @@ static void redirect_abort(IRC_SERVER_REC *server, REDIRECT_REC *rec) if (rec->aborted || !rec->destroyed) { /* emit the failure signal */ - str = g_strdup_printf(rec->failure_signal != NULL ? - "FAILED %s: %s" : "FAILED %s", - rec->cmd->name, rec->failure_signal); + if (rec->failure_signal != NULL) + str = g_strdup_printf("FAILED %s: %s", rec->cmd->name, rec->failure_signal); + else + str = g_strdup_printf("FAILED %s", rec->cmd->name); + rawlog_redirect(server->rawlog, str); g_free(str);