aboutsummaryrefslogtreecommitdiffstats
path: root/conf.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-03-14 18:22:43 +0000
committerWilmer van der Gaast <wilmer@gaast.net>2010-03-14 18:22:43 +0000
commit90cd6c4780c7e42a0b7caff5d3a2ba1e0bd3f308 (patch)
tree9df51cf89400399a68895badf429df1d127aa840 /conf.c
parentceebeb12e935e7a6fa72e1375e99d53cc91fcf45 (diff)
Allow disabling certain IM protocols at runtime, patch from
misc@mandriva.org, bug #381.
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/conf.c b/conf.c
index c8cfaad8..b997fb0a 100644
--- a/conf.c
+++ b/conf.c
@@ -62,6 +62,7 @@ conf_t *conf_load( int argc, char *argv[] )
conf->ping_interval = 180;
conf->ping_timeout = 300;
conf->user = NULL;
+ conf->protocols = NULL;
proxytype = 0;
i = conf_loadini( conf, global.conf_file );
@@ -306,6 +307,11 @@ static int conf_loadini( conf_t *conf, char *file )
g_free( conf->user );
conf->user = g_strdup( ini->value );
}
+ else if( g_strcasecmp( ini->key, "protocols" ) == 0 )
+ {
+ g_strfreev( conf->protocols );
+ conf->protocols = g_strsplit_set( ini->value, " \t,;", -1 );
+ }
else
{
fprintf( stderr, "Error: Unknown setting `%s` in configuration file (line %d).\n", ini->key, ini->line );