diff options
author | Alexander Færøy <ahf@0x90.dk> | 2014-10-01 21:54:00 +0200 |
---|---|---|
committer | Alexander Færøy <ahf@0x90.dk> | 2014-10-01 21:54:00 +0200 |
commit | a2121efed3c51beee3a26ef769f280c88bc551e6 (patch) | |
tree | 0c56eb19ea0b8fb61e7474f07e98363f33366579 /src | |
parent | 6884a74b29dfd1097b4aade39434ed23bb82ad7c (diff) | |
parent | d68ee06aa4867a6fda7ba4f3fb254a7228edba1b (diff) | |
download | irssi-a2121efed3c51beee3a26ef769f280c88bc551e6.zip |
Merge pull request #142 from dequis/away-with-no-reason
irc_server_send_away: don't send empty param if there's no away reason
Diffstat (limited to 'src')
-rw-r--r-- | src/irc/core/irc-servers.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c index 6013de1a..86f1b0b1 100644 --- a/src/irc/core/irc-servers.c +++ b/src/irc/core/irc-servers.c @@ -484,9 +484,11 @@ void irc_server_send_away(IRC_SERVER_REC *server, const char *reason) if (*reason != '\0') { server->away_reason = g_strdup(reason); reason = recoded = recode_out(SERVER(server), reason, NULL); + irc_send_cmdv(server, "AWAY :%s", reason); + } else { + irc_send_cmdv(server, "AWAY"); } - irc_send_cmdv(server, "AWAY :%s", reason); } g_free(recoded); } |