=== modified file 'protocols/jabber/io.c'
|
|
|
|
| 211 | 211 | /* If there's no version attribute, assume |
| 212 | 212 | this is an old server that can't do SASL |
| 213 | 213 | authentication. */ |
| 214 | | if( !sasl_supported( ic ) ) |
| | 214 | if( !set_getbool( &ic->acc->set, "sasl") || !sasl_supported( ic ) ) |
| 215 | 215 | { |
| 216 | 216 | /* If there's no version= tag, we suppose |
| 217 | 217 | this server does NOT implement: XMPP 1.0, |
| … |
… |
|
| 374 | 374 | support it after all, we should try to do authentication the |
| 375 | 375 | other way. jabber.com doesn't seem to do SASL while it pretends |
| 376 | 376 | to be XMPP 1.0 compliant! */ |
| 377 | | else if( !( jd->flags & JFLAG_AUTHENTICATED ) && sasl_supported( ic ) ) |
| | 377 | else if( !( jd->flags & JFLAG_AUTHENTICATED ) && set_getbool( &ic->acc->set, "sasl") && sasl_supported( ic ) ) |
| 378 | 378 | { |
| 379 | 379 | if( !jabber_init_iq_auth( ic ) ) |
| 380 | 380 | return XT_ABORT; |
=== modified file 'protocols/jabber/jabber.c'
|
|
|
|
| 81 | 81 | s = set_add( &acc->set, "tls", "try", set_eval_tls, acc ); |
| 82 | 82 | s->flags |= ACC_SET_OFFLINE_ONLY; |
| 83 | 83 | |
| | 84 | s = set_add( &acc->set, "sasl", "true", set_eval_bool, acc ); |
| | 85 | s->flags |= ACC_SET_OFFLINE_ONLY; |
| | 86 | s->flags |= SET_HIDDEN_DEFAULT; |
| | 87 | |
| 84 | 88 | s = set_add( &acc->set, "user_agent", "BitlBee", NULL, acc ); |
| 85 | 89 | |
| 86 | 90 | s = set_add( &acc->set, "xmlconsole", "false", set_eval_bool, acc ); |
=== modified file 'root_commands.c'
|
|
|
|
| 361 | 361 | set_t *s = *head; |
| 362 | 362 | while( s ) |
| 363 | 363 | { |
| 364 | | if( !( s->flags & SET_HIDDEN ) ) |
| 365 | | cmd_showset( irc, &s, s->key ); |
| 366 | | s = s->next; |
| | 364 | if( set_isvisible(s) ) |
| | 365 | cmd_showset( irc, &s, s->key ); |
| | 366 | s = s->next; |
| 367 | 367 | } |
| 368 | 368 | } |
| 369 | 369 | |
=== modified file 'set.c'
|
|
|
|
| 111 | 111 | return bool2int( s ); |
| 112 | 112 | } |
| 113 | 113 | |
| | 114 | int set_isvisible( set_t *set) |
| | 115 | { |
| | 116 | /* the default value is not stored in value, only in def */ |
| | 117 | return !( ( set->flags & SET_HIDDEN ) |
| | 118 | || ( (set->flags & SET_HIDDEN_DEFAULT) |
| | 119 | && ( set->value == NULL))); |
| | 120 | } |
| | 121 | |
| 114 | 122 | int set_setstr( set_t **head, const char *key, char *value ) |
| 115 | 123 | { |
| 116 | 124 | set_t *s = set_find( head, key ); |
=== modified file 'set.h'
|
|
|
|
| 48 | 48 | SET_NULL_OK = 0x0100, |
| 49 | 49 | SET_HIDDEN = 0x0200, |
| 50 | 50 | SET_PASSWORD = 0x0400, |
| | 51 | SET_HIDDEN_DEFAULT = 0x0800, |
| 51 | 52 | } set_flags_t; |
| 52 | 53 | |
| 53 | 54 | typedef struct set |
| … |
… |
|
| 97 | 98 | void set_del( set_t **head, const char *key ); |
| 98 | 99 | int set_reset( set_t **head, const char *key ); |
| 99 | 100 | |
| | 101 | /* returns true if a setting shall be shown to the user */ |
| | 102 | int set_isvisible(set_t *set); |
| | 103 | |
| 100 | 104 | /* Two very useful generic evaluators. */ |
| 101 | 105 | char *set_eval_int( set_t *set, char *value ); |
| 102 | 106 | char *set_eval_bool( set_t *set, char *value ); |