diff options
-rw-r--r-- | src/irc/core/irc-servers.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c index d769fa5f..04361ad0 100644 --- a/src/irc/core/irc-servers.c +++ b/src/irc/core/irc-servers.c @@ -348,16 +348,21 @@ static void sig_server_quit(IRC_SERVER_REC *server, const char *msg) void irc_server_send_away(IRC_SERVER_REC *server, const char *reason) { + char *recoded = NULL; + if (!IS_IRC_SERVER(server)) return; if (*reason != '\0' || server->usermode_away) { g_free_and_null(server->away_reason); - if (*reason != '\0') + if (*reason != '\0') { server->away_reason = g_strdup(reason); + reason = recoded = recode_out(SERVER(server), reason, NULL); + } irc_send_cmdv(server, "AWAY :%s", reason); } + g_free(recoded); } void irc_server_send_data(IRC_SERVER_REC *server, const char *data, int len) |