Changeset d3cbd17
- Timestamp:
- 2007-08-21T14:10:25Z (17 years ago)
- Branches:
- master
- Children:
- 89332c5
- Parents:
- 1fb89e3
- Location:
- skype
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
skype/README
r1fb89e3 rd3cbd17 94 94 - Set away state when you do a `/away`. 95 95 96 - 96 - When you `account off`, Skype will set status to `Offline` 97 97 98 - When you `account on`, Skype will set status to `Online` 98 - When you `account on`, Skype will set status to `Online` 99 100 - Detect when somebody wants to add you and ask for confirmation 99 101 100 102 == What needs to be done (aka. TODO) 101 103 102 - detect when somebody wants to add us (confirm callback)104 - implement block/allow commands 103 105 104 - implement block/allow commands 106 - when you remove a nick, it'll still shown as being offline (no 107 `imcb_remove_buddy()`?) 105 108 106 109 == I would like to have support for ... -
skype/skype.c
r1fb89e3 rd3cbd17 44 44 }; 45 45 46 struct skype_buddy_ask_data 47 { 48 struct im_connection *ic; 49 char *handle; 50 }; 51 46 52 static void skype_init( account_t *acc ) 47 53 { … … 74 80 75 81 return TRUE; 82 } 83 84 static void skype_buddy_ask_yes( gpointer w, struct skype_buddy_ask_data *bla ) 85 { 86 char *buf = g_strdup_printf("SET USER %s ISAUTHORIZED TRUE", bla->handle); 87 skype_write( bla->ic, buf, strlen( buf ) ); 88 g_free(buf); 89 g_free(bla->handle); 90 g_free(bla); 91 } 92 93 static void skype_buddy_ask_no( gpointer w, struct skype_buddy_ask_data *bla ) 94 { 95 char *buf = g_strdup_printf("SET USER %s ISAUTHORIZED FALSE", bla->handle); 96 skype_write( bla->ic, buf, strlen( buf ) ); 97 g_free(buf); 98 g_free(bla->handle); 99 g_free(bla); 100 } 101 102 void skype_buddy_ask( struct im_connection *ic, char *handle, char *message) 103 { 104 struct skype_buddy_ask_data *bla = g_new0( struct skype_buddy_ask_data, 1 ); 105 char *buf; 106 107 bla->ic = ic; 108 bla->handle = g_strdup(handle); 109 110 buf = g_strdup_printf( "The user %s wants to add you to his/her buddy list, saying: '%s'.", handle, message); 111 imcb_ask( ic, buf, bla, skype_buddy_ask_yes, skype_buddy_ask_no ); 112 g_free( buf ); 76 113 } 77 114 … … 132 169 imcb_buddy_status(ic, ptr, flags, NULL, NULL); 133 170 g_free(ptr); 171 } 172 else if(!strncmp(ptr, "RECEIVEDAUTHREQUEST ", 20)) 173 { 174 char *message = ptr + 20; 175 if(strlen(message)) 176 skype_buddy_ask(ic, user, message); 177 } 178 else if(!strncmp(ptr, "BUDDYSTATUS ", 12)) 179 { 180 char *st = ptr + 12; 181 if(!strcmp(st, "3")) 182 { 183 char *buf = g_strdup_printf("%s@skype.com", user); 184 imcb_add_buddy(ic, buf, NULL); 185 g_free(buf); 186 } 134 187 } 135 188 }
Note: See TracChangeset
for help on using the changeset viewer.