Mercurial > pidgin
comparison 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 |
comparison
equal
deleted
inserted
replaced
2023:3ab2082d125f | 2024:b86f639ff99f |
---|---|
338 g_free(ms->auth); | 338 g_free(ms->auth); |
339 if (ms->user) | 339 if (ms->user) |
340 g_free(ms->user); | 340 g_free(ms->user); |
341 if (ms->txqueue) | 341 if (ms->txqueue) |
342 g_free(ms->txqueue); | 342 g_free(ms->txqueue); |
343 ms->txqueue = NULL; | 343 if (ms->chat) |
344 serv_got_chat_left(gc, ms->chat->id); | |
344 | 345 |
345 md->switches = g_slist_remove(md->switches, ms); | 346 md->switches = g_slist_remove(md->switches, ms); |
346 | 347 |
347 g_free(ms); | 348 g_free(ms); |
348 } | 349 } |
1161 msn_kill_switch(ms); | 1162 msn_kill_switch(ms); |
1162 debug_printf("\n"); | 1163 debug_printf("\n"); |
1163 serv_got_chat_in(gc, id, gc->username, 0, message, time(NULL)); | 1164 serv_got_chat_in(gc, id, gc->username, 0, message, time(NULL)); |
1164 } | 1165 } |
1165 | 1166 |
1167 static void msn_chat_invite(struct gaim_connection *gc, int id, char *msg, char *who) | |
1168 { | |
1169 struct msn_switchboard *ms = msn_find_switch_by_id(gc, id); | |
1170 char buf[MSN_BUF_LEN]; | |
1171 | |
1172 if (!ms) | |
1173 return; | |
1174 | |
1175 g_snprintf(buf, sizeof(buf), "CAL %d %s\n", ++ms->trId, who); | |
1176 if (msn_write(ms->fd, buf, strlen(buf)) < 0) | |
1177 msn_kill_switch(ms); | |
1178 } | |
1179 | |
1166 static void msn_chat_leave(struct gaim_connection *gc, int id) | 1180 static void msn_chat_leave(struct gaim_connection *gc, int id) |
1167 { | 1181 { |
1168 struct msn_switchboard *ms = msn_find_switch_by_id(gc, id); | 1182 struct msn_switchboard *ms = msn_find_switch_by_id(gc, id); |
1169 char buf[MSN_BUF_LEN]; | 1183 char buf[MSN_BUF_LEN]; |
1170 | 1184 |
1394 ret->set_away = msn_set_away; | 1408 ret->set_away = msn_set_away; |
1395 ret->set_idle = msn_set_idle; | 1409 ret->set_idle = msn_set_idle; |
1396 ret->add_buddy = msn_add_buddy; | 1410 ret->add_buddy = msn_add_buddy; |
1397 ret->remove_buddy = msn_rem_buddy; | 1411 ret->remove_buddy = msn_rem_buddy; |
1398 ret->chat_send = msn_chat_send; | 1412 ret->chat_send = msn_chat_send; |
1413 ret->chat_invite = msn_chat_invite; | |
1399 ret->chat_leave = msn_chat_leave; | 1414 ret->chat_leave = msn_chat_leave; |
1400 ret->normalize = msn_normalize; | 1415 ret->normalize = msn_normalize; |
1401 | 1416 |
1402 my_protocol = ret; | 1417 my_protocol = ret; |
1403 } | 1418 } |