Changeset 5f40da7 for set.c


Ignore:
Timestamp:
2011-12-26T10:51:19Z (13 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
199fea6
Parents:
96f954d (diff), 644b808 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merging oauth-xmpp branch, which adds support for OAuth2 authentication
against some XMPP services (Google Talk, Facebook and Microsoft's MSN-XMPP
gateway).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • set.c

    r96f954d r5f40da7  
    8585                return NULL;
    8686       
    87         return s->value ? s->value : s->def;
     87        return set_value( s );
    8888}
    8989
     
    250250}
    251251
    252 /*
    253 char *set_eval_ops( set_t *set, char *value )
    254 {
    255         irc_t *irc = set->data;
    256        
    257         if( g_strcasecmp( value, "user" ) == 0 )
    258                 irc_write( irc, ":%s!%s@%s MODE %s %s %s %s", irc->mynick, irc->mynick, irc->myhost,
    259                                                               irc->channel, "+o-o", irc->nick, irc->mynick );
    260         else if( g_strcasecmp( value, "root" ) == 0 )
    261                 irc_write( irc, ":%s!%s@%s MODE %s %s %s %s", irc->mynick, irc->mynick, irc->myhost,
    262                                                               irc->channel, "-o+o", irc->nick, irc->mynick );
    263         else if( g_strcasecmp( value, "both" ) == 0 )
    264                 irc_write( irc, ":%s!%s@%s MODE %s %s %s %s", irc->mynick, irc->mynick, irc->myhost,
    265                                                               irc->channel, "+oo", irc->nick, irc->mynick );
    266         else if( g_strcasecmp( value, "none" ) == 0 )
    267                 irc_write( irc, ":%s!%s@%s MODE %s %s %s %s", irc->mynick, irc->mynick, irc->myhost,
    268                                                               irc->channel, "-oo", irc->nick, irc->mynick );
    269         else
    270                 return SET_INVALID;
    271        
    272         return value;
    273 }
    274 */
     252char *set_eval_oauth( set_t *set, char *value )
     253{
     254        account_t *acc = set->data;
     255       
     256        if( bool2int( value ) && strcmp( acc->pass, PASSWORD_PENDING ) == 0 )
     257                *acc->pass = '\0';
     258       
     259        return set_eval_bool( set, value );
     260}
Note: See TracChangeset for help on using the changeset viewer.