diff options
author | VMiklos <vmiklos@frugalware.org> | 2007-08-22 18:12:28 +0200 |
---|---|---|
committer | VMiklos <vmiklos@frugalware.org> | 2007-08-22 18:12:28 +0200 |
commit | ecfbc5d8c2266b0e63a3ff5bfdec93a22984f950 (patch) | |
tree | c7ae3df3f26af9ed85ec8fc5104b9fc5c011c4d9 /skype/skype.c | |
parent | 57087df72ba6c12ba8e7b9d27a99118d78e3f784 (diff) |
skype_read_callback(): add notification about calls
Diffstat (limited to 'skype/skype.c')
-rw-r--r-- | skype/skype.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/skype/skype.c b/skype/skype.c index a3fec187..5e48fe1e 100644 --- a/skype/skype.c +++ b/skype/skype.c @@ -261,6 +261,26 @@ static gboolean skype_read_callback( gpointer data, gint fd, b_input_condition c } } } + else if(!strncmp(line, "CALL ", 5)) + { + char *id = strchr(line, ' '); + if(++id) + { + char *info = strchr(id, ' '); + *info = '\0'; + info++; + if(!strcmp(info, "STATUS RINGING")) + { + g_snprintf(buf, 1024, "GET CALL %s PARTNER_HANDLE\n", id); + skype_write( ic, buf, strlen( buf ) ); + } + else if(!strncmp(info, "PARTNER_HANDLE ", 15)) + { + info += 15; + imcb_log(ic, "The user %s is currently ringing you.", info); + } + } + } lineptr++; } g_strfreev(lines); |