diff options
author | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-07-11 03:29:01 +0000 |
---|---|---|
committer | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2007-07-11 03:29:01 +0000 |
commit | e40a3421da567a02a69249e2486420bec3c4cc44 (patch) | |
tree | be8e8d367205bbd403a526ac14249d6b683b1b33 /MySpace/server_con.cpp | |
parent | 2bd5895ed555137017a057d83697aa0656f4d023 (diff) |
added sounds for zaps
added 'PictureComment' notification
removed known notification types from mail message debug info
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@272 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'MySpace/server_con.cpp')
-rw-r--r-- | MySpace/server_con.cpp | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/MySpace/server_con.cpp b/MySpace/server_con.cpp index c79ecd3..3d7319f 100644 --- a/MySpace/server_con.cpp +++ b/MySpace/server_con.cpp @@ -36,10 +36,6 @@ int signon_status = ID_STATUS_ONLINE; char signon_status_msg[512] = {0};
CRITICAL_SECTION write_cs;
-char *zap_array[11] = {
- "zap", "whack", "torch", "smooch", "hug", "bslap", "goose", "hi-five", "punk'd", "raspberry", 0
-};
-
bool WriteData(char *fn, int fn_size, char *data, int data_size) {
char szTempPath[MAX_PATH], szTempFileName[MAX_PATH];
@@ -508,23 +504,8 @@ void __cdecl ServerThreadFunc(void*) { CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, (LPARAM)0);
} else if(strncmp(smsg, "!!!ZAP_SEND!!!=RTE_BTN_ZAPS_", 28) == 0) {
// recvd a zap
- int zapnum = smsg[28] - '0';
- char rmsg[512];
- mir_snprintf(rmsg, 512, Translate("You received a ZAP: %s"), Translate(zap_array[zapnum]));
-
- PROTORECVEVENT pre = {0};
- pre.flags = PREF_UTF;
- pre.szMessage = rmsg;
- pre.timestamp = (DWORD)time(0);
- pre.lParam = EVENTTYPE_ZAP;
-
- CCSDATA css = {0};
- css.hContact = hContact;
- css.lParam = (LPARAM)⪯
- css.szProtoService = PSR_MESSAGE;
-
- CallService(MS_PROTO_CHAINRECV, 0, (LPARAM)&css);
-
+ int zap_num = smsg[28] - '0';
+ NotifyZapRecv(hContact, zap_num);
}
}
}
@@ -732,12 +713,24 @@ void __cdecl ServerThreadFunc(void*) { if(body.get_string("FriendRequest", b, 10)) {
NotifyFriendRequest();
}
+ if(body.get_string("PictureComment", b, 10)) {
+ NotifyPictureComment();
+ }
if(DBGetContactSettingByte(0, MODULE, "DebugMail", 0)) {
char pmsg[512];
for(LinkedList<KeyValue>::Iterator i = body.start(); i.has_val(); i.next()) {
KeyValue &kv = i.val();
- mir_snprintf(pmsg, 512, "%s = %s", kv.first.text, kv.second.text);
- PUShowMessage(pmsg, SM_NOTIFY);
+ if(
+ strcmp(kv.first.text, "BlogComment") != 0
+ && strcmp(kv.first.text, "Mail") != 0
+ && strcmp(kv.first.text, "ProfileComment") != 0
+ && strcmp(kv.first.text, "FriendRequest") != 0
+ && strcmp(kv.first.text, "PictureComment") != 0
+ && strcmp(kv.first.text, "") != 0)
+ {
+ mir_snprintf(pmsg, 512, "%s = %s", kv.first.text, kv.second.text);
+ PUShowMessage(pmsg, SM_NOTIFY);
+ }
}
}
}
|