comparison src/protocols/msn/msn.c @ 3001:87fff45fa36b

[gaim-migrate @ 3014] Improved typing notification for Yahoo so that it sends and recieves notification that the user has stopped typing. Also, combined serv_send_typing and serv_send_typing_stopped... expect the same with serv_got_typing_stopped. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Mon, 04 Mar 2002 04:18:02 +0000
parents 7239a392486c
children 08327a2f25aa
comparison
equal deleted inserted replaced
3000:6d95285533df 3001:87fff45fa36b
1482 g_slist_free(md->permit); 1482 g_slist_free(md->permit);
1483 g_slist_free(md->deny); 1483 g_slist_free(md->deny);
1484 g_free(md); 1484 g_free(md);
1485 } 1485 }
1486 1486
1487 static int msn_send_typing(struct gaim_connection *gc, char *who) { 1487 static int msn_send_typing(struct gaim_connection *gc, char *who, int typing) {
1488 struct msn_switchboard *ms = msn_find_switch(gc, who); 1488 struct msn_switchboard *ms = msn_find_switch(gc, who);
1489 char header[MSN_BUF_LEN] = "MIME-Version: 1.0\r\n" 1489 char header[MSN_BUF_LEN] = "MIME-Version: 1.0\r\n"
1490 "Content-Type: text/x-msmsgscontrol\r\n" 1490 "Content-Type: text/x-msmsgscontrol\r\n"
1491 "User-Agent: Gaim/" VERSION "\r\n" 1491 "User-Agent: Gaim/" VERSION "\r\n"
1492 "TypingUser: "; 1492 "TypingUser: ";
1493 char buf [MSN_BUF_LEN]; 1493 char buf [MSN_BUF_LEN];
1494 if (!ms) 1494 if (!ms || !typing)
1495 return; 1495 return 0;
1496 g_snprintf(buf, sizeof(buf), "MSG %d N %d\r\n%s%s\r\n\r\n\r\n", 1496 g_snprintf(buf, sizeof(buf), "MSG %d N %d\r\n%s%s\r\n\r\n\r\n",
1497 ++ms->trId, 1497 ++ms->trId,
1498 strlen(header) + strlen("\r\n\r\n\r\n") + strlen(gc->username), 1498 strlen(header) + strlen("\r\n\r\n\r\n") + strlen(gc->username),
1499 header, gc->username); 1499 header, gc->username);
1500 if (msn_write(ms->fd, buf, strlen(buf)) < 0) 1500 if (msn_write(ms->fd, buf, strlen(buf)) < 0)