diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-03-14 18:22:43 +0000 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-03-14 18:22:43 +0000 | 
| commit | 90cd6c4780c7e42a0b7caff5d3a2ba1e0bd3f308 (patch) | |
| tree | 9df51cf89400399a68895badf429df1d127aa840 /protocols/nogaim.c | |
| parent | ceebeb12e935e7a6fa72e1375e99d53cc91fcf45 (diff) | |
Allow disabling certain IM protocols at runtime, patch from
misc@mandriva.org, bug #381.
Diffstat (limited to 'protocols/nogaim.c')
| -rw-r--r-- | protocols/nogaim.c | 14 | 
1 files changed, 13 insertions, 1 deletions
| diff --git a/protocols/nogaim.c b/protocols/nogaim.c index 75c2139b..9c6daeaf 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -97,7 +97,19 @@ GList *protocols = NULL;  void register_protocol (struct prpl *p)  { -	protocols = g_list_append(protocols, p); +	int i; +	gboolean refused = global.conf->protocols != NULL; +  +	for (i = 0; global.conf->protocols && global.conf->protocols[i]; i++) + 	{ + 		if (g_strcasecmp(p->name, global.conf->protocols[i]) == 0) +			refused = FALSE; + 	} + +	if (refused) +		log_message(LOGLVL_WARNING, "Protocol %s disabled\n", p->name); +	else +		protocols = g_list_append(protocols, p);  }  struct prpl *find_protocol(const char *name) | 
