Changeset 93dffea for skype


Ignore:
Timestamp:
2008-01-10T16:10:10Z (17 years ago)
Author:
Miklos Vajna <vmiklos@…>
Branches:
master
Children:
d1eb24c
Parents:
6172871
Message:

new skype_set_display_name() function

  • this adds support for setting display_name
  • also add support for the deprecated nick command in skype_set_my_name()
File:
1 edited

Legend:

Unmodified
Added
Removed
  • skype/skype.c

    r6172871 r93dffea  
    133133 */
    134134
    135 static void skype_init( account_t *acc )
    136 {
    137         set_t *s;
    138 
    139         s = set_add( &acc->set, "server", SKYPE_DEFAULT_SERVER, set_eval_account, acc );
    140         s->flags |= ACC_SET_OFFLINE_ONLY;
    141 
    142         s = set_add( &acc->set, "port", SKYPE_DEFAULT_PORT, set_eval_int, acc );
    143         s->flags |= ACC_SET_OFFLINE_ONLY;
    144 }
    145 
    146135int skype_write( struct im_connection *ic, char *buf, int len )
    147136{
     
    860849}
    861850
     851static char *skype_set_display_name( set_t *set, char *value )
     852{
     853        account_t *acc = set->data;
     854        struct im_connection *ic = acc->ic;
     855        //struct skype_data *sd = ic->proto_data;
     856        char *buf;
     857
     858        buf = g_strdup_printf("SET PROFILE MOOD_TEXT %s", value);
     859        skype_write( ic, buf, strlen( buf ) );
     860        g_free(buf);
     861        return(value);
     862}
     863
    862864static void skype_add_buddy( struct im_connection *ic, char *who, char *group )
    863865{
     
    10021004}
    10031005
     1006static void skype_set_my_name( struct im_connection *ic, char *info )
     1007{
     1008        skype_set_display_name( set_find( &ic->acc->set, "display_name" ), info );
     1009}
     1010
     1011static void skype_init( account_t *acc )
     1012{
     1013        set_t *s;
     1014
     1015        s = set_add( &acc->set, "server", SKYPE_DEFAULT_SERVER, set_eval_account, acc );
     1016        s->flags |= ACC_SET_OFFLINE_ONLY;
     1017
     1018        s = set_add( &acc->set, "port", SKYPE_DEFAULT_PORT, set_eval_int, acc );
     1019        s->flags |= ACC_SET_OFFLINE_ONLY;
     1020
     1021        s = set_add( &acc->set, "display_name", NULL, skype_set_display_name, acc );
     1022        s->flags |= ACC_SET_NOSAVE | ACC_SET_ONLINE_ONLY;
     1023}
     1024
    10041025void init_plugin(void)
    10051026{
     
    10121033        ret->buddy_msg = skype_buddy_msg;
    10131034        ret->get_info = skype_get_info;
     1035        ret->set_my_name = skype_set_my_name;
    10141036        ret->away_states = skype_away_states;
    10151037        ret->set_away = skype_set_away;
Note: See TracChangeset for help on using the changeset viewer.