# HG changeset patch # User Eric Warmenhoven # Date 1003059396 0 # Node ID 227cc42ffa6e600817ccd843665cfd630fa2eb1d # Parent 1697ecbf1bcc63ff7ac950a1803d9ecb95cc9701 [gaim-migrate @ 2514] i should have hidden something ultra-secret in this. committer: Tailor Script diff -r 1697ecbf1bcc -r 227cc42ffa6e pixmaps/Makefile.am --- a/pixmaps/Makefile.am Sun Oct 14 05:52:36 2001 +0000 +++ b/pixmaps/Makefile.am Sun Oct 14 11:36:36 2001 +0000 @@ -49,6 +49,7 @@ gnomeicu-ffc.xpm \ gnomeicu-na.xpm \ gnomeicu-occ.xpm \ + gnomeicu-offline.xpm \ gnomeicu-online.xpm \ group.xpm \ import_small.xpm \ diff -r 1697ecbf1bcc -r 227cc42ffa6e pixmaps/gnomeicu-offline.xpm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pixmaps/gnomeicu-offline.xpm Sun Oct 14 11:36:36 2001 +0000 @@ -0,0 +1,40 @@ +/* XPM */ +static char *icon_offline_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 18 1", +" c black", +". c #3d4e53", +"X c #3f5156", +"o c #4c4c4c", +"O c #425357", +"+ c #43555a", +"@ c #45585e", +"# c #475b61", +"$ c #485d63", +"% c #4b6066", +"& c #4e636a", +"* c #50676d", +"= c #51686e", +"- c #556d74", +"; c #59737a", +": c #7e7e7e", +"> c #8b8b8b", +", c None", +/* pixels */ +",,,,,,,,,,,,,,,,", +",,,,,,,,,,,,,,,,", +",,>>>>>>>>>>>:,,", +",,>$&&&%#@@+X:o,", +",,>$;;;--&#+X:o,", +",,>-;;;;;-#+X:o,", +",,>*;;;-;&$+X:o,", +",,>#*--=&##+X:o,", +",,>$&$&*&##+O:o,", +",,>O$$@.@...X:o,", +",,::::::::::::o,", +",,,ooo>:::ooooo,", +",,,,,,>:::o,,,,,", +",,,,>:::::::o,,,", +",,,,,,,,,,,,,,,,", +",,,,,,,,,,,,,,,," +}; diff -r 1697ecbf1bcc -r 227cc42ffa6e src/away.c --- a/src/away.c Sun Oct 14 05:52:36 2001 +0000 +++ b/src/away.c Sun Oct 14 11:36:36 2001 +0000 @@ -383,7 +383,7 @@ con = g_slist_next(con); } - tmp = msgs = (*gc->prpl->away_states)(); + tmp = msgs = (*gc->prpl->away_states)(gc); if ((g_list_length(msgs) == 1) && !strcmp(msgs->data, GAIM_AWAY_CUSTOM)) { awy = away_messages; @@ -459,7 +459,7 @@ gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), submenu); gtk_widget_show(submenu); - tmp = msgs = (*gc->prpl->away_states)(); + tmp = msgs = (*gc->prpl->away_states)(gc); if ((g_list_length(msgs) == 1) && (!strcmp(msgs->data, GAIM_AWAY_CUSTOM))) { diff -r 1697ecbf1bcc -r 227cc42ffa6e src/core.h --- a/src/core.h Sun Oct 14 05:52:36 2001 +0000 +++ b/src/core.h Sun Oct 14 11:36:36 2001 +0000 @@ -35,11 +35,8 @@ #include "multi.h" -#define UC_AOL 1 -#define UC_ADMIN 2 -#define UC_UNCONFIRMED 4 -#define UC_NORMAL 8 -#define UC_UNAVAILABLE 16 +/* Really user states are controlled by the PRPLs now. We just use this for event_away */ +#define UC_UNAVAILABLE 1 struct aim_user { char username[64]; diff -r 1697ecbf1bcc -r 227cc42ffa6e src/protocols/gg/gg.c --- a/src/protocols/gg/gg.c Sun Oct 14 05:52:36 2001 +0000 +++ b/src/protocols/gg/gg.c Sun Oct 14 11:36:36 2001 +0000 @@ -1,6 +1,6 @@ /* * gaim - Gadu-Gadu Protocol Plugin - * $Id: gg.c 2436 2001-10-04 05:45:18Z warmenhoven $ + * $Id: gg.c 2514 2001-10-14 11:36:36Z warmenhoven $ * * Copyright (C) 2001, Arkadiusz Mi¶kiewicz * @@ -70,6 +70,8 @@ #define AGG_STATUS_INVISIBLE_FRIENDS _("Invisible for friends only") #define AGG_STATUS_NOT_AVAIL _("Unavailable") +#define UC_NORMAL 2 + struct agg_data { struct gg_session *sess; }; @@ -299,7 +301,7 @@ } } -static GList *agg_away_states() +static GList *agg_away_states(struct gaim_connection *gc) { GList *m = NULL; diff -r 1697ecbf1bcc -r 227cc42ffa6e src/protocols/icq/gaim_icq.c --- a/src/protocols/icq/gaim_icq.c Sun Oct 14 05:52:36 2001 +0000 +++ b/src/protocols/icq/gaim_icq.c Sun Oct 14 11:36:36 2001 +0000 @@ -133,7 +133,7 @@ char buf[256]; g_snprintf(buf, sizeof buf, "%lu", uin); - status = (st == STATUS_ONLINE) ? UC_NORMAL : UC_UNAVAILABLE | (st << 5); + status = (st == STATUS_ONLINE) ? 0 : UC_UNAVAILABLE | (st << 1); serv_got_update(gc, buf, 1, 0, 0, 0, status, 0); } @@ -149,7 +149,7 @@ char buf[256]; g_snprintf(buf, sizeof buf, "%lu", uin); - status = (st == STATUS_ONLINE) ? UC_NORMAL : UC_UNAVAILABLE | (st << 5); + status = (st == STATUS_ONLINE) ? 0 : UC_UNAVAILABLE | (st << 1); serv_got_update(gc, buf, 1, 0, 0, 0, status, 0); } @@ -400,9 +400,9 @@ static char **icq_list_icon(int uc) { guint status; - if (uc == UC_NORMAL) + if (uc == 0) return icon_online_xpm; - status = uc >> 5; + status = uc >> 1; if (status & STATUS_NA) return icon_na_xpm; if (status & STATUS_DND) @@ -453,7 +453,7 @@ return m; } -static GList *icq_away_states() { +static GList *icq_away_states(struct gaim_connection *gc) { GList *m = NULL; m = g_list_append(m, "Online"); diff -r 1697ecbf1bcc -r 227cc42ffa6e src/protocols/irc/irc.c --- a/src/protocols/irc/irc.c Sun Oct 14 05:52:36 2001 +0000 +++ b/src/protocols/irc/irc.c Sun Oct 14 11:36:36 2001 +0000 @@ -1309,7 +1309,7 @@ return 0; } -static GList *irc_away_states() +static GList *irc_away_states(struct gaim_connection *gc) { return g_list_append(NULL, GAIM_AWAY_CUSTOM); } diff -r 1697ecbf1bcc -r 227cc42ffa6e src/protocols/jabber/jabber.c --- a/src/protocols/jabber/jabber.c Sun Oct 14 05:52:36 2001 +0000 +++ b/src/protocols/jabber/jabber.c Sun Oct 14 11:36:36 2001 +0000 @@ -65,10 +65,10 @@ #define IQ_AUTH 0 #define IQ_ROSTER 1 -#define UC_AWAY 0x38 -#define UC_CHAT 0x48 -#define UC_XA 0x98 -#define UC_DND 0x118 +#define UC_AWAY (0x02 | UC_UNAVAILABLE) +#define UC_CHAT 0x04 +#define UC_XA (0x08 | UC_UNAVAILABLE) +#define UC_DND (0x10 | UC_UNAVAILABLE) #define DEFAULT_SERVER "jabber.org" #define DEFAULT_GROUPCHAT "conference.jabber.org" @@ -700,7 +700,7 @@ char *buddy; xmlnode y; char *show; - int state = UC_NORMAL; + int state = 0; GSList *resources; char *res; struct conversation *cnv = NULL; @@ -713,7 +713,7 @@ if ((y = xmlnode_get_tag(p->x, "show"))) { show = xmlnode_get_data(y); if (!show) { - state = UC_NORMAL; + state = 0; } else if (!strcasecmp(show, "away")) { state = UC_AWAY; } else if (!strcasecmp(show, "chat")) { @@ -724,7 +724,7 @@ state = UC_DND; } } else { - state = UC_NORMAL; + state = 0; } who = jid_new(j->p, from); @@ -1647,7 +1647,7 @@ return m; } -static GList *jabber_away_states() { +static GList *jabber_away_states(struct gaim_connection *gc) { GList *m = NULL; m = g_list_append(m, "Online"); diff -r 1697ecbf1bcc -r 227cc42ffa6e src/protocols/msn/msn.c --- a/src/protocols/msn/msn.c Sun Oct 14 05:52:36 2001 +0000 +++ b/src/protocols/msn/msn.c Sun Oct 14 11:36:36 2001 +0000 @@ -688,7 +688,7 @@ } else if (!g_strncasecmp(buf, "INF", 3)) { } else if (!g_strncasecmp(buf, "ILN", 3)) { char *state, *user, *tmp = buf; - int status = UC_NORMAL; + int status = 0; GET_NEXT(tmp); @@ -701,17 +701,17 @@ GET_NEXT(tmp); if (!g_strcasecmp(state, "BSY")) { - status |= (MSN_BUSY << 5); + status |= UC_UNAVAILABLE | (MSN_BUSY << 1); } else if (!g_strcasecmp(state, "IDL")) { - status |= (MSN_IDLE << 5); + status |= UC_UNAVAILABLE | (MSN_IDLE << 1); } else if (!g_strcasecmp(state, "BRB")) { - status |= (MSN_BRB << 5); + status |= UC_UNAVAILABLE | (MSN_BRB << 1); } else if (!g_strcasecmp(state, "AWY")) { - status = UC_UNAVAILABLE; + status |= UC_UNAVAILABLE | (MSN_AWAY << 1); } else if (!g_strcasecmp(state, "PHN")) { - status |= (MSN_PHONE << 5); + status |= UC_UNAVAILABLE | (MSN_PHONE << 1); } else if (!g_strcasecmp(state, "LUN")) { - status |= (MSN_LUNCH << 5); + status |= UC_UNAVAILABLE | (MSN_LUNCH << 1); } serv_got_update(gc, user, 1, 0, 0, 0, status, 0); @@ -804,7 +804,7 @@ g_free(msg); } else if (!g_strncasecmp(buf, "NLN", 3)) { char *state, *user, *tmp = buf; - int status = UC_NORMAL; + int status = 0; GET_NEXT(tmp); state = tmp; @@ -815,17 +815,17 @@ GET_NEXT(tmp); if (!g_strcasecmp(state, "BSY")) { - status |= (MSN_BUSY << 5); + status |= UC_UNAVAILABLE | (MSN_BUSY << 1); } else if (!g_strcasecmp(state, "IDL")) { - status |= (MSN_IDLE << 5); + status |= UC_UNAVAILABLE | (MSN_IDLE << 1); } else if (!g_strcasecmp(state, "BRB")) { - status |= (MSN_BRB << 5); + status |= UC_UNAVAILABLE | (MSN_BRB << 1); } else if (!g_strcasecmp(state, "AWY")) { - status = UC_UNAVAILABLE; + status |= UC_UNAVAILABLE | (MSN_AWAY << 1); } else if (!g_strcasecmp(state, "PHN")) { - status |= (MSN_PHONE << 5); + status |= UC_UNAVAILABLE | (MSN_PHONE << 1); } else if (!g_strcasecmp(state, "LUN")) { - status |= (MSN_LUNCH << 5); + status |= UC_UNAVAILABLE | (MSN_LUNCH << 1); } serv_got_update(gc, user, 1, 0, 0, 0, status, 0); @@ -1261,7 +1261,7 @@ msn_kill_switch(ms); } -static GList *msn_away_states() +static GList *msn_away_states(struct gaim_connection *gc) { GList *m = NULL; @@ -1339,7 +1339,7 @@ static char **msn_list_icon(int uc) { - if (uc == UC_NORMAL) + if (uc == 0) return msn_online_xpm; return msn_away_xpm; @@ -1372,11 +1372,11 @@ struct buddy *b = find_buddy(gc, who); static char buf[MSN_BUF_LEN]; - if (!b || !(b->uc >> 5)) + if (!b || !(b->uc >> 1)) return m; pbm = g_new0(struct proto_buddy_menu, 1); - g_snprintf(buf, sizeof(buf), "Status: %s", msn_get_away_text(b->uc >> 5)); + g_snprintf(buf, sizeof(buf), "Status: %s", msn_get_away_text(b->uc >> 1)); pbm->label = buf; pbm->callback = NULL; pbm->gc = gc; diff -r 1697ecbf1bcc -r 227cc42ffa6e src/protocols/oscar/misc.c --- a/src/protocols/oscar/misc.c Sun Oct 14 05:52:36 2001 +0000 +++ b/src/protocols/oscar/misc.c Sun Oct 14 11:36:36 2001 +0000 @@ -651,7 +651,7 @@ data = 0x00030000 | status; /* yay for error checking ;^) */ - if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10 + 4))) + if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10 + 8))) return -ENOMEM; snacid = aim_cachesnac(sess, 0x0001, 0x001e, 0x0000, NULL, 0); diff -r 1697ecbf1bcc -r 227cc42ffa6e src/protocols/oscar/oscar.c --- a/src/protocols/oscar/oscar.c Sun Oct 14 05:52:36 2001 +0000 +++ b/src/protocols/oscar/oscar.c Sun Oct 14 11:36:36 2001 +0000 @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -42,7 +43,6 @@ #include "aim.h" #include "proxy.h" -/*#include "pixmaps/cancel.xpm"*/ #include "pixmaps/ab.xpm" #include "pixmaps/admin_icon.xpm" #include "pixmaps/aol_icon.xpm" @@ -50,11 +50,31 @@ #include "pixmaps/dt_icon.xpm" #include "pixmaps/free_icon.xpm" +#include "pixmaps/gnomeicu-online.xpm" +#include "pixmaps/gnomeicu-offline.xpm" +#include "pixmaps/gnomeicu-away.xpm" +#include "pixmaps/gnomeicu-dnd.xpm" +#include "pixmaps/gnomeicu-na.xpm" +#include "pixmaps/gnomeicu-occ.xpm" +#include "pixmaps/gnomeicu-ffc.xpm" + /* constants to identify proto_opts */ #define USEROPT_AUTH 0 #define USEROPT_AUTHPORT 1 -#define UC_AB 32 +#define UC_AOL 0x02 +#define UC_ADMIN 0x04 +#define UC_UNCONFIRMED 0x08 +#define UC_NORMAL 0x10 +#define UC_AB 0x20 + +#define ICQ_ONLINE 0x0000 +#define ICQ_AWAY 0x0001 +#define ICQ_DND 0x0002 +#define ICQ_NA 0x0004 +#define ICQ_OCCUPIED 0x0010 +#define ICQ_CHAT 0x0020 +#define ICQ_INVISIBLE 0x0100 #define AIMHASHDATA "http://gaim.sourceforge.net/aim_data.php3" @@ -83,7 +103,8 @@ GSList *direct_ims; GSList *hasicons; - gboolean killme; + gboolean killme; + gboolean icq; }; struct chat_connection { @@ -427,6 +448,8 @@ odata->create_exchange = 0; debug_printf(_("Logging in %s\n"), user->username); + if (isdigit(*user->username)) + odata->icq = TRUE; sess = g_new0(aim_session_t, 1); @@ -1125,6 +1148,7 @@ time_t time_idle; int type = 0; struct gaim_connection *gc = sess->aux_data; + struct oscar_data *od = gc->proto_data; char *tmp; va_list ap; @@ -1132,18 +1156,27 @@ info = va_arg(ap, aim_userinfo_t *); va_end(ap); - if (info->flags & AIM_FLAG_ACTIVEBUDDY) - type |= UC_AB; - if (info->flags & AIM_FLAG_UNCONFIRMED) - type |= UC_UNCONFIRMED; - if (info->flags & AIM_FLAG_ADMINISTRATOR) - type |= UC_ADMIN; - if (info->flags & AIM_FLAG_AOL) - type |= UC_AOL; - if (info->flags & AIM_FLAG_FREE) - type |= UC_NORMAL; - if (info->flags & AIM_FLAG_AWAY) - type |= UC_UNAVAILABLE; + if (!od->icq) { + if (info->flags & AIM_FLAG_ACTIVEBUDDY) + type |= UC_AB; + if (info->flags & AIM_FLAG_UNCONFIRMED) + type |= UC_UNCONFIRMED; + if (info->flags & AIM_FLAG_ADMINISTRATOR) + type |= UC_ADMIN; + if (info->flags & AIM_FLAG_AOL) + type |= UC_AOL; + if (info->flags & AIM_FLAG_FREE) + type |= UC_NORMAL; + if (info->flags & AIM_FLAG_AWAY) + type |= UC_UNAVAILABLE; + } else { + if (info->icqinfo.status) { + type = (info->icqinfo.status << 6); + if (!(info->icqinfo.status & ICQ_CHAT)) + type |= UC_UNAVAILABLE; + } + debug_printf("icq status: %d\n", info->icqinfo.status); + } if (info->idletime) { time(&time_idle); @@ -2180,21 +2213,55 @@ aim_bos_setprofile(odata->sess, odata->conn, inforeal, g->away ? NULL : "", gaim_caps); } -static void oscar_set_away(struct gaim_connection *g, char *state, char *message) { - struct oscar_data *odata = (struct oscar_data *)g->proto_data; - char info[1025], away[1025]; - g_snprintf(info, sizeof(info), "%s", g->user->user_info); - if (message) - g_snprintf(away, sizeof(away), "%s", message); - aim_bos_setprofile(odata->sess, odata->conn, NULL, message ? away : "", gaim_caps); - if (g->away) - g_free (g->away); - g->away = NULL; - if (message) { - if (strlen(message) > 1024) - do_error_dialog("Maximum away length (1024) exceeded, truncating", - "Info Too Long"); - g->away = g_strdup (message); +static void oscar_set_away(struct gaim_connection *gc, char *state, char *message) { + struct oscar_data *od = (struct oscar_data *)gc->proto_data; + char away[1025]; + if (!od->icq) { + if (message) + g_snprintf(away, sizeof(away), "%s", message); + aim_bos_setprofile(od->sess, od->conn, NULL, message ? away : "", gaim_caps); + if (gc->away) + g_free (gc->away); + gc->away = NULL; + if (message) { + if (strlen(message) > 1024) + do_error_dialog("Maximum away length (1024) exceeded, truncating", + "Info Too Long"); + gc->away = g_strdup (message); + } + return; + } + + if (gc->away) + gc->away = NULL; + + if (!strcmp(state, "Online")) + aim_icq_setstatus(od->sess, od->conn, ICQ_ONLINE); + else if (!strcmp(state, "Away")) { + aim_icq_setstatus(od->sess, od->conn, ICQ_AWAY); + gc->away = ""; + } else if (!strcmp(state, "Do Not Disturb")) { + aim_icq_setstatus(od->sess, od->conn, ICQ_DND); + gc->away = ""; + } else if (!strcmp(state, "Not Available")) { + aim_icq_setstatus(od->sess, od->conn, ICQ_NA); + gc->away = ""; + } else if (!strcmp(state, "Occupied")) { + aim_icq_setstatus(od->sess, od->conn, ICQ_OCCUPIED); + gc->away = ""; + } else if (!strcmp(state, "Free For Chat")) { + aim_icq_setstatus(od->sess, od->conn, ICQ_CHAT); + gc->away = ""; + } else if (!strcmp(state, "Invisible")) { + aim_icq_setstatus(od->sess, od->conn, ICQ_INVISIBLE); + gc->away = ""; + } else if (!strcmp(state, GAIM_AWAY_CUSTOM)) { + if (message) { + aim_icq_setstatus(od->sess, od->conn, ICQ_NA); + gc->away = ""; + } else { + aim_icq_setstatus(od->sess, od->conn, ICQ_ONLINE); + } } } @@ -2384,6 +2451,24 @@ } static char **oscar_list_icon(int uc) { + if (uc == 0) + return (char **)icon_online_xpm; + if (uc & 0x7fc0) { + uc >>= 6; + if (uc & ICQ_AWAY) + return icon_away_xpm; + if (uc & ICQ_DND) + return icon_dnd_xpm; + if (uc & ICQ_NA) + return icon_na_xpm; + if (uc & ICQ_OCCUPIED) + return icon_occ_xpm; + if (uc & ICQ_CHAT) + return icon_ffc_xpm; + if (uc & ICQ_INVISIBLE) + return icon_offline_xpm; + return icon_online_xpm; + } if (uc & UC_AB) return (char **)ab_xpm; if (uc & UC_UNAVAILABLE) @@ -2623,9 +2708,23 @@ oscar_set_permit_deny(gc); } -static GList *oscar_away_states() +static GList *oscar_away_states(struct gaim_connection *gc) { - return g_list_append(NULL, GAIM_AWAY_CUSTOM); + struct oscar_data *od = gc->proto_data; + GList *m = NULL; + + if (!od->icq) + return g_list_append(m, GAIM_AWAY_CUSTOM); + + m = g_list_append(m, "Online"); + m = g_list_append(m, "Away"); + m = g_list_append(m, "Do Not Disturb"); + m = g_list_append(m, "Not Available"); + m = g_list_append(m, "Occupied"); + m = g_list_append(m, "Free For Chat"); + m = g_list_append(m, "Invisible"); + + return m; } static void oscar_do_action(struct gaim_connection *gc, char *act) diff -r 1697ecbf1bcc -r 227cc42ffa6e src/protocols/toc/toc.c --- a/src/protocols/toc/toc.c Sun Oct 14 05:52:36 2001 +0000 +++ b/src/protocols/toc/toc.c Sun Oct 14 11:36:36 2001 +0000 @@ -79,6 +79,11 @@ #define FILE_GET_UID "09461348-4C7F-11D1-8222-444553540000" #define GAMES_UID "0946134a-4C7F-11D1-8222-444553540000" +#define UC_AOL 0x02 +#define UC_ADMIN 0x04 +#define UC_UNCONFIRMED 0x08 +#define UC_NORMAL 0x10 + struct ft_request { struct gaim_connection *gc; char *user; @@ -1321,7 +1326,7 @@ toc_set_permit_deny(gc); } -static GList *toc_away_states() +static GList *toc_away_states(struct gaim_connection *gc) { return g_list_append(NULL, GAIM_AWAY_CUSTOM); } diff -r 1697ecbf1bcc -r 227cc42ffa6e src/protocols/yahoo/yay.c --- a/src/protocols/yahoo/yay.c Sun Oct 14 05:52:36 2001 +0000 +++ b/src/protocols/yahoo/yay.c Sun Oct 14 11:36:36 2001 +0000 @@ -107,14 +107,12 @@ serv_got_update(gc, b->name, 0, 0, 0, 0, 0, 0); else { if (status == YAHOO_STATUS_AVAILABLE) - serv_got_update(gc, b->name, 1, 0, 0, 0, UC_NORMAL, 0); + serv_got_update(gc, b->name, 1, 0, 0, 0, 0, 0); else if (status == YAHOO_STATUS_IDLE) { time(&tmptime); - serv_got_update(gc, b->name, 1, 0, 0, tmptime - 600, - (status << 5) | UC_NORMAL, 0); + serv_got_update(gc, b->name, 1, 0, 0, tmptime - 600, (status << 1), 0); } else - serv_got_update(gc, b->name, 1, 0, 0, 0, - (status << 5) | UC_UNAVAILABLE, 0); + serv_got_update(gc, b->name, 1, 0, 0, 0, (status << 1) | UC_UNAVAILABLE, 0); if (status == YAHOO_STATUS_CUSTOM) { gpointer val = g_hash_table_lookup(yd->hash, b->name); if (val) @@ -545,9 +543,9 @@ } static char **yahoo_list_icon(int uc) { - if ((uc >> 5) == YAHOO_STATUS_IDLE) + if ((uc >> 1) == YAHOO_STATUS_IDLE) return status_idle_xpm; - else if (uc == UC_NORMAL) + else if (uc == 0) return status_here_xpm; return status_away_xpm; } @@ -585,12 +583,12 @@ segfault and get the bug report. */ static char buf[1024]; - if (b->uc & UC_NORMAL) + if (!(b->uc & UC_UNAVAILABLE)) return NULL; pbm = g_new0(struct proto_buddy_menu, 1); - if ((b->uc >> 5) != YAHOO_STATUS_CUSTOM) - g_snprintf(buf, sizeof buf, "Status: %s", yahoo_get_status_string(b->uc >> 5)); + if ((b->uc >> 1) != YAHOO_STATUS_CUSTOM) + g_snprintf(buf, sizeof buf, "Status: %s", yahoo_get_status_string(b->uc >> 1)); else g_snprintf(buf, sizeof buf, "Custom Status: %s", (char *)g_hash_table_lookup(yd->hash, b->name)); @@ -602,7 +600,7 @@ return m; } -static GList *yahoo_away_states() { +static GList *yahoo_away_states(struct gaim_connection *gc) { GList *m = NULL; m = g_list_append(m, "Available"); diff -r 1697ecbf1bcc -r 227cc42ffa6e src/protocols/zephyr/zephyr.c --- a/src/protocols/zephyr/zephyr.c Sun Oct 14 05:52:36 2001 +0000 +++ b/src/protocols/zephyr/zephyr.c Sun Oct 14 11:36:36 2001 +0000 @@ -796,7 +796,7 @@ gc->away = g_strdup(msg); } -static GList *zephyr_away_states() +static GList *zephyr_away_states(struct gaim_connection *gc) { GList *m = NULL; diff -r 1697ecbf1bcc -r 227cc42ffa6e src/prpl.h --- a/src/prpl.h Sun Oct 14 05:52:36 2001 +0000 +++ b/src/prpl.h Sun Oct 14 11:36:36 2001 +0000 @@ -85,7 +85,7 @@ /* returns the XPM associated with the given user class */ char **(* list_icon)(int); - GList *(* away_states)(); + GList *(* away_states)(struct gaim_connection *gc); GList *(* actions)(); void (* do_action)(struct gaim_connection *, char *); /* user_opts returns a GList* of g_malloc'd struct proto_user_opts */