aboutsummaryrefslogtreecommitdiffstats
path: root/skype/skype.c
diff options
context:
space:
mode:
authorVMiklos <vmiklos@frugalware.org>2007-10-07 03:55:46 +0200
committerVMiklos <vmiklos@frugalware.org>2007-10-07 03:55:46 +0200
commit760319dd435e3189fd8707fa72ea3a21663e1b69 (patch)
treee93acbd73ad2837e205a377965491a5e3498262b /skype/skype.c
parent86f2683fd62482f297793aa711704b772fa5c345 (diff)
implemented skype_chat_invite()
Diffstat (limited to 'skype/skype.c')
-rw-r--r--skype/skype.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/skype/skype.c b/skype/skype.c
index 5d5854bc..0937400d 100644
--- a/skype/skype.c
+++ b/skype/skype.c
@@ -464,7 +464,6 @@ static gboolean skype_read_callback( gpointer data, gint fd, b_input_condition c
}
imcb_chat_add_buddy(gc, sd->username);
g_strfreev(members);
- gc->data = (void*)TRUE;
}
}
}
@@ -639,6 +638,21 @@ void skype_chat_leave( struct groupchat *gc )
buf = g_strdup_printf("ALTER CHAT %s LEAVE\n", gc->title);
skype_write( ic, buf, strlen( buf ) );
g_free(buf);
+ gc->data = (void*)TRUE;
+}
+
+void skype_chat_invite(struct groupchat *gc, char *who, char *message)
+{
+ struct im_connection *ic = gc->ic;
+ char *buf, *ptr, *nick;
+ nick = g_strdup(message);
+ ptr = strchr(nick, '@');
+ if(ptr)
+ *ptr = '\0';
+ buf = g_strdup_printf("ALTER CHAT %s ADDMEMBERS %s\n", gc->title, nick);
+ skype_write( ic, buf, strlen( buf ) );
+ g_free(buf);
+ g_free(nick);
}
void init_plugin(void)
@@ -656,6 +670,7 @@ void init_plugin(void)
ret->remove_buddy = skype_remove_buddy;
ret->chat_msg = skype_chat_msg;
ret->chat_leave = skype_chat_leave;
+ ret->chat_invite = skype_chat_invite;
ret->handle_cmp = g_strcasecmp;
register_protocol( ret );
}