comparison src/protocols/gg/gg.c @ 6622:a4622f1fb5a1

[gaim-migrate @ 7146] (10:10:23) Robot101: kills off OPT_CONN_* in favour of an enum, and deprecates all the IM_FLAGS_* except IM_FLAG_AWAY which is made into GAIM_IM_AUTO_RESP in a GaimImFlags enum. committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Mon, 25 Aug 2003 14:12:28 +0000
parents 8f94cce8faa5
children 156e6643f9db
comparison
equal deleted inserted replaced
6621:42fdf16f1dad 6622:a4622f1fb5a1
1 /* 1 /*
2 * gaim - Gadu-Gadu Protocol Plugin 2 * gaim - Gadu-Gadu Protocol Plugin
3 * $Id: gg.c 6876 2003-08-05 10:55:04Z chipx86 $ 3 * $Id: gg.c 7146 2003-08-25 14:12:28Z lschiere $
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
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, int flags) 563 static int agg_send_im(GaimConnection *gc, const char *who, const char *msg, int len, 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)) {
572 return -1; 572 return -1;
573 } 573 }
574 574
575 if (strlen(msg) > 0) { 575 if (strlen(msg) > 0) {
576 imsg = charset_convert(msg, "UTF-8", "CP1250"); 576 imsg = charset_convert(msg, "UTF-8", "CP1250");
577 if (gg_send_message(gd->sess, (flags & IM_FLAG_CHECKBOX) 577 if (gg_send_message(gd->sess, GG_CLASS_CHAT,
578 ? GG_CLASS_MSG : GG_CLASS_CHAT,
579 strtol(who, (char **)NULL, 10), imsg) < 0) 578 strtol(who, (char **)NULL, 10), imsg) < 0)
580 return -1; 579 return -1;
581 g_free(imsg); 580 g_free(imsg);
582 } 581 }
583 return 1; 582 return 1;