Mercurial > hg
changeset 823:19c615fd071e
New option "delete_on_reject"
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Tue, 25 Apr 2006 07:05:50 +0200 |
parents | 0dbb2be10975 |
children | 37ef269330f0 |
files | mcabber/mcabberrc.example mcabber/src/jabglue.c |
diffstat | 2 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/mcabberrc.example Sun Apr 23 11:21:24 2006 +0200 +++ b/mcabber/mcabberrc.example Tue Apr 25 07:05:50 2006 +0200 @@ -120,9 +120,17 @@ #set autoaway = 0 # Message blocking -# Set the 'block_unsubscribed' to 1 if you want to block (drop) incoming +# Set 'block_unsubscribed' to 1 if you want to block (drop) incoming # messages from people you haven't authorized. (default: 0) #set block_unsubscribed = 0 +# +# Set 'delete_on_reject' to 1 if you want to delete buddies from your +# roster when you reject their subscription request. (default: 0) +# (See documentation for /event) +# The buddy is actually deleted only if there is no other subscription, +# so for example if you are subscribed to this buddy's presence updates it +# won't be deleted. +#set delete_on_reject = 0 # Status messages # The "message" value will override all others, take care!
--- a/mcabber/src/jabglue.c Sun Apr 23 11:21:24 2006 +0200 +++ b/mcabber/src/jabglue.c Tue Apr 25 07:05:50 2006 +0200 @@ -1372,6 +1372,11 @@ // Reject subscription request jb_subscr_cancel_auth(barejid); buf = g_strdup_printf("<%s> won't receive your presence updates", barejid); + if (settings_opt_get_int("delete_on_reject")) { + // Remove the buddy from the roster if there is no current subscription + if (roster_getsubscription(barejid) == sub_none) + jb_delbuddy(barejid); + } } scr_WriteIncomingMessage(barejid, buf, 0, HBB_PREFIX_INFO); scr_LogPrint(LPRINT_LOGNORM, "%s", buf);