summaryrefslogtreecommitdiff
path: root/src/irc/core/irc-servers-reconnect.c
diff options
context:
space:
mode:
authorEmanuele Giaquinta <exg@irssi.org>2008-11-12 20:31:41 +0000
committerexg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564>2008-11-12 20:31:41 +0000
commitcf41f6d45d401494edc009027ab76a433b5d8db8 (patch)
treee3e27a078accb38fd553c7ed71923cc48ea85269 /src/irc/core/irc-servers-reconnect.c
parentee6133f3240285bad34f54e834c8467ced91a513 (diff)
downloadirssi-cf41f6d45d401494edc009027ab76a433b5d8db8.zip
Export server_send_away and use it in irc-servers-reconnect.c:sig_connected
instead of duplicating the code. git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4900 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc/core/irc-servers-reconnect.c')
-rw-r--r--src/irc/core/irc-servers-reconnect.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/irc/core/irc-servers-reconnect.c b/src/irc/core/irc-servers-reconnect.c
index 573bf9b1..1587d4e6 100644
--- a/src/irc/core/irc-servers-reconnect.c
+++ b/src/irc/core/irc-servers-reconnect.c
@@ -70,12 +70,8 @@ static void sig_connected(IRC_SERVER_REC *server)
if (!IS_IRC_SERVER(server) || !server->connrec->reconnection)
return;
- if (server->connrec->away_reason != NULL) {
- irc_send_cmdv(server, "AWAY :%s", server->connrec->away_reason);
-
- g_free(server->away_reason);
- server->away_reason = g_strdup(server->connrec->away_reason);
- }
+ if (server->connrec->away_reason != NULL)
+ irc_server_send_away(server, server->connrec->away_reason);
}
static void event_nick_collision(IRC_SERVER_REC *server, const char *data)