Mercurial > pidgin
diff libpurple/protocols/msn/userlist.c @ 22536:575c4bda3b23
another patch from Maiku, this time handling IPG so we can receive paging.
I am not sure why anyone would ever want to use this, but apparently some
people find it helpful.
Blame me if it doesn't work
Fixes #5232
author | Ka-Hing Cheung <khc@hxbc.us> |
---|---|
date | Fri, 21 Mar 2008 05:24:21 +0000 |
parents | aa875e77e5ce |
children | 32ff15843259 |
line wrap: on
line diff
--- a/libpurple/protocols/msn/userlist.c Fri Mar 21 04:45:03 2008 +0000 +++ b/libpurple/protocols/msn/userlist.c Fri Mar 21 05:24:21 2008 +0000 @@ -518,6 +518,28 @@ return NULL; } +MsnUser * +msn_userlist_find_user_with_mobile_phone(MsnUserList *userlist, const char *number) +{ + GList *l; + + g_return_val_if_fail(number != NULL, NULL); + + for (l = userlist->users; l != NULL; l = l->next) { + MsnUser *user = (MsnUser *)l->data; + + if (user->phone.mobile == NULL) { + continue; + } + + if (!g_strcasecmp(number, user->phone.mobile)) { + return user; + } + } + + return NULL; +} + void msn_userlist_add_group(MsnUserList *userlist, MsnGroup *group) {