diff options
author | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-07-01 03:31:49 +0000 |
---|---|---|
committer | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-07-01 03:31:49 +0000 |
commit | 1f6d928c10d931beadb241358ef4cb1830165f56 (patch) | |
tree | 609056b509e0a28e0053cec109f28caad53ab287 /MySpace/server_con.cpp | |
parent | 4f0eead6f5e272fe997f88a8ff2a8845a54c4580 (diff) |
another fix for packet reading :|
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@226 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'MySpace/server_con.cpp')
-rw-r--r-- | MySpace/server_con.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/MySpace/server_con.cpp b/MySpace/server_con.cpp index a98a8f0..35e7da1 100644 --- a/MySpace/server_con.cpp +++ b/MySpace/server_con.cpp @@ -86,7 +86,7 @@ int LookupUID(int uid) { return ret;
}
-HANDLE CreateContact(int uid, char *nick, char *email) {
+HANDLE CreateContact(int uid, char *nick, char *email, bool add_buddy) {
HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_ADD, 0, 0);
if(hContact) {
@@ -99,13 +99,15 @@ HANDLE CreateContact(int uid, char *nick, char *email) { }
- ClientNetMessage msg_add;
- msg_add.add_string("addbuddy", "");
- msg_add.add_int("sesskey", sesskey);
- msg_add.add_int("newprofileid", uid);
- msg_add.add_string("reason", "");
+ if(add_buddy) {
+ ClientNetMessage msg_add;
+ msg_add.add_string("addbuddy", "");
+ msg_add.add_int("sesskey", sesskey);
+ msg_add.add_int("newprofileid", uid);
+ msg_add.add_string("reason", "");
- SendMessage(msg_add);
+ SendMessage(msg_add);
+ }
/*
ClientNetMessage msg_block;
@@ -379,7 +381,7 @@ void __cdecl ServerThreadFunc(void*) { if(uid) {
HANDLE hContact = FindContact(uid);
if(!hContact) {
- hContact = CreateContact(uid, 0, 0);
+ hContact = CreateContact(uid, 0, 0, false);
LookupUID(uid);
}
char smsg[1024];
@@ -392,7 +394,7 @@ void __cdecl ServerThreadFunc(void*) { if(uid) {
HANDLE hContact = FindContact(uid);
if(!hContact) {
- hContact = CreateContact(uid, 0, 0);
+ hContact = CreateContact(uid, 0, 0, true);
LookupUID(uid);
}
char text[MAX_MESSAGE_SIZE];
@@ -500,7 +502,7 @@ void __cdecl ServerThreadFunc(void*) { }
}
}
- pbuff = end;
+ pbuff = end + 1;
}
}
}
|