From 5c7b45cb652c73a8f2c827116786a1b21519d4b7 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 4 Jul 2010 14:36:08 +0100 Subject: Auto joins for chatrooms. --- protocols/bee.h | 3 +++ protocols/nogaim.c | 6 ++++++ 2 files changed, 9 insertions(+) (limited to 'protocols') diff --git a/protocols/bee.h b/protocols/bee.h index c3230f47..e82913d6 100644 --- a/protocols/bee.h +++ b/protocols/bee.h @@ -81,6 +81,9 @@ typedef struct bee_group typedef struct bee_ui_funcs { + void (*imc_connected)( struct im_connection *ic ); + void (*imc_disconnected)( struct im_connection *ic ); + gboolean (*user_new)( bee_t *bee, struct bee_user *bu ); gboolean (*user_free)( bee_t *bee, struct bee_user *bu ); gboolean (*user_fullname)( bee_t *bee, bee_user_t *bu ); diff --git a/protocols/nogaim.c b/protocols/nogaim.c index f88ec693..0998291b 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -286,6 +286,9 @@ void imcb_connected( struct im_connection *ic ) exponential backoff timer. */ ic->acc->auto_reconnect_delay = 0; + if( ic->bee->ui->imc_connected ) + ic->bee->ui->imc_connected( ic ); + /* for( c = irc->chatrooms; c; c = c->next ) { @@ -328,6 +331,9 @@ void imc_logout( struct im_connection *ic, int allow_reconnect ) else ic->flags |= OPT_LOGGING_OUT; + if( ic->bee->ui->imc_disconnected ) + ic->bee->ui->imc_disconnected( ic ); + imcb_log( ic, "Signing off.." ); b_event_remove( ic->keepalive ); -- cgit v1.2.3