diff options
Diffstat (limited to 'skype/skype.c')
-rw-r--r-- | skype/skype.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/skype/skype.c b/skype/skype.c index e1fb7293..9658c796 100644 --- a/skype/skype.c +++ b/skype/skype.c @@ -69,6 +69,8 @@ struct skype_data skype_call_status call_status; /* Same for file transfers. */ skype_filetransfer_status filetransfer_status; + /* True if the next message will be a topic */ + int topic; }; struct skype_away_state @@ -292,7 +294,13 @@ static gboolean skype_read_callback( gpointer data, gint fd, b_input_condition c if(sd->handle && strlen(info)) { /* New body, we have everything to use imcb_buddy_msg() now! */ - imcb_buddy_msg(ic, sd->handle, info, 0, 0); + if(sd->topic) + { + imcb_log(ic, "%s has changed the chat topic to \"%s\"", sd->handle, info); + sd->topic = 0; + } + else + imcb_buddy_msg(ic, sd->handle, info, 0, 0); } } } @@ -373,6 +381,18 @@ static gboolean skype_read_callback( gpointer data, gint fd, b_input_condition c } } } + else if(!strncmp(line, "CHAT ", 5)) + { + char *id = strchr(line, ' '); + if(++id) + { + char *info = strchr(id, ' '); + *info = '\0'; + info++; + if(!strncmp(info, "TOPIC ", 6)) + sd->topic = 1; + } + } lineptr++; } g_strfreev(lines); |