changeset 1277:ba196bf5c4cd

[gaim-migrate @ 1287] More fun for the whole family. Permit and deny stuff works. Sorta. committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Thu, 14 Dec 2000 19:31:51 +0000
parents 3e19d163fc45
children b319e507a36a
files STATUS plugins/msn/msn.c
diffstat 2 files changed, 30 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/STATUS	Thu Dec 14 18:55:30 2000 +0000
+++ b/STATUS	Thu Dec 14 19:31:51 2000 +0000
@@ -1,4 +1,4 @@
-STATUS of GAIM CVS tree. Last modified $Date: 2000-12-14 13:54:40 -0500 (Thu, 14 Dec 2000) $ by $Author: robflynn $.
+STATUS of GAIM CVS tree. Last modified $Date: 2000-12-14 14:31:51 -0500 (Thu, 14 Dec 2000) $ by $Author: robflynn $.
 
 This file is meant to provide gaim users who use the CVS version to see whether
 they actually want to compile what they just checked out. Gaim CVS is usually
@@ -99,10 +99,10 @@
 ===
 
 MSN currently supports signing on/off, sending and receiving messages.  The
-buddylist is functional. When sending the initial message (to start a
-conversation) there will be a small delay.  It will appear as if the
-client has frozen.  This will not always be the case.  I have a fix
-that I havent taken the time to write yet.
+buddylist is functional. It also supports permit and deny lists.  When sending 
+the initial message (to start a conversation) there will be a small delay.  It 
+will appear as if the client has frozen.  This will not always be the case.  
+I have a fix that I havent taken the time to write yet.
 
 
 ICQ
--- a/plugins/msn/msn.c	Thu Dec 14 18:55:30 2000 +0000
+++ b/plugins/msn/msn.c	Thu Dec 14 19:31:51 2000 +0000
@@ -40,6 +40,9 @@
 
 #define MSN_BUF_LEN 4096
 
+#define MSN_OPT_SERVER   0
+#define MSN_OPT_PORT     1
+
 #define MIME_HEADER "MIME-Version: 1.0\r\nContent-Type: text/plain; charset=UTF-8\r\nX-MMS-IM-Format: FN=MS%20Sans%20Serif; EF=; CO=0; CS=0; PF=0\r\n\r\n"
 
 #define MSN_ONLINE  1
@@ -185,6 +188,24 @@
 	write(mdata->fd, buf, strlen(buf));
 }
 
+static void msn_rem_deny(struct gaim_connection *gc, char *who) {
+	struct msn_data *mdata = (struct msn_data *)gc->proto_data;
+	time_t trId = time((time_t *)NULL);
+	gchar buf[4096];
+
+	g_snprintf(buf, 4096, "REM %d BL %s %s\n", trId, who, who);
+	write(mdata->fd, buf, strlen(buf));
+}
+
+static void msn_add_deny(struct gaim_connection *gc, char *who) {
+	struct msn_data *mdata = (struct msn_data *)gc->proto_data;
+	time_t trId = time((time_t *)NULL);
+	gchar buf[4096];
+
+	g_snprintf(buf, 4096, "ADD %d BL %s %s\n", trId, who, who);
+	write(mdata->fd, buf, strlen(buf));
+}
+
 static void msn_remove_buddy(struct gaim_connection *gc, char *who) {
 	struct msn_data *mdata = (struct msn_data *)gc->proto_data;
 	time_t trId = time((time_t *)NULL);
@@ -690,7 +711,7 @@
 	g_free(buf);
 }
 
-void msn_close (struct gaim_connection *gc) {
+static void msn_close (struct gaim_connection *gc) {
 	struct msn_data *mdata = (struct msn_data *)gc->proto_data;
 	GSList *conns = msn_connections;
 	struct msn_conn *mc = NULL;
@@ -755,7 +776,8 @@
 	ret->remove_buddy = msn_remove_buddy;
 	ret->add_permit = msn_add_permit;
 	ret->rem_permit = msn_rem_permit;
-	ret->add_deny = NULL;
+	ret->add_deny = msn_add_deny;
+	ret->rem_deny = msn_rem_deny;
 	ret->warn = NULL;
 	ret->accept_chat = NULL;
 	ret->join_chat = NULL;
@@ -778,3 +800,4 @@
 	if (p == my_protocol)
 		unload_protocol(p);
 }
+