diff options
author | Robert Pösel <robyer@seznam.cz> | 2015-10-20 10:13:26 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2015-10-20 10:13:26 +0000 |
commit | d49489f3467a02953b77cd5869bec5c061b63aa1 (patch) | |
tree | 114269dada3ed59e75095c999bf9b7f8d58bcd15 /protocols/Omegle/src | |
parent | 589e20f2b2d8480bad649828230bab152b13d0ed (diff) |
Omegle: Register sound when receiving message
git-svn-id: http://svn.miranda-ng.org/main/trunk@15578 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Omegle/src')
-rw-r--r-- | protocols/Omegle/src/communication.cpp | 6 | ||||
-rw-r--r-- | protocols/Omegle/src/proto.cpp | 1 |
2 files changed, 7 insertions, 0 deletions
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()
|