Exemple #1
0
/**
 * Logout method. Just free the twitter_data.
 */
static void twitter_logout(struct im_connection *ic)
{
	struct twitter_data *td = ic->proto_data;

	// Set the status to logged out.
	ic->flags &= ~OPT_LOGGED_IN;

	// Remove the main_loop function from the function queue.
	b_event_remove(td->main_loop_id);

	if (td->timeline_gc)
		imcb_chat_free(td->timeline_gc);

	if (td) {
		http_close(td->stream);
		oauth_info_free(td->oauth_info);
		g_free(td->user);
		g_free(td->prefix);
		g_free(td->url_host);
		g_free(td->url_path);
		g_free(td->log);
		g_free(td);
	}

	twitter_connections = g_slist_remove(twitter_connections, ic);
}
Exemple #2
0
static void twitter_chat_leave(struct groupchat *c)
{
	struct twitter_data *td = c->ic->proto_data;

	if (c != td->timeline_gc)
		return;		/* WTF? */

	/* If the user leaves the channel: Fine. Rejoin him/her once new
	   tweets come in. */
	imcb_chat_free(td->timeline_gc);
	td->timeline_gc = NULL;
}
Exemple #3
0
void jabber_chat_free(struct groupchat *c)
{
	struct jabber_chat *jc = c->data;

	jabber_buddy_remove_bare(c->ic, jc->name);

	g_free(jc->my_full_jid);
	g_free(jc->name);
	g_free(jc->invite);
	g_free(jc);

	imcb_chat_free(c);
}
Exemple #4
0
static void purple_logout(struct im_connection *ic)
{
	struct purple_data *pd = ic->proto_data;

	if (!pd) {
		return;
	}

	while (ic->groupchats) {
		imcb_chat_free(ic->groupchats->data);
	}

	purple_account_set_enabled(pd->account, "BitlBee", FALSE);
	purple_connections = g_slist_remove(purple_connections, ic);
	purple_accounts_remove(pd->account);
	g_hash_table_destroy(pd->input_requests);
	g_free(pd);
}
Exemple #5
0
void prplcb_conv_free( PurpleConversation *conv )
{
	struct groupchat *gc = conv->ui_data;
	
	imcb_chat_free( gc );
}