Mercurial > pidgin.yaz
comparison src/protocols/msn/msn.c @ 10274:3016b1b32339
[gaim-migrate @ 11424]
Don't allow sending oversized messages on MSN - they wouldn't get there, and
the switchboard server would disconnect us. Also fix up the oversized message
truncation which should have been truncating the messages anyway.
Add support for sending strikethrough on MSN (not that anyone can actually
enter strikethrough tags yet)
And a slight change to the building of chat user status icons.
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sat, 27 Nov 2004 19:39:25 +0000 |
parents | ecf3ce2e2ab1 |
children | d9468bd22b7c |
comparison
equal
deleted
inserted
replaced
10273:891141c68573 | 10274:3016b1b32339 |
---|---|
733 | 733 |
734 session = gc->proto_data; | 734 session = gc->proto_data; |
735 swboard = msn_session_get_swboard(session, who); | 735 swboard = msn_session_get_swboard(session, who); |
736 | 736 |
737 msn_import_html(message, &msgformat, &msgtext); | 737 msn_import_html(message, &msgformat, &msgtext); |
738 | |
739 if (strlen(msgtext) + strlen(msgformat) + strlen(VERSION) > 1564) | |
740 { | |
741 g_free(msgformat); | |
742 g_free(msgtext); | |
743 | |
744 return -E2BIG; | |
745 } | |
746 | |
738 msg = msn_message_new_plain(msgtext); | 747 msg = msn_message_new_plain(msgtext); |
739 msn_message_set_attr(msg, "X-MMS-IM-Format", msgformat); | 748 msn_message_set_attr(msg, "X-MMS-IM-Format", msgformat); |
740 | 749 |
741 g_free(msgformat); | 750 g_free(msgformat); |
742 g_free(msgtext); | 751 g_free(msgtext); |
1127 return -EINVAL; | 1136 return -EINVAL; |
1128 | 1137 |
1129 if (swboard->ready) | 1138 if (swboard->ready) |
1130 { | 1139 { |
1131 msn_import_html(message, &msgformat, &msgtext); | 1140 msn_import_html(message, &msgformat, &msgtext); |
1141 | |
1142 if (strlen(msgtext) + strlen(msgformat) + strlen(VERSION) > 1564) | |
1143 { | |
1144 g_free(msgformat); | |
1145 g_free(msgtext); | |
1146 | |
1147 return -E2BIG; | |
1148 } | |
1132 | 1149 |
1133 msg = msn_message_new_plain(msgtext); | 1150 msg = msn_message_new_plain(msgtext); |
1134 msn_message_set_attr(msg, "X-MMS-IM-Format", msgformat); | 1151 msn_message_set_attr(msg, "X-MMS-IM-Format", msgformat); |
1135 msn_switchboard_send_msg(swboard, msg); | 1152 msn_switchboard_send_msg(swboard, msg); |
1136 msn_message_destroy(msg); | 1153 msn_message_destroy(msg); |