diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2008-08-31 16:00:35 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2008-08-31 16:00:35 +0100 |
commit | 3611717156f4c9ebfdf829319840d49e59b827ce (patch) | |
tree | 979436212a238fe4dd7cfd88071e669fa029196a /protocols/nogaim.c | |
parent | d995c9b5de1bff5e3eb5de47b7ffbd3e92e2ac3d (diff) |
Added auto_join code.
Diffstat (limited to 'protocols/nogaim.c')
-rw-r--r-- | protocols/nogaim.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/protocols/nogaim.c b/protocols/nogaim.c index 6a267adf..20d2f3f1 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -248,6 +248,8 @@ static gboolean send_keepalive( gpointer d, gint fd, b_input_condition cond ) void imcb_connected( struct im_connection *ic ) { + irc_t *irc = ic->irc; + struct chat *c; user_t *u; /* MSN servers sometimes redirect you to a different server and do @@ -270,6 +272,15 @@ void imcb_connected( struct im_connection *ic ) /* Apparently we're connected successfully, so reset the exponential backoff timer. */ ic->acc->auto_reconnect_delay = 0; + + for( c = irc->chatrooms; c; c = c->next ) + { + if( c->acc != ic->acc ) + continue; + + if( set_getbool( &c->set, "auto_join" ) ) + chat_join( irc, c ); + } } gboolean auto_reconnect( gpointer data, gint fd, b_input_condition cond ) |