From a91ecee010fdbd8e62e874e23a443206a48308c0 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Mon, 23 Jan 2006 15:20:18 +0100 Subject: /AWAY now only sets the IM-protocols away that belong to the current IRC /connection (was an issue in single-process daemon mode). --- irc_commands.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'irc_commands.c') diff --git a/irc_commands.c b/irc_commands.c index 9e47b83b..66c39bc5 100644 --- a/irc_commands.c +++ b/irc_commands.c @@ -414,8 +414,8 @@ static void irc_cmd_topic( irc_t *irc, char **cmd ) static void irc_cmd_away( irc_t *irc, char **cmd ) { user_t *u = user_find( irc, irc->nick ); - GSList *c = get_connections(); char *away = cmd[1]; + account_t *a; if( !u ) return; @@ -442,12 +442,12 @@ static void irc_cmd_away( irc_t *irc, char **cmd ) irc_reply( irc, 305, ":Welcome back" ); } - while( c ) + for( a = irc->accounts; a; a = a->next ) { - if( ((struct gaim_connection *)c->data)->flags & OPT_LOGGED_IN ) - proto_away( c->data, u->away ); + struct gaim_connection *gc = a->gc; - c = c->next; + if( gc && gc->flags & OPT_LOGGED_IN ) + proto_away( gc, u->away ); } } -- cgit v1.2.3