- Timestamp:
- 2008-12-14T10:31:49Z (16 years ago)
- Branches:
- master
- Children:
- ac46218
- Parents:
- 939370c
- Location:
- protocols
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.c
r939370c rc0c43fb 320 320 ic->acc->prpl->logout( ic ); 321 321 b_event_remove( ic->inpa ); 322 323 g_free( ic->away ); 324 ic->away = NULL; 322 325 323 326 u = irc->users; -
protocols/nogaim.h
r939370c rc0c43fb 239 239 * the account_t parameter. */ 240 240 G_MODULE_EXPORT struct im_connection *imcb_new( account_t *acc ); 241 G_MODULE_EXPORT void imc b_free( struct im_connection *ic );241 G_MODULE_EXPORT void imc_free( struct im_connection *ic ); 242 242 /* Once you're connected, you should call this function, so that the user will 243 243 * see the success. */ -
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); -
protocols/yahoo/yahoo.c
r939370c rc0c43fb 197 197 { 198 198 struct byahoo_data *yd = (struct byahoo_data *) ic->proto_data; 199 200 ic->away = NULL; 199 char *away; 200 201 away = NULL; 201 202 202 203 if( state && msg && g_strcasecmp( state, msg ) != 0 ) 203 204 { 204 205 yd->current_status = YAHOO_STATUS_CUSTOM; 205 ic->away = "";206 away = ""; 206 207 } 207 208 else if( state ) … … 212 213 msg = NULL; 213 214 214 ic->away = "";215 away = ""; 215 216 if( g_strcasecmp( state, "Available" ) == 0 ) 216 217 { 217 218 yd->current_status = YAHOO_STATUS_AVAILABLE; 218 ic->away = NULL;219 away = NULL; 219 220 } 220 221 else if( g_strcasecmp( state, "Be Right Back" ) == 0 ) … … 242 243 yd->current_status = YAHOO_STATUS_AVAILABLE; 243 244 244 ic->away = NULL;245 away = NULL; 245 246 } 246 247 } … … 248 249 yd->current_status = YAHOO_STATUS_AVAILABLE; 249 250 250 yahoo_set_away( yd->y2_id, yd->current_status, msg, ic->away != NULL ? 2 : 0 );251 yahoo_set_away( yd->y2_id, yd->current_status, msg, away != NULL ? 2 : 0 ); 251 252 } 252 253
Note: See TracChangeset
for help on using the changeset viewer.