Mercurial > pidgin
changeset 27871:2075b5cb608e
merge of '7267766a0885d4724d8069fbe8b617a51cccf64c'
and '914921bfe0d4ed0711648940bd871a18809ea203'
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Mon, 10 Aug 2009 04:40:54 +0000 |
parents | ff365d26e997 (diff) f27425877d29 (current diff) |
children | 4a4e9d309fc0 |
files | |
diffstat | 3 files changed, 89 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/funniest_home_convos.txt Mon Aug 10 03:27:52 2009 +0000 +++ b/doc/funniest_home_convos.txt Mon Aug 10 04:40:54 2009 +0000 @@ -572,3 +572,42 @@ 15:46 <khc> well, there was a Grand Smiley Theme Database 15:47 <SimGuy> the GSTD sounds like a bad acronym 15:47 <khc> I realized after typing that + +-- + +(01:51:38 AM) user entered the room. +(01:52:46 AM) user: .addKeyActionListener(new KeyActionListener() onKeyPress() {if (event.geyKeyPresss().equals(Key.UP_ARROW) { inputbox.text = history.pop() }}}}}}}); +(01:52:51 AM) user: THERE, FOR **** SAKE +(01:52:53 AM) user: its 2009 +(01:53:06 AM) user: oh wait. ctrl up works +(01:53:07 AM) user: lol +(01:53:11 AM) user: yey me +(01:53:16 AM) user left the room. +(01:55:31 AM) darkrain42: Wow. +(01:58:15 AM) QuLogic: I think he failed to realize we'd have to re-write pidgin in java to do that +(01:59:44 AM) khc: history.pop() is clearly wrong too + +-- + +Some time later: +(02:41:55 AM) user entered the room. +(02:42:24 AM) user: didn't I read some idiot post, about 2 years ago, before pidgin was renamed / forked, over one dev refusing to make minimize on close? +(02:43:12 AM) QuLogic: I see you've learned to at least ask a question before jumping to random conclusions +(02:44:01 AM) user: QuLogic: :-)))))))))))))))))))))) +(02:44:12 AM) user: hey, I submitted a code patch! +(02:44:36 AM) user: now, anyway, what happened? why did I get the buddy list (empty) stealing focus, and why did it exit on close? +(02:44:40 AM) QuLogic: it's not really a patch if it's in the wrong language +(02:44:42 AM) user: I've had this argument before, in 2006 +(02:44:55 AM) user: QuLogic: simple, rewrite the rest ;-) +(02:44:58 AM) khc: pidgin never steals focus +(02:45:10 AM) khc: if it exit on close, it's because you didn't turn on the systray icon +(02:47:17 AM) user: khc - and that isn't default... why? anyway. I recall something on the matter, and I think this was the project (pre-fork?) or is this the unforked, renamed? I forget. +(02:47:42 AM) user: Whoever it was arguing about it (and font sizes I believe) was an idiot... not one of you I suppose, just making idle chit chat. +(02:47:43 AM) user: thanks +(02:47:48 AM) darkrain42: It is on by default. Some distros change that. +(02:48:00 AM) darkrain42: And I don't even know what you're arguing about at this point. +(02:48:11 AM) user: ... /leave - That command doesn't work on this protocol... /leave #pidgin ...That comm..... :-((( +(02:48:18 AM) user: darkrain42: now arguing, just remembering something +(02:48:27 AM) user left the room. +(02:49:04 AM) darkrain42: Wow. (again) +
--- a/libpurple/protocols/msn/msg.c Mon Aug 10 03:27:52 2009 +0000 +++ b/libpurple/protocols/msn/msg.c Mon Aug 10 04:40:54 2009 +0000 @@ -1102,6 +1102,7 @@ { GHashTable *body; const gchar *guid; + gboolean accepted = FALSE; g_return_if_fail(cmdproc != NULL); g_return_if_fail(msg != NULL); @@ -1129,6 +1130,9 @@ } else purple_debug_warning("msn", "Invite msg missing " "Application-GUID.\n"); + + accepted = TRUE; + } else if (!strcmp(guid, "{02D3C01F-BF30-4825-A83A-DE7AF41648AA}")) { purple_debug_info("msn", "Computer call\n"); @@ -1154,9 +1158,35 @@ g_free(buf); } } - } else - purple_debug_warning("msn", - "Unhandled invite msg with GUID %s.\n", guid); + } else { + const gchar *application = g_hash_table_lookup(body, "Application-Name"); + purple_debug_warning("msn", "Unhandled invite msg with GUID %s: %s.\n", + guid, application ? application : "(null)"); + } + + if (!accepted) { + const gchar *cookie = g_hash_table_lookup(body, "Invitation-Cookie"); + if (cookie) { + MsnSwitchBoard *swboard = cmdproc->data; + char *text; + MsnMessage *cancel; + + cancel = msn_message_new(MSN_MSG_TEXT); + msn_message_set_content_type(cancel, "text/x-msmsgsinvite"); + msn_message_set_charset(cancel, "UTF-8"); + msn_message_set_flag(cancel, 'U'); + + text = g_strdup_printf("Invitation-Command: CANCEL\r\n" + "Invitation-Cookie: %s\r\n" + "Cancel-Code: REJECT_NOT_INSTALLED\r\n", + cookie); + msn_message_set_bin_data(cancel, text, strlen(text)); + g_free(text); + + msn_switchboard_send_msg(swboard, cancel, TRUE); + msn_message_destroy(cancel); + } + } g_hash_table_destroy(body); }
--- a/libpurple/protocols/msn/slp.c Mon Aug 10 03:27:52 2009 +0000 +++ b/libpurple/protocols/msn/slp.c Mon Aug 10 04:40:54 2009 +0000 @@ -244,6 +244,8 @@ got_sessionreq(MsnSlpCall *slpcall, const char *branch, const char *euf_guid, const char *context) { + gboolean accepted = FALSE; + if (!strcmp(euf_guid, MSN_OBJ_GUID)) { /* Emoticon or UserDisplay */ @@ -314,7 +316,10 @@ msn_slpmsg_set_image(slpmsg, img); msn_slplink_queue_slpmsg(slplink, slpmsg); purple_imgstore_unref(img); + + accepted = TRUE; } + else if (!strcmp(euf_guid, MSN_FT_GUID)) { /* File Transfer */ @@ -360,6 +365,9 @@ purple_xfer_request(xfer); } + + accepted = TRUE; + } else if (!strcmp(euf_guid, MSN_CAM_REQUEST_GUID)) { purple_debug_info("msn", "Cam request.\n"); if (slpcall && slpcall->slplink && @@ -382,6 +390,7 @@ g_free(buf); } } + } else if (!strcmp(euf_guid, MSN_CAM_GUID)) { purple_debug_info("msn", "Cam invite.\n"); if (slpcall && slpcall->slplink && @@ -404,8 +413,16 @@ g_free(buf); } } + } else purple_debug_warning("msn", "SLP SessionReq with unknown EUF-GUID: %s\n", euf_guid); + + if (!accepted) { + char *content = g_strdup_printf("SessionID: %lu\r\n\r\n", + slpcall->session_id); + send_decline(slpcall, branch, "application/x-msnmsgr-sessionreqbody", content); + g_free(content); + } } void