aboutsummaryrefslogtreecommitdiffstats
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/jabber/jabber.c2
-rw-r--r--protocols/jabber/jabber_util.c4
-rw-r--r--protocols/nogaim.c12
3 files changed, 7 insertions, 11 deletions
diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c
index c9c1d0a0..ac8638cf 100644
--- a/protocols/jabber/jabber.c
+++ b/protocols/jabber/jabber.c
@@ -69,7 +69,7 @@ static void jabber_init( account_t *acc )
s = set_add( &acc->set, "resource_select", "priority", NULL, acc );
s = set_add( &acc->set, "server", NULL, set_eval_account, acc );
- s->flags |= ACC_SET_NOSAVE | ACC_SET_OFFLINE_ONLY;
+ s->flags |= ACC_SET_NOSAVE | ACC_SET_OFFLINE_ONLY | SET_NULL_OK;
s = set_add( &acc->set, "ssl", "false", set_eval_bool, acc );
s->flags |= ACC_SET_OFFLINE_ONLY;
diff --git a/protocols/jabber/jabber_util.c b/protocols/jabber/jabber_util.c
index 1bee5009..19a73b6a 100644
--- a/protocols/jabber/jabber_util.c
+++ b/protocols/jabber/jabber_util.c
@@ -36,10 +36,10 @@ char *set_eval_priority( set_t *set, char *value )
{
/* Priority is a signed 8-bit integer, according to RFC 3921. */
if( i < -128 || i > 127 )
- return NULL;
+ return SET_INVALID;
}
else
- return NULL;
+ return SET_INVALID;
/* Only run this stuff if the account is online ATM,
and if the setting seems to be acceptable. */
diff --git a/protocols/nogaim.c b/protocols/nogaim.c
index b6f8d6e4..6a267adf 100644
--- a/protocols/nogaim.c
+++ b/protocols/nogaim.c
@@ -927,14 +927,10 @@ char *set_eval_away_devoice( set_t *set, char *value )
irc_t *irc = set->data;
int st;
- if( ( g_strcasecmp( value, "true" ) == 0 ) || ( g_strcasecmp( value, "yes" ) == 0 ) || ( g_strcasecmp( value, "on" ) == 0 ) )
- st = 1;
- else if( ( g_strcasecmp( value, "false" ) == 0 ) || ( g_strcasecmp( value, "no" ) == 0 ) || ( g_strcasecmp( value, "off" ) == 0 ) )
- st = 0;
- else if( sscanf( value, "%d", &st ) != 1 )
- return( NULL );
+ if( !is_bool( value ) )
+ return SET_INVALID;
- st = st != 0;
+ st = bool2int( value );
/* Horror.... */
@@ -978,7 +974,7 @@ char *set_eval_away_devoice( set_t *set, char *value )
irc->channel, pm, v, list );
}
- return( set_eval_bool( set, value ) );
+ return value;
}