diff options
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; +} |