Changeset 06b39f2
- Timestamp:
- 2010-07-13T00:17:37Z (14 years ago)
- Branches:
- master
- Children:
- 83e2d30, b1af3e8
- Parents:
- db2cef1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/account.c
rdb2cef1 r06b39f2 28 28 #include "account.h" 29 29 30 static char *set_eval_nick_source( set_t *set, char *value ); 31 30 32 account_t *account_add( bee_t *bee, struct prpl *prpl, char *user, char *pass ) 31 33 { … … 57 59 s->flags |= SET_NULL_OK; 58 60 59 s = set_add( &a->set, "nick_source", "handle", NULL, a ); 61 s = set_add( &a->set, "nick_source", "handle", set_eval_nick_source, a ); 62 s->flags |= ACC_SET_NOSAVE; /* Just for bw compatibility! */ 60 63 61 64 s = set_add( &a->set, "password", NULL, set_eval_account, a ); … … 153 156 154 157 return SET_INVALID; 158 } 159 160 /* For bw compatibility, have this write-only setting. */ 161 static char *set_eval_nick_source( set_t *set, char *value ) 162 { 163 account_t *a = set->data; 164 165 if( strcmp( value, "full_name" ) == 0 ) 166 set_setstr( &a->set, "nick_format", "%full_name" ); 167 else if( strcmp( value, "first_name" ) == 0 ) 168 set_setstr( &a->set, "nick_format", "%first_name" ); 169 else 170 set_setstr( &a->set, "nick_format", "%-@nick" ); 171 172 return value; 155 173 } 156 174
Note: See TracChangeset
for help on using the changeset viewer.