Use less brute force

This commit is contained in:
Alcaro 2018-04-27 00:35:04 +02:00
parent 3f0aa5231f
commit 2019bcf4e0
1 changed files with 2 additions and 6 deletions

View File

@ -247,12 +247,8 @@ struct groupchat *discord_chat_do_join(struct im_connection *ic,
static void discord_chat_leave(struct groupchat *gc)
{
channel_info *cinfo = gc->data;
server_info *sinfo = cinfo->to.channel.sinfo;
discord_data *dd = sinfo->ic->proto_data;
sinfo->channels = g_slist_remove(sinfo->channels, cinfo);
dd->pchannels = g_slist_remove(dd->pchannels, cinfo);
free_channel_info(cinfo);
imcb_chat_free(cinfo->to.channel.gc);
cinfo->to.channel.gc = NULL;
}
static int discord_buddy_msg(struct im_connection *ic, char *to, char *msg,