diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-03-21 10:18:28 +0000 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-03-21 10:18:28 +0000 | 
| commit | 545d7c058d0604dd6acfa37c68e9867e72f25c2e (patch) | |
| tree | bcfcb4d43013df914a9bbb73d74873a9d1989e81 | |
| parent | 0baed0da940c0d82280a5674d7fa8ad06d449384 (diff) | |
Added ignore_auth_requests setting (patch from vmiklos, bug #578).
| -rw-r--r-- | doc/user-guide/commands.xml | 11 | ||||
| -rw-r--r-- | protocols/oscar/oscar.c | 17 | 
2 files changed, 24 insertions, 4 deletions
| diff --git a/doc/user-guide/commands.xml b/doc/user-guide/commands.xml index f8ae4386..df99c1fc 100644 --- a/doc/user-guide/commands.xml +++ b/doc/user-guide/commands.xml @@ -586,6 +586,17 @@  	</bitlbee-setting> +	<bitlbee-setting name="ignore_auth_requests" type="boolean" scope="account"> +		<default>true</default> + +		<description> +			<para> +				Only supported by OSCAR so far, you can use this setting to ignore ICQ authorization requests, which are hardly used for legitimate (i.e. non-spam) reasons anymore. +			</para> +		</description> + +	</bitlbee-setting> +  	<bitlbee-setting name="lcnicks" type="boolean" scope="global">  		<default>true</default> diff --git a/protocols/oscar/oscar.c b/protocols/oscar/oscar.c index f0e65f9a..e0c32257 100644 --- a/protocols/oscar/oscar.c +++ b/protocols/oscar/oscar.c @@ -372,11 +372,15 @@ static void oscar_init(account_t *acc)  {  	set_t *s; -	s = set_add( &acc->set, "server", AIM_DEFAULT_LOGIN_SERVER, set_eval_account, acc ); +	if (isdigit(acc->user[0])) { +		set_add(&acc->set, "ignore_auth_requests", "false", set_eval_bool, acc); +	} +	 +	s = set_add(&acc->set, "server", AIM_DEFAULT_LOGIN_SERVER, set_eval_account, acc);  	s->flags |= ACC_SET_NOSAVE | ACC_SET_OFFLINE_ONLY; -	if (isdigit(acc->user[0])) { -		s = set_add( &acc->set, "web_aware", "false", set_eval_bool, acc ); +	if(isdigit(acc->user[0])) { +		s = set_add(&acc->set, "web_aware", "false", set_eval_bool, acc);  		s->flags |= ACC_SET_OFFLINE_ONLY;  	} @@ -1211,10 +1215,15 @@ static void gaim_icq_authdeny(void *data_) {   * For when other people ask you for authorization   */  static void gaim_icq_authask(struct im_connection *ic, guint32 uin, char *msg) { -	struct icq_auth *data = g_new(struct icq_auth, 1); +	struct icq_auth *data;  	char *reason = NULL;  	char *dialog_msg; + +	if (set_getbool(&ic->acc->set, "ignore_auth_requests")) +		return; +	data = g_new(struct icq_auth, 1); +  	if (strlen(msg) > 6)  		reason = msg + 6; | 
