diff options
author | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-07-01 16:50:43 +0000 |
---|---|---|
committer | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-07-01 16:50:43 +0000 |
commit | 7d2d0d17e720b43162433410b88ff1de7f019f38 (patch) | |
tree | d9693399fbf3ab569941b5ac1da14f70013c2f30 /MySpace/server_con.cpp | |
parent | f98ef8ff5f7c6d2485d9e627a9af67d67e846d72 (diff) |
fix 'unentitizing' formatting
unentitize nicks
try to fix missed packets again (not fixed yet)
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@235 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'MySpace/server_con.cpp')
-rw-r--r-- | MySpace/server_con.cpp | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/MySpace/server_con.cpp b/MySpace/server_con.cpp index 9f5a75d..e7eea8d 100644 --- a/MySpace/server_con.cpp +++ b/MySpace/server_con.cpp @@ -400,6 +400,23 @@ void __cdecl ServerThreadFunc(void*) { ParseStatusMessage(hContact, smsg);
}
}
+ } else if(msg.get_int("bm") == 121) { // action message
+ int uid = msg.get_int("f");
+ if(uid) {
+ HANDLE hContact = FindContact(uid);
+ if(!hContact) {
+ hContact = CreateContact(uid, 0, 0, false);
+ LookupUID(uid);
+ }
+ char smsg[1024];
+ if(msg.get_string("msg", smsg, 1024)) {
+ if(strcmp(smsg, "%typing%") == 0)
+ CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, (LPARAM)5);
+ else if(strcmp(smsg, "%stoptyping%") == 0) {
+ CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, (LPARAM)0);
+ }
+ }
+ }
} else if(msg.get_int("bm") == 1) { // instant message
int uid = msg.get_int("f");
if(uid) {
@@ -443,10 +460,13 @@ void __cdecl ServerThreadFunc(void*) { if(uid != 0) {
MYPROTOSEARCHRESULT mpsr = {sizeof(mpsr)};
- if(body.get_string("UserName", nick, 256))
+ if(body.get_string("UserName", nick, 256)) {
+ unentitize(nick);
mpsr.psr.nick = nick;
- else if(body.get_string("DisplayName", nick, 256))
+ } else if(body.get_string("DisplayName", nick, 256)) {
+ unentitize(nick);
mpsr.psr.nick = nick;
+ }
if(body.get_string("Email", email, 256))
mpsr.psr.email = email;
mpsr.uid = uid;
@@ -468,10 +488,13 @@ void __cdecl ServerThreadFunc(void*) { if(uid != 0) {
MYPROTOSEARCHRESULT mpsr = {sizeof(mpsr)};
- if(body.get_string("DisplayName", nick, 256))
+ if(body.get_string("DisplayName", nick, 256)) {
+ unentitize(nick);
mpsr.psr.nick = nick;
- else if(body.get_string("UserName", nick, 256))
+ } else if(body.get_string("UserName", nick, 256)) {
+ unentitize(nick);
mpsr.psr.nick = nick;
+ }
if(body.get_string("Email", email, 256))
mpsr.psr.email = email;
@@ -500,6 +523,7 @@ void __cdecl ServerThreadFunc(void*) { int uid = body.get_int("ContactID");
if(uid != 0) {
if(body.get_string("NickName", nick, 256)) {
+ unentitize(nick);
DBWriteContactSettingStringUtf(0, MODULE, "Nick", nick);
}
}
@@ -516,7 +540,7 @@ void __cdecl ServerThreadFunc(void*) { }
}
}
- pbuff = end + 1;
+ pbuff = end;
}
}
}
|