changeset 16662:fc39fa0afdc8

Cause Psychic Mode to obey privacy settings when apprpriate. Thanks to "a synx" for this patch.
author Ethan Blanton <elb@pidgin.im>
date Sun, 29 Apr 2007 22:05:02 +0000
parents e2fc81093e88
children 5e6f8b92a2a5 7bb4bc24b14e
files libpurple/plugins/psychic.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/plugins/psychic.c	Sun Apr 29 19:47:08 2007 +0000
+++ b/libpurple/plugins/psychic.c	Sun Apr 29 22:05:02 2007 +0000
@@ -9,6 +9,7 @@
 #include "signals.h"
 #include "status.h"
 #include "version.h"
+#include "privacy.h"
 
 #include "plugin.h"
 #include "pluginpref.h"
@@ -47,6 +48,11 @@
     return;
   }
 
+  if(FALSE == purple_privacy_check(acct, name)) {
+    purple_debug_info("psychic", "user %s is blocked", name);
+    return;
+  }
+
   gconv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, name, acct);
   if(! gconv) {
     purple_debug_info("psychic", "no previous conversation exists\n");