diff options
author | Robert Pösel <robyer@seznam.cz> | 2013-05-16 20:46:27 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2013-05-16 20:46:27 +0000 |
commit | 296157204cb8c89827ee68c39f5e1783d2de7e86 (patch) | |
tree | 0f923ec1c6530e45dfc7c5e2725d2e92afe09bb2 /protocols/Omegle/src/chat.cpp | |
parent | 693b7a10ad35934e9e91656642e2c2321b27fab3 (diff) |
Omegle:
- Show in status bar when Stranger is typing
- Added option to chose language of Stranger
- Use version.h file
- Updated copyright year
- Small fixes.
- Version bump.
git-svn-id: http://svn.miranda-ng.org/main/trunk@4691 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Omegle/src/chat.cpp')
-rw-r--r-- | protocols/Omegle/src/chat.cpp | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/protocols/Omegle/src/chat.cpp b/protocols/Omegle/src/chat.cpp index 647f012b40..62a00d5174 100644 --- a/protocols/Omegle/src/chat.cpp +++ b/protocols/Omegle/src/chat.cpp @@ -3,7 +3,7 @@ Omegle plugin for Miranda Instant Messenger
_____________________________________________
-Copyright © 2011-12 Robert Pösel
+Copyright © 2011-13 Robert Pösel
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -172,11 +172,9 @@ int OmegleProto::OnChatEvent(WPARAM wParam,LPARAM lParam) break;
}
- }
+ } else switch (facy.state_) {
+ // Outgoing message
- // Outgoing message
- switch (facy.state_)
- {
case STATE_ACTIVE:
LOG("**Chat - Outgoing message: %s", text.c_str());
ForkThread(&OmegleProto::SendMsgWorker, this, (void*)new std::string(text));
@@ -402,4 +400,29 @@ void OmegleProto::ClearChat() gce.pDest = &gcd;
CallServiceSync(MS_GC_EVENT,WINDOW_CLEARLOG,reinterpret_cast<LPARAM>(&gce));
+}
+
+// TODO: Could this be done better?
+HANDLE OmegleProto::GetChatHandle()
+{
+ /*if (facy.chatHandle_ != NULL)
+ return facy.chatHandle_;
+
+ for (HANDLE hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ if (db_get_b(hContact, m_szModuleName, "ChatRoom", 0) > 0) {
+ ptrA id = db_get_sa(hContact, m_szModuleName, "ChatRoomId");
+ if (id != NULL && !strcmp(id, m_szModuleName))
+ return hContact;
+ }
+ }
+
+ return NULL;*/
+
+ GC_INFO gci = {0};
+ gci.Flags = HCONTACT;
+ gci.pszModule = m_szModuleName;
+ gci.pszID = const_cast<TCHAR*>(m_tszUserName);
+ CallService(MS_GC_GETINFO, 0, (LPARAM)(GC_INFO *) &gci);
+
+ return gci.hContact;
}
\ No newline at end of file |