Mercurial > pidgin
changeset 23265:043e4b0c274e
Short-circuit earlier if the buddy is offline
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 02 Jun 2008 08:51:40 +0000 |
parents | 2b997b690500 |
children | 9f34726fe141 |
files | libpurple/protocols/oscar/oscar.c |
diffstat | 1 files changed, 17 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/oscar/oscar.c Mon Jun 02 05:06:58 2008 +0000 +++ b/libpurple/protocols/oscar/oscar.c Mon Jun 02 08:51:40 2008 +0000 @@ -5654,17 +5654,23 @@ return NULL; } -void oscar_tooltip_text(PurpleBuddy *b, PurpleNotifyUserInfo *user_info, gboolean full) { - PurpleConnection *gc = b->account->gc; - OscarData *od = gc->proto_data; - aim_userinfo_t *userinfo = aim_locate_finduserinfo(od, b->name); - - if (PURPLE_BUDDY_IS_ONLINE(b)) { - oscar_user_info_append_status(gc, user_info, b, userinfo); - - if (full) - oscar_user_info_append_extra_info(gc, user_info, b, userinfo); - } +void oscar_tooltip_text(PurpleBuddy *b, PurpleNotifyUserInfo *user_info, gboolean full) +{ + PurpleConnection *gc; + OscarData *od; + aim_userinfo_t *userinfo; + + if (PURPLE_BUDDY_IS_ONLINE(b)) + return; + + gc = b->account->gc; + od = gc->proto_data; + userinfo = aim_locate_finduserinfo(od, b->name); + + oscar_user_info_append_status(gc, user_info, b, userinfo); + + if (full) + oscar_user_info_append_extra_info(gc, user_info, b, userinfo); } char *oscar_status_text(PurpleBuddy *b)