diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2006-08-05 18:44:55 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2006-08-05 18:44:55 +0000 |
commit | b2183ee3edbfceb66a5705fcfc601c6e72728049 (patch) | |
tree | cb763631df4039edbcb25777294dd80a3d7fd961 /src/irc/irc-send.c | |
parent | 22b80dec657f4353bd6aae69b16459ef2e50f1ba (diff) | |
download | weechat-b2183ee3edbfceb66a5705fcfc601c6e72728049.zip |
Fixed away after server disconnection (now away is set again when reconnecting) (bug #16359)
Diffstat (limited to 'src/irc/irc-send.c')
-rw-r--r-- | src/irc/irc-send.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/irc/irc-send.c b/src/irc/irc-send.c index 785f44369..bd45810c7 100644 --- a/src/irc/irc-send.c +++ b/src/irc/irc-send.c @@ -244,6 +244,11 @@ irc_send_away (t_irc_server *server, char *arguments) if (arguments) { server->is_away = 1; + if (server->away_message) + free (server->away_message); + server->away_message = (char *) malloc (strlen (arguments) + 1); + if (server->away_message) + strcpy (server->away_message, arguments); server->away_time = time (NULL); server_sendf (server, "AWAY :%s\r\n", arguments); if (cfg_irc_display_away != CFG_IRC_DISPLAY_AWAY_OFF) @@ -272,6 +277,11 @@ irc_send_away (t_irc_server *server, char *arguments) { server_sendf (server, "AWAY\r\n"); server->is_away = 0; + if (server->away_message) + { + free (server->away_message); + server->away_message = NULL; + } if (server->away_time != 0) { time_now = time (NULL); |