diff options
author | Miklos Vajna <vmiklos@frugalware.org> | 2011-01-01 17:55:20 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@frugalware.org> | 2011-01-01 17:55:20 +0100 |
commit | 8b8d1bed18306366a9b4c6bf7fc5604c1ae05e1f (patch) | |
tree | 2ede2e3bb12a159bd5bc1a89cb1e0f73f3eccd37 | |
parent | edbfade989ba853cbd520fa87e396b044e80695c (diff) |
Read list of groups on startup
This is just the begining, we do not
- store it
- store the list of users in a group nor the name of the group
- track changes after the user logged in
- don't write this info
-rw-r--r-- | skype/skype.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/skype/skype.c b/skype/skype.c index 99e52540..8dd07ebe 100644 --- a/skype/skype.c +++ b/skype/skype.c @@ -858,6 +858,20 @@ static void skype_parse_chats(struct im_connection *ic, char *line) g_strfreev(chats); } +static void skype_parse_groups(struct im_connection *ic, char *line) +{ + char **i; + char **groups = g_strsplit(line + 7, ", ", 0); + + i = groups; + while (*i) { + skype_printf(ic, "GET GROUP %s DISPLAYNAME\n", *i); + skype_printf(ic, "GET GROUP %s USERS\n", *i); + i++; + } + g_strfreev(groups); +} + typedef void (*skype_parser)(struct im_connection *ic, char *line); static gboolean skype_read_callback(gpointer data, gint fd, @@ -882,6 +896,7 @@ static gboolean skype_read_callback(gpointer data, gint fd, { "PROFILE PSTN_BALANCE ", skype_parse_profile }, { "PING", skype_parse_ping }, { "CHATS ", skype_parse_chats }, + { "GROUPS ", skype_parse_groups }, }; /* Unused parameters */ @@ -938,8 +953,10 @@ gboolean skype_start_stream(struct im_connection *ic) skype_printf(ic, "USERNAME %s\n", ic->acc->user); skype_printf(ic, "PASSWORD %s\n", ic->acc->pass); - /* This will download all buddies. */ + /* This will download all buddies and groups. */ st = skype_printf(ic, "SEARCH FRIENDS\n"); + skype_printf(ic, "SEARCH GROUPS CUSTOM\n"); + skype_printf(ic, "SET USERSTATUS ONLINE\n"); /* Auto join to bookmarked chats if requested.*/ |