Changeset c0c43fb for protocols/oscar
- Timestamp:
- 2008-12-14T10:31:49Z (16 years ago)
- Branches:
- master
- Children:
- ac46218
- Parents:
- 939370c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/oscar/oscar.c
r939370c rc0c43fb 1939 1939 aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_NORMAL); 1940 1940 1941 if (ic->away) 1942 g_free(ic->away); 1941 g_free(ic->away); 1943 1942 ic->away = NULL; 1944 1943 … … 1960 1959 static void oscar_set_away_icq(struct im_connection *ic, struct oscar_data *od, const char *state, const char *message) 1961 1960 { 1962 1961 const char *msg = NULL; 1963 1962 gboolean no_message = FALSE; 1964 1963 1965 1964 /* clean old states */ 1966 if (ic->away) { 1967 g_free(ic->away); 1968 ic->away = NULL; 1969 } 1965 g_free(ic->away); 1966 ic->away = NULL; 1970 1967 od->sess->aim_icq_state = 0; 1971 1968 1972 1969 /* if no message, then use an empty message */ 1973 1974 1975 1976 1970 if (message) { 1971 msg = message; 1972 } else { 1973 msg = ""; 1977 1974 no_message = TRUE; 1978 1975 } 1979 1976 1980 1977 if (!g_strcasecmp(state, "Online")) { … … 1982 1979 } else if (!g_strcasecmp(state, "Away")) { 1983 1980 aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_AWAY); 1984 1981 ic->away = g_strdup(msg); 1985 1982 od->sess->aim_icq_state = AIM_MTYPE_AUTOAWAY; 1986 1983 } else if (!g_strcasecmp(state, "Do Not Disturb")) { 1987 1984 aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_AWAY | AIM_ICQ_STATE_DND | AIM_ICQ_STATE_BUSY); 1988 1985 ic->away = g_strdup(msg); 1989 1986 od->sess->aim_icq_state = AIM_MTYPE_AUTODND; 1990 1987 } else if (!g_strcasecmp(state, "Not Available")) { 1991 1988 aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_OUT | AIM_ICQ_STATE_AWAY); 1992 1989 ic->away = g_strdup(msg); 1993 1990 od->sess->aim_icq_state = AIM_MTYPE_AUTONA; 1994 1991 } else if (!g_strcasecmp(state, "Occupied")) { 1995 1992 aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_AWAY | AIM_ICQ_STATE_BUSY); 1996 1993 ic->away = g_strdup(msg); 1997 1994 od->sess->aim_icq_state = AIM_MTYPE_AUTOBUSY; 1998 1995 } else if (!g_strcasecmp(state, "Free For Chat")) { 1999 1996 aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_CHAT); 2000 1997 ic->away = g_strdup(msg); 2001 1998 od->sess->aim_icq_state = AIM_MTYPE_AUTOFFC; 2002 1999 } else if (!g_strcasecmp(state, "Invisible")) { 2003 2000 aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_INVISIBLE); 2004 2001 ic->away = g_strdup(msg); 2005 2002 } else if (!g_strcasecmp(state, GAIM_AWAY_CUSTOM)) { 2006 2003 if (no_message) { … … 2008 2005 } else { 2009 2006 aim_setextstatus(od->sess, od->conn, AIM_ICQ_STATE_AWAY); 2010 2007 ic->away = g_strdup(msg); 2011 2008 od->sess->aim_icq_state = AIM_MTYPE_AUTOAWAY; 2012 2009 } … … 2020 2017 struct oscar_data *od = (struct oscar_data *)ic->proto_data; 2021 2018 2022 2019 oscar_set_away_aim(ic, od, state, message); 2023 2020 if (od->icq) 2024 2021 oscar_set_away_icq(ic, od, state, message);
Note: See TracChangeset
for help on using the changeset viewer.