ayttm-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ayttm-commits] CVS: ayttm/modules/aim-toc/libtoc libtoc.c,1.14,1.15


From: Colin Leroy <address@hidden>
Subject: [Ayttm-commits] CVS: ayttm/modules/aim-toc/libtoc libtoc.c,1.14,1.15
Date: Thu, 27 Mar 2003 11:49:26 -0500

Update of /cvsroot/ayttm/ayttm/modules/aim-toc/libtoc
In directory subversions:/tmp/cvs-serv1825/modules/aim-toc/libtoc

Modified Files:
        libtoc.c 
Log Message:
allow contacts to see us online
(crash.c: add SIGTRAP)



Index: libtoc.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/aim-toc/libtoc/libtoc.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- libtoc.c    27 Mar 2003 14:15:15 -0000      1.14
+++ libtoc.c    27 Mar 2003 16:49:23 -0000      1.15
@@ -660,6 +660,16 @@
 
        
 }
+
+void toc_accept_user(toc_conn *conn, char *user)
+{
+       char buff2[1024];
+       g_snprintf(buff2, 2048, "toc2_add_permit %s", aim_normalize(user));
+       send_flap(conn, DATA, buff2);
+       g_snprintf(buff2, 2048, "toc2_remove_deny %s", aim_normalize(user));
+       send_flap(conn, DATA, buff2);
+}
+
 char * get_flap(toc_conn * conn )
 {
        static char buff[8192];
@@ -1174,6 +1184,17 @@
                        toc_error_message(message);
                }
        }
+       else if (!strcmp(c,"YOU_WERE_ADDED2"))
+       {
+               char nick[200];
+               for(j=0; buff[i] != ':' && j < 200; i++, j++ )
+               {
+                       nick[j] = buff[i];
+               }
+               nick[j] = '\0';
+               i++;
+               toc_accept_user(conn, nick);
+       }
        else if(!strcmp(c, "ERROR"))
        {
                toc_error_message(parse_error(buff+6));
@@ -1410,6 +1431,11 @@
                send_flap(conn, DATA, buff2);
        }
 
+       for( node = list; node; node=node->next )
+       {
+               char * handle = node->data;
+               toc_accept_user(conn, handle);
+       }
 }
 
 void toc_add_buddy( toc_conn * conn, char * user, char * group )





reply via email to

[Prev in Thread] Current Thread [Next in Thread]