diff options
-rw-r--r-- | protocols/account.c | 14 | ||||
-rw-r--r-- | protocols/nogaim.c | 11 |
2 files changed, 12 insertions, 13 deletions
diff --git a/protocols/account.c b/protocols/account.c index 188e362e..234b9de2 100644 --- a/protocols/account.c +++ b/protocols/account.c @@ -28,7 +28,7 @@ #include "account.h" static const char* account_protocols_local[] = { - "gg", NULL + "gg", "whatsapp", NULL }; static char *set_eval_nick_source( set_t *set, char *value ); @@ -350,9 +350,6 @@ static gboolean account_on_timeout( gpointer d, gint fd, b_input_condition cond void account_on( bee_t *bee, account_t *a ) { - GHashTableIter nicks; - gpointer k, v; - if( a->ic ) { /* Trying to enable an already-enabled account */ @@ -366,15 +363,6 @@ void account_on( bee_t *bee, account_t *a ) if( a->ic && !( a->ic->flags & ( OPT_SLOW_LOGIN | OPT_LOGGED_IN ) ) ) a->ic->keepalive = b_timeout_add( 120000, account_on_timeout, a->ic ); - - if( a->flags & ACC_FLAG_LOCAL ) - { - g_hash_table_iter_init(&nicks, a->nicks); - while( g_hash_table_iter_next( &nicks, &k, &v ) ) - { - a->prpl->add_buddy( a->ic, (char*) k, NULL ); - } - } } void account_off( bee_t *bee, account_t *a ) diff --git a/protocols/nogaim.c b/protocols/nogaim.c index ff1c9a85..0a674b40 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -293,6 +293,17 @@ void imcb_connected( struct im_connection *ic ) function should be handled correctly. (IOW, ignored) */ if( ic->flags & OPT_LOGGED_IN ) return; + + if( ic->acc->flags & ACC_FLAG_LOCAL ) + { + GHashTableIter nicks; + gpointer k, v; + g_hash_table_iter_init( &nicks, ic->acc->nicks ); + while( g_hash_table_iter_next( &nicks, &k, &v ) ) + { + ic->acc->prpl->add_buddy( ic, (char*) k, NULL ); + } + } imcb_log( ic, "Logged in" ); |