Mercurial > pidgin
diff src/server.c @ 12849:c0fbdea8828b
[gaim-migrate @ 15199]
SF Patch #1230429 from Jean-Yves Lefort
"Block instant messages in core if a prpl does not
support privacy."
I modified this to use the gaim_privacy_check() Sadrul added a while back. I
also cleaned up the loose end, rather than leaving a function that always
returned TRUE. Finally, I added the same check to the chat invite handler.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Thu, 12 Jan 2006 06:44:23 +0000 |
parents | eda1572c788b |
children | 7dc00a9dfba5 |
line wrap: on
line diff
--- a/src/server.c Thu Jan 12 06:12:03 2006 +0000 +++ b/src/server.c Thu Jan 12 06:44:23 2006 +0000 @@ -27,6 +27,7 @@ #include "log.h" #include "notify.h" #include "prefs.h" +#include "privacy.h" #include "prpl.h" #include "request.h" #include "signals.h" @@ -440,6 +441,13 @@ g_return_if_fail(msg != NULL); account = gaim_connection_get_account(gc); + + if (GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl)->set_permit_deny == NULL) { + /* protocol does not support privacy, handle it ourselves */ + if (!gaim_privacy_check(account, who)) + return; + } + presence = gaim_account_get_presence(account); /* @@ -669,6 +677,11 @@ int plugin_return; account = gaim_connection_get_account(gc); + if (GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl)->set_permit_deny == NULL) { + /* protocol does not support privacy, handle it ourselves */ + if (!gaim_privacy_check(account, who)) + return; + } plugin_return = GPOINTER_TO_INT(gaim_signal_emit_return_1( gaim_conversations_get_handle(),