From d49489f3467a02953b77cd5869bec5c061b63aa1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Tue, 20 Oct 2015 10:13:26 +0000 Subject: Omegle: Register sound when receiving message git-svn-id: http://svn.miranda-ng.org/main/trunk@15578 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Omegle/src/communication.cpp | 6 ++++++ protocols/Omegle/src/proto.cpp | 1 + 2 files changed, 7 insertions(+) (limited to 'protocols/Omegle/src') diff --git a/protocols/Omegle/src/communication.cpp b/protocols/Omegle/src/communication.cpp index 428d4a8cc4..3170b934c0 100644 --- a/protocols/Omegle/src/communication.cpp +++ b/protocols/Omegle/src/communication.cpp @@ -573,6 +573,9 @@ bool Omegle_client::events() pos = 0; while ( (pos = resp.data.find( "[\"gotMessage\",", pos )) != std::string::npos ) { + // Play sound as we received message + SkinPlaySound("StrangerMessage"); + pos += 15; std::string message = utils::text::trim( @@ -591,6 +594,9 @@ bool Omegle_client::events() pos = 0; while ( (pos = resp.data.find( "[\"spyMessage\",", pos )) != std::string::npos ) { + // Play sound as we received message + SkinPlaySound("StrangerMessage"); + pos += 15; std::string message = resp.data.substr(pos, resp.data.find("\"]", pos) - pos); diff --git a/protocols/Omegle/src/proto.cpp b/protocols/Omegle/src/proto.cpp index 3cb3bb9d2a..22061ba1bb 100644 --- a/protocols/Omegle/src/proto.cpp +++ b/protocols/Omegle/src/proto.cpp @@ -61,6 +61,7 @@ OmegleProto::OmegleProto(const char* proto_name, const TCHAR* username) : SkinAddNewSoundExT("StrangerTyp", m_tszUserName, LPGENT("Stranger typing")); SkinAddNewSoundExT("StrangerTypStop", m_tszUserName, LPGENT("Stranger stopped typing")); SkinAddNewSoundExT("StrangerChange", m_tszUserName, LPGENT("Changing stranger")); + SkinAddNewSoundExT("StrangerMessage", m_tszUserName, LPGENT("Receive message")); } OmegleProto::~OmegleProto() -- cgit v1.2.3