diff options
-rw-r--r-- | skype/README | 6 | ||||
-rw-r--r-- | skype/skype.c | 16 |
2 files changed, 20 insertions, 2 deletions
diff --git a/skype/README b/skype/README index ffda8fa2..0db9b7e7 100644 --- a/skype/README +++ b/skype/README @@ -2,16 +2,18 @@ What works: - Download nicks and away statuses from Skype +- Sending messages + What needs to be done: - Away status changes (send / receive) - join / parts -- msg sending - - msg receiving +- add/remove users, detect when somebody wants to add us (maybe detect when we're removed?) + Shots at: http://frugalware.org/~vmiklos/pics/shots/bitlbee-skype/ diff --git a/skype/skype.c b/skype/skype.c index a15916e9..dcbda0ae 100644 --- a/skype/skype.c +++ b/skype/skype.c @@ -184,6 +184,21 @@ static void skype_logout( struct im_connection *ic ) g_free(sd); } +static int skype_buddy_msg( struct im_connection *ic, char *who, char *message, int flags ) +{ + char *buf, *ptr; + int st; + + ptr = strchr(who, '@'); + *ptr = '\0'; + + buf = g_strdup_printf("MESSAGE %s %s\n", who, message); + st = skype_write( ic, buf, strlen( buf ) ); + g_free(buf); + + return st; +} + static void skype_set_away( struct im_connection *ic, char *state_txt, char *message ) { } @@ -216,6 +231,7 @@ void init_plugin(void) ret->login = skype_login; ret->init = skype_init; ret->logout = skype_logout; + ret->buddy_msg = skype_buddy_msg; ret->away_states = skype_away_states; ret->add_buddy = skype_add_buddy; ret->remove_buddy = skype_remove_buddy; |