Changeset b68b023


Ignore:
Timestamp:
2008-02-28T23:52:41Z (12 years ago)
Author:
Miklos Vajna <vmiklos@…>
Branches:
master
Children:
3878849
Parents:
459160d
Message:

new account set skype/call nick command to start calls

File:
1 edited

Legend:

Unmodified
Added
Removed
  • skype/skype.c

    r459160d rb68b023  
    890890}
    891891
     892static char *skype_set_call( set_t *set, char *value )
     893{
     894        account_t *acc = set->data;
     895        struct im_connection *ic = acc->ic;
     896        char *nick, *ptr, *buf;
     897        user_t *u = user_find(acc->irc, value);
     898
     899        if(!u)
     900        {
     901                imcb_error(ic, "%s - no such nick", value);
     902                return(value);
     903        }
     904        nick = g_strdup(u->handle);
     905        ptr = strchr(nick, '@');
     906        if(ptr)
     907                *ptr = '\0';
     908
     909        buf = g_strdup_printf("CALL %s", nick);
     910        skype_write( ic, buf, strlen( buf ) );
     911        g_free(buf);
     912        g_free(nick);
     913        imcb_log(ic, "Ringing the user %s.", value);
     914        return(value);
     915}
     916
    892917static void skype_add_buddy( struct im_connection *ic, char *who, char *group )
    893918{
     
    10481073
    10491074        s = set_add( &acc->set, "display_name", NULL, skype_set_display_name, acc );
     1075        s->flags |= ACC_SET_NOSAVE | ACC_SET_ONLINE_ONLY;
     1076
     1077        s = set_add( &acc->set, "call", NULL, skype_set_call, acc );
    10501078        s->flags |= ACC_SET_NOSAVE | ACC_SET_ONLINE_ONLY;
    10511079}
Note: See TracChangeset for help on using the changeset viewer.