diff options
author | Timo Sirainen <cras@irssi.org> | 2001-06-26 22:33:43 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-06-26 22:33:43 +0000 |
commit | f4e65d6222dee6879a3cc25c7f55b9ba75f83738 (patch) | |
tree | 5d016b7c988b148257054a34ca5024ee5d701886 /src/irc/core | |
parent | 8ec78b0723c518118e3cc91a2e9ae23664ad3b65 (diff) | |
download | irssi-f4e65d6222dee6879a3cc25c7f55b9ba75f83738.zip |
Don't send unaway to server if we're not away.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1572 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc/core')
-rw-r--r-- | src/irc/core/irc-commands.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/irc/core/irc-commands.c b/src/irc/core/irc-commands.c index cac63016..fdad5d6e 100644 --- a/src/irc/core/irc-commands.c +++ b/src/irc/core/irc-commands.c @@ -511,10 +511,13 @@ static void server_send_away(IRC_SERVER_REC *server, const char *reason) if (!IS_IRC_SERVER(server)) return; - g_free_not_null(server->away_reason); - server->away_reason = g_strdup(reason); + if (*reason != '\0' || server->usermode_away) { + g_free_and_null(server->away_reason); + if (*reason != '\0') + server->away_reason = g_strdup(reason); - irc_send_cmdv(server, "AWAY :%s", reason); + irc_send_cmdv(server, "AWAY :%s", reason); + } } /* SYNTAX: AWAY [-one | -all] [<reason>] */ |