[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/modules/msn2/libmsn2 msn_core.C,1.12,1.13 msn
From: |
Colin Leroy <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/modules/msn2/libmsn2 msn_core.C,1.12,1.13 msn_core.h,1.3,1.4 msn_interface.C,1.2,1.3 msn_interface.h,1.2,1.3 |
Date: |
Wed, 15 Jan 2003 06:55:54 -0500 |
Update of /cvsroot/ayttm/ayttm/modules/msn2/libmsn2
In directory subversions:/tmp/cvs-serv3729/modules/msn2/libmsn2
Modified Files:
msn_core.C msn_core.h msn_interface.C msn_interface.h
Log Message:
Update server-side friends' list
when moving a contact between groups
Index: msn_core.C
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/msn2/libmsn2/msn_core.C,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- msn_core.C 14 Jan 2003 15:38:48 -0000 1.12
+++ msn_core.C 15 Jan 2003 11:55:50 -0000 1.13
@@ -344,7 +344,11 @@
}
}
}
-
+
+ if(!strcmp(args[0], "LSG"))
+ {
+ ext_got_group(args[5], msn_decode_URL(args[6]));
+ }
if(!strcmp(args[0], "GTC"))
{
info->gtc=args[3][0];
@@ -742,7 +746,12 @@
msn_handle_OUT(conn, args, numargs);
return;
}
-
+
+ if(!strcmp(args[0], "ADG"))
+ {
+ ext_got_group(args[4], msn_decode_URL(args[3]));
+ }
+
if(isdigit(args[0][0]))
{
msn_show_verbose_error(conn, atoi(args[0]));
@@ -1439,6 +1448,7 @@
void msn_handle_ADD(msnconn * conn, char ** args, int numargs)
{
+ if (numargs == 7) return; /* group add */
if(!strcmp(args[2], "RL"))
{
printf("Via ADD:\n");
@@ -1451,6 +1461,7 @@
void msn_handle_REM(msnconn * conn, char ** args, int numargs)
{
+ if (numargs == 6) return; /* group change */
ext_del_list_entry(conn, args[2], args[4]);
ext_latest_serial(conn, atoi(args[3]));
}
@@ -1805,25 +1816,28 @@
next_trid++;
}
-/*
-void msn_connect_3(msnconn * conn, char ** args, int numargs, callback_data *
data)
-{
- connectinfo * info;
-
- info=(connectinfo *)data;
- msn_del_callback(conn, trid);
- trid++;
-
- if(isdigit(args[0][0]))
- {
- msn_print_verbose_error(conn, atoi(args[0]));
- delete info;
- return;
- }
-
- sprintf(buf, "INF %d\r\n", trid, info->username);
- write(conn.sock, buf, strlen(buf));
-
- msn_add_callback(conn, msn_connect_4, trid, data);
+void msn_add_group(msnconn *conn, char *newgroup) {
+ if (newgroup == NULL) {
+ printf("Groupname is null !\n");
+ return;
+ }
+
+ sprintf(buf, "ADG %d %s 0\r\n", next_trid, msn_encode_URL(newgroup));
+ write(conn->sock, buf, strlen(buf));
+ next_trid++;
+}
+
+void msn_change_group(msnconn *conn, char *handle, char *oldgroup, char
*newgroup) {
+ if (newgroup == NULL) {
+ printf("Group doesn't exist !\n");
+ return;
+ }
+ sprintf(buf, "ADD %d FL %s %s %s\r\n", next_trid, handle, handle,
newgroup);
+ write(conn->sock, buf, strlen(buf));
+ next_trid++;
+ if (oldgroup != NULL) {
+ sprintf(buf, "REM %d FL %s %s\r\n", next_trid, handle,
oldgroup);
+ write(conn->sock, buf, strlen(buf));
+ next_trid++;
+ }
}
-*/
Index: msn_core.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/msn2/libmsn2/msn_core.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- msn_core.h 4 Jan 2003 21:24:26 -0000 1.3
+++ msn_core.h 15 Jan 2003 11:55:50 -0000 1.4
@@ -330,4 +330,7 @@
// Connecting to switchboards:
void msn_SB_ans(msnconn * conn, int trid, char ** args, int numargs,
callback_data * data);
+void msn_add_group(msnconn *conn, char *newgroup);
+void msn_change_group(msnconn *conn, char *handle, char *oldgroup, char
*newgroup);
+
#endif // MSN_CORE_H
Index: msn_interface.C
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/msn2/libmsn2/msn_interface.C,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- msn_interface.C 9 Jan 2003 10:14:08 -0000 1.2
+++ msn_interface.C 15 Jan 2003 11:55:50 -0000 1.3
@@ -402,3 +402,8 @@
return inet_ntoa( *((struct in_addr*)hn->h_addr));
}
+
+void ext_got_group(char *id, char *name)
+{
+ printf("got group id %s, %s\n",id,name);
+}
Index: msn_interface.h
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/msn2/libmsn2/msn_interface.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- msn_interface.h 9 Jan 2003 10:14:08 -0000 1.2
+++ msn_interface.h 15 Jan 2003 11:55:50 -0000 1.3
@@ -85,3 +85,5 @@
void ext_update_local_contact(char *c);
void ext_disable_conncheck(void);
+
+void ext_got_group(char *id, char *name);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/modules/msn2/libmsn2 msn_core.C,1.12,1.13 msn_core.h,1.3,1.4 msn_interface.C,1.2,1.3 msn_interface.h,1.2,1.3,
Colin Leroy <address@hidden> <=
- Prev by Date:
[Ayttm-commits] CVS: ayttm ChangeLog,1.117,1.118 configure.in,1.114,1.115
- Next by Date:
[Ayttm-commits] CVS: ayttm/modules/yahoo2/libyahoo2 libyahoo2.c,1.2,1.3 yahoo2.h,1.1.1.1,1.2 yahoo2_callbacks.h,1.1.1.1,1.2 yahoo_util.c,1.1.1.1,1.2 yahoo_util.h,1.1.1.1,1.2
- Previous by thread:
[Ayttm-commits] CVS: ayttm ChangeLog,1.117,1.118 configure.in,1.114,1.115
- Next by thread:
[Ayttm-commits] CVS: ayttm/modules/yahoo2/libyahoo2 libyahoo2.c,1.2,1.3 yahoo2.h,1.1.1.1,1.2 yahoo2_callbacks.h,1.1.1.1,1.2 yahoo_util.c,1.1.1.1,1.2 yahoo_util.h,1.1.1.1,1.2
- Index(es):