diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-08-15 01:05:49 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-08-15 01:05:49 +0100 |
commit | ff27648aee17e649cdd1e47f503271e4fccbff43 (patch) | |
tree | 14e4bd404e2d59d0c56c6b744a04c3b90fc6b82b /protocols/msn/msn_util.c | |
parent | d97f51b59a3ac6d9557ebd1e42a45928fe064b4b (diff) |
Read group info.
Diffstat (limited to 'protocols/msn/msn_util.c')
-rw-r--r-- | protocols/msn/msn_util.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/protocols/msn/msn_util.c b/protocols/msn/msn_util.c index 069e68b8..cf8ab4db 100644 --- a/protocols/msn/msn_util.c +++ b/protocols/msn/msn_util.c @@ -565,3 +565,35 @@ gint msn_domaintree_cmp( gconstpointer a_, gconstpointer b_ ) return ret; } + +struct msn_group *msn_group_by_name( struct im_connection *ic, const char *name ) +{ + struct msn_data *md = ic->proto_data; + GSList *l; + + for( l = md->groups; l; l = l->next ) + { + struct msn_group *mg = l->data; + + if( g_strcasecmp( mg->name, name ) == 0 ) + return mg; + } + + return NULL; +} + +struct msn_group *msn_group_by_id( struct im_connection *ic, const char *id ) +{ + struct msn_data *md = ic->proto_data; + GSList *l; + + for( l = md->groups; l; l = l->next ) + { + struct msn_group *mg = l->data; + + if( g_strcasecmp( mg->id, id ) == 0 ) + return mg; + } + + return NULL; +} |