Mercurial > pidgin
diff plugins/msn/msn.c @ 2024:b86f639ff99f
[gaim-migrate @ 2034]
wee, invites. now i just have to make it so you can go from convo to chat on your own.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sat, 16 Jun 2001 00:30:44 +0000 |
parents | 3ab2082d125f |
children | cb4fbcdae9eb |
line wrap: on
line diff
--- a/plugins/msn/msn.c Sat Jun 16 00:16:42 2001 +0000 +++ b/plugins/msn/msn.c Sat Jun 16 00:30:44 2001 +0000 @@ -340,7 +340,8 @@ g_free(ms->user); if (ms->txqueue) g_free(ms->txqueue); - ms->txqueue = NULL; + if (ms->chat) + serv_got_chat_left(gc, ms->chat->id); md->switches = g_slist_remove(md->switches, ms); @@ -1163,6 +1164,19 @@ serv_got_chat_in(gc, id, gc->username, 0, message, time(NULL)); } +static void msn_chat_invite(struct gaim_connection *gc, int id, char *msg, char *who) +{ + struct msn_switchboard *ms = msn_find_switch_by_id(gc, id); + char buf[MSN_BUF_LEN]; + + if (!ms) + return; + + g_snprintf(buf, sizeof(buf), "CAL %d %s\n", ++ms->trId, who); + if (msn_write(ms->fd, buf, strlen(buf)) < 0) + msn_kill_switch(ms); +} + static void msn_chat_leave(struct gaim_connection *gc, int id) { struct msn_switchboard *ms = msn_find_switch_by_id(gc, id); @@ -1396,6 +1410,7 @@ ret->add_buddy = msn_add_buddy; ret->remove_buddy = msn_rem_buddy; ret->chat_send = msn_chat_send; + ret->chat_invite = msn_chat_invite; ret->chat_leave = msn_chat_leave; ret->normalize = msn_normalize;