diff options
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;
}
}
}
|