changeset 9741:b10d4c6ac7eb

[gaim-migrate @ 10606] (20:26:58) KingAnt: LSchiere: Can you revert it and I'll post some suggestions to the patch in the tracker? committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Thu, 12 Aug 2004 00:26:28 +0000
parents 2bb5e2cd64bd
children d549d27388b2
files src/blist.c src/privacy.c src/protocols/irc/irc.c src/protocols/irc/msgs.c src/protocols/zephyr/zephyr.c src/server.c
diffstat 6 files changed, 13 insertions(+), 166 deletions(-) [+]
line wrap: on
line diff
--- a/src/blist.c	Wed Aug 11 23:52:48 2004 +0000
+++ b/src/blist.c	Thu Aug 12 00:26:28 2004 +0000
@@ -165,7 +165,7 @@
 	return FALSE;
 }
 
-void schedule_blist_save()
+static void schedule_blist_save()
 {
 	if (blist_save_timer != 0)
 		gaim_timeout_remove(blist_save_timer);
--- a/src/privacy.c	Wed Aug 11 23:52:48 2004 +0000
+++ b/src/privacy.c	Thu Aug 12 00:26:28 2004 +0000
@@ -26,8 +26,6 @@
 #include "server.h"
 #include "util.h"
 
-extern void schedule_blist_save(void);
-
 static GaimPrivacyUiOps *privacy_ops = NULL;
 
 gboolean
@@ -60,7 +58,6 @@
 	if (privacy_ops != NULL && privacy_ops->permit_added != NULL)
 		privacy_ops->permit_added(account, who);
 
-	schedule_blist_save();
 	return TRUE;
 }
 
@@ -95,7 +92,6 @@
 	if (privacy_ops != NULL && privacy_ops->permit_removed != NULL)
 		privacy_ops->permit_removed(account, who);
 
-	schedule_blist_save();
 	return TRUE;
 }
 
@@ -129,7 +125,6 @@
 	if (privacy_ops != NULL && privacy_ops->deny_added != NULL)
 		privacy_ops->deny_added(account, who);
 
-	schedule_blist_save();
 	return TRUE;
 }
 
@@ -164,7 +159,6 @@
 	if (privacy_ops != NULL && privacy_ops->deny_removed != NULL)
 		privacy_ops->deny_removed(account, who);
 
-	schedule_blist_save();
 	return TRUE;
 }
 
--- a/src/protocols/irc/irc.c	Wed Aug 11 23:52:48 2004 +0000
+++ b/src/protocols/irc/irc.c	Thu Aug 12 00:26:28 2004 +0000
@@ -33,7 +33,6 @@
 #include "prpl.h"
 #include "plugin.h"
 #include "util.h"
-#include "privacy.h"
 
 #include "irc.h"
 
@@ -332,35 +331,6 @@
 	irc_cmd_whois(irc, "whois", NULL, args);
 }
 
-static void irc_add_deny(GaimConnection *gc, const char *who)
-{
-        gaim_privacy_deny_add(gc->account,who,1);
-}
-
-static void irc_rem_deny(GaimConnection *gc, const char *who)
-{
-        gaim_privacy_deny_remove(gc->account,who,1);
-}
-
-static void
-irc_add_permit(GaimConnection *gc, const char *who)
-{
-        gaim_privacy_permit_add(gc->account,who,1);
-}
-
-static void
-irc_rem_permit(GaimConnection *gc, const char *who)
-{
-        gaim_privacy_permit_remove(gc->account,who,1);
-}
-
-static void
-irc_set_permit_deny(GaimConnection *gc)
-{
-  /* This only has to exist */
-        return;
-}
-
 static void irc_set_away(GaimConnection *gc, const char *state, const char *msg)
 {
 	struct irc_conn *irc = gc->proto_data;
@@ -622,11 +592,11 @@
 	NULL,					/* add_buddies */
 	irc_remove_buddy,		/* remove_buddy */
 	NULL,					/* remove_buddies */
-	irc_add_permit,					/* add_permit */
-	irc_add_deny,					/* add_deny */
-	irc_rem_permit,					/* rem_permit */
-	irc_rem_deny,					/* rem_deny */
-	irc_set_permit_deny,					/* set_permit_deny */
+	NULL,					/* add_permit */
+	NULL,					/* add_deny */
+	NULL,					/* rem_permit */
+	NULL,					/* rem_deny */
+	NULL,					/* set_permit_deny */
 	NULL,					/* warn */
 	irc_chat_join,			/* join_chat */
 	NULL,					/* reject_chat */
--- a/src/protocols/irc/msgs.c	Wed Aug 11 23:52:48 2004 +0000
+++ b/src/protocols/irc/msgs.c	Thu Aug 12 00:26:28 2004 +0000
@@ -28,7 +28,6 @@
 #include "util.h"
 #include "debug.h"
 #include "irc.h"
-#include "privacy.h"
 
 #include <stdio.h>
 
@@ -847,8 +846,6 @@
 	GaimConversation *convo;
 	char *nick = irc_mask_nick(from), *tmp, *msg;
 	int notice = 0;
-	GSList* l;
-	gboolean in_deny=0;
 
 	if (!args || !args[0] || !args[1] || !gc) {
 		g_free(nick);
@@ -862,40 +859,6 @@
 		return;
 	}
 
-	 
-	switch (gc->account->perm_deny) {
-	case GAIM_PRIVACY_ALLOW_ALL: 
-		in_deny = 0; break;
-	case GAIM_PRIVACY_DENY_ALL: 
-		in_deny = 1; break;
-	case GAIM_PRIVACY_ALLOW_USERS: /* See if stripped_sender is in gc->account->permit and allow appropriately */
-		in_deny = 1;
-		for(l=gc->account->permit;l!=NULL;l=l->next) {
-			if (!gaim_utf8_strcasecmp(nick, gaim_normalize(gc->account, (char *)l->data))) {
-				in_deny=0;
-				break;
-			} 
-		}
-		break;
-	case GAIM_PRIVACY_DENY_USERS: /* See if nick is in gc->account->deny and deny if so */ 
-		in_deny = 0;
-		for(l=gc->account->deny;l!=NULL;l=l->next) {
-			if (!gaim_utf8_strcasecmp(nick, gaim_normalize(gc->account, (char *)l->data))) {
-				in_deny=1;
-				break;
-			} 
-		}
-		break;
-	case GAIM_PRIVACY_ALLOW_BUDDYLIST: 
-		in_deny = 1;
-		if (gaim_find_buddy(gc->account,nick)!=NULL) {
-			in_deny = 0;
-		}
-		break;
-	default: 
-		in_deny=0; break;
-	}
-	 
 	msg = gaim_escape_html(tmp);
 	g_free(tmp);
 
@@ -909,13 +872,9 @@
 	}
 
 	if (!gaim_utf8_strcasecmp(args[0], gaim_connection_get_display_name(gc))) {
-		if (!in_deny) {
 		serv_got_im(gc, nick, msg, 0, time(NULL));
-		}
 	} else if (notice) {
-		if(!in_deny) {
 		serv_got_im(gc, nick, msg, 0, time(NULL));
-		}
 	} else {
 		convo = gaim_find_conversation_with_account(args[0], irc->account);
 		if (convo)
--- a/src/protocols/zephyr/zephyr.c	Wed Aug 11 23:52:48 2004 +0000
+++ b/src/protocols/zephyr/zephyr.c	Thu Aug 12 00:26:28 2004 +0000
@@ -32,7 +32,6 @@
 #include "server.h"
 #include "util.h"
 #include "cmds.h"
-#include "privacy.h"
 
 #include "zephyr/zephyr.h"
 #include "internal.h"
@@ -692,51 +691,10 @@
 
 			if (!g_ascii_strcasecmp(notice.z_opcode,"PING"))
 				serv_got_typing(gc,stripped_sender,ZEPHYR_TYPING_RECV_TIMEOUT, GAIM_TYPING);
-			else {
-				GSList* l;
-				gboolean in_deny;
-					 
-				switch (gc->account->perm_deny) {
-				case GAIM_PRIVACY_ALLOW_ALL: 
-					in_deny = 0; break;
-				case GAIM_PRIVACY_DENY_ALL: 
-					in_deny = 1; break;
-				case GAIM_PRIVACY_ALLOW_USERS: /* See if stripped_sender is in gc->account->permit and allow appropriately */
-					in_deny = 1;
-					for(l=gc->account->permit;l!=NULL;l=l->next) {
-						if (!gaim_utf8_strcasecmp(stripped_sender, gaim_normalize(gc->account, (char *)l->data))) {
-							fprintf(stderr,"stripped sender %s l->data %sf\n",stripped_sender, (char *)l->data);
-							in_deny=0;
-							break;
-						} 
-					}
-					break;
-				case GAIM_PRIVACY_DENY_USERS: /* See if stripped_sender is in gc->account->deny and deny if so */ 
-					in_deny = 0;
-					for(l=gc->account->deny;l!=NULL;l=l->next) {
-						if (!gaim_utf8_strcasecmp(stripped_sender, gaim_normalize(gc->account, (char *)l->data))) {
-							fprintf(stderr,"stripped sender %s l->data %sf\n",stripped_sender, (char *)l->data);
-							in_deny=1;
-							break;
-						} 
-					}
-					break;
-				case GAIM_PRIVACY_ALLOW_BUDDYLIST: 
-					in_deny = 1;
-					if (gaim_find_buddy(gc->account,stripped_sender)!=NULL) {
-						in_deny = 0;
-					} 
-					break;
-				default: 
-					in_deny=0; break;
-				}
+			else 
+				serv_got_im(gc, stripped_sender, buf3, flags, time(NULL));
 
-				if (!in_deny) {
-					serv_got_im(gc, stripped_sender, buf3, flags, time(NULL));
-				}
-			}
 				g_free(stripped_sender);
-
 			} else {
 				zephyr_triple *zt1, *zt2;
                                 gchar *send_inst_utf8;
@@ -1773,36 +1731,6 @@
 }
 
 
-static void
-zephyr_add_deny(GaimConnection *gc, const char *who)
-{
-	gaim_privacy_deny_add(gc->account,who,1);
-}
-
-static void
-zephyr_remove_deny(GaimConnection *gc, const char *who)
-{
-	gaim_privacy_deny_remove(gc->account,who,1);
-}
-
-static void
-zephyr_add_permit(GaimConnection *gc, const char *who)
-{
-	gaim_privacy_permit_add(gc->account,who,1);
-}
-
-static void
-zephyr_remove_permit(GaimConnection *gc, const char *who)
-{
-	gaim_privacy_permit_remove(gc->account,who,1);
-}
-
-static void
-zephyr_set_permit_deny(GaimConnection *gc)
-{
-	/* This doesn't have to do anything, since really, we can just check account->perm_deny when deciding whether to di */
-	return;
-}
 static int zephyr_resubscribe(GaimConnection *gc)
 {
         /* Resubscribe to the in-memory list of subscriptions and also
@@ -1911,11 +1839,11 @@
 	NULL,					/* add_buddies */
 	NULL,					/* remove_buddy */
 	NULL,					/* remove_buddies */
-	zephyr_add_permit, /* add_permit -- not useful, since anyone can zephyr you by default*/
-	zephyr_add_deny, /* XXX add_deny  -- maybe put an auto "I'm ignoring your zephyrs*/
-	zephyr_remove_permit, /* remove_permit -- not useful, see add permit */
-	zephyr_remove_deny, /* XXX remove deny -- remove above deny, */
-	zephyr_set_permit_deny, /* ??? set permit deny */
+	NULL, /* add_permit -- not useful, since anyone can zephyr you by default*/
+	NULL, /* XXX add deny  -- maybe put an auto "I'm ignoring your zephyrs*/
+	NULL, /* remove_permit -- not useful, see add permit */
+	NULL, /* XXX remove deny -- remove above deny, */
+	NULL, /* ??? set permit deny */
 	NULL,  /* --- warn  */
 	zephyr_join_chat,		/* join_chat */
 	NULL,					/* reject_chat */
--- a/src/server.c	Wed Aug 11 23:52:48 2004 +0000
+++ b/src/server.c	Thu Aug 12 00:26:28 2004 +0000
@@ -40,8 +40,6 @@
 #include "gtkimhtml.h"
 #include "gtkutils.h"
 
-extern void schedule_blist_save(void);
-
 #define SECS_BEFORE_RESENDING_AUTORESPONSE 600
 #define SEX_BEFORE_RESENDING_AUTORESPONSE "Only after you're married"
 
@@ -658,8 +656,6 @@
 	 */
 	if (prpl_info && g_list_find(gaim_connections_get_all(), g) && prpl_info->set_permit_deny)
 		prpl_info->set_permit_deny(g);
-	
-	schedule_blist_save();
 }