Mercurial > pidgin
diff src/protocols/oscar/oscar.c @ 5628:9a34e950792e
[gaim-migrate @ 6035]
Fixes the AIM always notifies you of new mail bug.
Improves the performance of aim_sncmp, it should be at least twice as
fast now. And this function gets called a lot. It might even be
noticable, if your computer is slow. Thanks to Ryan McCabe again for
this, he's cool.
Removed the round function, as someone in #gaim suggested a better way.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 01 Jun 2003 04:15:46 +0000 |
parents | 74a0e79ad627 |
children | 4e2ffa3d9094 |
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c Sun Jun 01 04:11:24 2003 +0000 +++ b/src/protocols/oscar/oscar.c Sun Jun 01 04:15:46 2003 +0000 @@ -291,13 +291,6 @@ /* prpl actions - remove this at some point */ static void oscar_set_info(GaimConnection *gc, char *text); -int ill_just_write_my_own_damn_round_function(double val) { - if ((val - (int)val) > 0.5) - return val+1; - else - return val; -} - static void gaim_free_name_data(struct name_data *data) { g_free(data->name); g_free(data->nick); @@ -1841,7 +1834,7 @@ free(b16); } - serv_got_update(gc, info->sn, 1, ill_just_write_my_own_damn_round_function(info->warnlevel/10.0), signon, time_idle, type); + serv_got_update(gc, info->sn, 1, (info->warnlevel/10.0) + 0.5, signon, time_idle, type); return 1; } @@ -3183,7 +3176,7 @@ "%s\n" "<hr>\n"), info->sn, images(info->flags), - ill_just_write_my_own_damn_round_function(info->warnlevel/10.0), + (info->warnlevel/10.0) + 0.5, onlinesince ? onlinesince : "", membersince ? membersince : "", idle ? idle : ""); @@ -3443,7 +3436,7 @@ havenewmail = va_arg(ap, int); va_end(ap); - if (emailinfo) { + if (emailinfo && gaim_account_get_check_mail(gc->account)) { gchar *to = g_strdup_printf("%s@%s", gaim_account_get_username(gaim_connection_get_account(gc)), emailinfo->domain); if (emailinfo->unread && havenewmail) gaim_notify_emails(gc, emailinfo->nummsgs, FALSE, NULL, NULL, (const char **)&to, (const char **)&emailinfo->url, NULL, NULL); @@ -3632,7 +3625,7 @@ userinfo = va_arg(ap, aim_userinfo_t *); va_end(ap); - serv_got_eviled(gc, (userinfo && userinfo->sn[0]) ? userinfo->sn : NULL, ill_just_write_my_own_damn_round_function(newevil/10.0)); + serv_got_eviled(gc, (userinfo && userinfo->sn[0]) ? userinfo->sn : NULL, (newevil/10.0) + 0.5); return 1; } @@ -3646,7 +3639,7 @@ info = va_arg(ap, aim_userinfo_t *); va_end(ap); - gc->evil = ill_just_write_my_own_damn_round_function(info->warnlevel/10.0); + gc->evil = (info->warnlevel/10.0) + 0.5; if (info->onlinesince) gc->login_time_official = info->onlinesince;