comparison src/protocols/gg/gg.c @ 6982:083d1e4a9c78

[gaim-migrate @ 7538] This is Mr. Holland's Opus. And by Mr. Holland I mean Robot101. He rewrote the coreish IM image support so that the binary data gets ripped out in the prpl and put in an imgstore instead of just being passed in the same huge as char string as the actual message. This is good because it's prpl agnostic, or something. It also means we don't have a silly length of "-1" with pretty much every send or receive IM function. It should be crash free, bug free, and memleak free, but additional testing is always a good thing. If you like good stuff then you'll love this patch. But don't take my word for it--ba dun dunt! committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 27 Sep 2003 19:17:21 +0000
parents faa491042c66
children 86ed8b2aa665
comparison
equal deleted inserted replaced
6981:abd3c684da31 6982:083d1e4a9c78
1 /* 1 /*
2 * gaim - Gadu-Gadu Protocol Plugin 2 * gaim - Gadu-Gadu Protocol Plugin
3 * $Id: gg.c 7326 2003-09-07 23:47:00Z chipx86 $ 3 * $Id: gg.c 7538 2003-09-27 19:17:21Z thekingant $
4 * 4 *
5 * Copyright (C) 2001 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL> 5 * Copyright (C) 2001 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL>
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
313 if (!allowed_uin(gc, user)) 313 if (!allowed_uin(gc, user))
314 break; 314 break;
315 imsg = charset_convert(e->event.msg.message, "CP1250", "UTF-8"); 315 imsg = charset_convert(e->event.msg.message, "CP1250", "UTF-8");
316 strip_linefeed(imsg); 316 strip_linefeed(imsg);
317 /* e->event.msg.time - we don't know what this time is for */ 317 /* e->event.msg.time - we don't know what this time is for */
318 serv_got_im(gc, user, imsg, 0, time(NULL), -1); 318 serv_got_im(gc, user, imsg, 0, time(NULL));
319 g_free(imsg); 319 g_free(imsg);
320 } 320 }
321 break; 321 break;
322 case GG_EVENT_NOTIFY: 322 case GG_EVENT_NOTIFY:
323 { 323 {
558 gd->own_status = GG_STATUS_NOT_AVAIL; 558 gd->own_status = GG_STATUS_NOT_AVAIL;
559 gg_free_session(gd->sess); 559 gg_free_session(gd->sess);
560 g_free(gc->proto_data); 560 g_free(gc->proto_data);
561 } 561 }
562 562
563 static int agg_send_im(GaimConnection *gc, const char *who, const char *msg, int len, GaimImFlags flags) 563 static int agg_send_im(GaimConnection *gc, const char *who, const char *msg, GaimImFlags flags)
564 { 564 {
565 struct agg_data *gd = (struct agg_data *)gc->proto_data; 565 struct agg_data *gd = (struct agg_data *)gc->proto_data;
566 gchar *imsg; 566 gchar *imsg;
567 567
568 if (invalid_uin(who)) { 568 if (invalid_uin(who)) {