1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

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
This commit is contained in:
Timo Sirainen 2001-06-26 22:33:43 +00:00 committed by cras
parent 8ec78b0723
commit f4e65d6222

View File

@ -511,10 +511,13 @@ static void server_send_away(IRC_SERVER_REC *server, const char *reason)
if (!IS_IRC_SERVER(server)) if (!IS_IRC_SERVER(server))
return; return;
g_free_not_null(server->away_reason); if (*reason != '\0' || server->usermode_away) {
server->away_reason = g_strdup(reason); 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>] */ /* SYNTAX: AWAY [-one | -all] [<reason>] */