diff options
42 files changed, 2 insertions, 3000 deletions
diff --git a/bin15/mir_full.sln b/bin15/mir_full.sln index e7f7e9f6f9..0d326a89e2 100644 --- a/bin15/mir_full.sln +++ b/bin15/mir_full.sln @@ -126,8 +126,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ClientChangeNotify", "..\pl EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ListeningTo", "..\plugins\ListeningTo\listeningto.vcxproj", "{5FAA475D-0593-454F-8601-0D7150DCA4A0}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Omegle", "..\protocols\Omegle\omegle.vcxproj", "{D5E2FEC1-B29A-476C-BD41-469FE282EE0F}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RecentContacts", "..\plugins\RecentContacts\RecentContacts.vcxproj", "{07137F45-8B5F-4561-BEC8-B883E9123785}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Twitter", "..\protocols\Twitter\twitter.vcxproj", "{12FFF2B0-0D0B-430B-A4C6-1577CA98F598}"
@@ -933,14 +931,6 @@ Global {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|Win32.Build.0 = Release|Win32
{5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|x64.ActiveCfg = Release|x64
{5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|x64.Build.0 = Release|x64
- {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|Win32.ActiveCfg = Debug|Win32
- {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|Win32.Build.0 = Debug|Win32
- {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|x64.ActiveCfg = Debug|x64
- {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|x64.Build.0 = Debug|x64
- {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|Win32.ActiveCfg = Release|Win32
- {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|Win32.Build.0 = Release|Win32
- {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|x64.ActiveCfg = Release|x64
- {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|x64.Build.0 = Release|x64
{07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|Win32.ActiveCfg = Debug|Win32
{07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|Win32.Build.0 = Debug|Win32
{07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|x64.ActiveCfg = Debug|x64
@@ -2067,7 +2057,6 @@ Global {E37561EB-B9C5-4215-9FF9-DB559916FBA2} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9}
{A9265E36-7F2D-440C-BF3E-F447FDB6200F} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9}
{6A1969EA-9657-4828-93E0-8D21A970F868} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9}
- {D5E2FEC1-B29A-476C-BD41-469FE282EE0F} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2}
{07137F45-8B5F-4561-BEC8-B883E9123785} = {F9C41695-3353-4564-A154-58106829B19C}
{12FFF2B0-0D0B-430B-A4C6-1577CA98F598} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2}
{D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55}
diff --git a/bin15/mir_icons.sln b/bin15/mir_icons.sln index 2fabdbffa2..873b85b3aa 100644 --- a/bin15/mir_icons.sln +++ b/bin15/mir_icons.sln @@ -22,8 +22,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xStatus_Jabber", "..\protoc EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HistoryPP_icons", "..\plugins\HistoryPlusPlus\historypp_icons\HistoryPP_icons.vcxproj", "{B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Omegle", "..\protocols\Omegle\proto_omegle\omegle_icons.vcxproj", "{C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TabSRMM_icons", "..\plugins\TabSRMM\TabSRMM_icons\NOVA\ICONS_NOVA_15.vcxproj", "{F553F140-B7D3-4984-90B1-00D4831B8A6E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_mRadio", "..\plugins\mRadio\proto_mradio\Proto_mRadio.vcxproj", "{2BCC460C-E7C0-4AA8-B680-B9DE561A8408}"
@@ -152,14 +150,6 @@ Global {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|Win32.Build.0 = Release|Win32
{B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|x64.ActiveCfg = Release|x64
{B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|x64.Build.0 = Release|x64
- {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|Win32.ActiveCfg = Debug|Win32
- {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|Win32.Build.0 = Debug|Win32
- {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|x64.ActiveCfg = Debug|x64
- {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|x64.Build.0 = Debug|x64
- {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|Win32.ActiveCfg = Release|Win32
- {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|Win32.Build.0 = Release|Win32
- {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|x64.ActiveCfg = Release|x64
- {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|x64.Build.0 = Release|x64
{F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|Win32.ActiveCfg = Debug|Win32
{F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|Win32.Build.0 = Debug|Win32
{F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|x64.ActiveCfg = Debug|x64
diff --git a/bin16/mir_full.sln b/bin16/mir_full.sln index 2f7bf9e487..865cb44c89 100644 --- a/bin16/mir_full.sln +++ b/bin16/mir_full.sln @@ -126,8 +126,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ClientChangeNotify", "..\pl EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ListeningTo", "..\plugins\ListeningTo\listeningto.vcxproj", "{5FAA475D-0593-454F-8601-0D7150DCA4A0}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Omegle", "..\protocols\Omegle\omegle.vcxproj", "{D5E2FEC1-B29A-476C-BD41-469FE282EE0F}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RecentContacts", "..\plugins\RecentContacts\RecentContacts.vcxproj", "{07137F45-8B5F-4561-BEC8-B883E9123785}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Twitter", "..\protocols\Twitter\twitter.vcxproj", "{12FFF2B0-0D0B-430B-A4C6-1577CA98F598}"
@@ -933,14 +931,6 @@ Global {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|Win32.Build.0 = Release|Win32
{5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|x64.ActiveCfg = Release|x64
{5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|x64.Build.0 = Release|x64
- {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|Win32.ActiveCfg = Debug|Win32
- {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|Win32.Build.0 = Debug|Win32
- {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|x64.ActiveCfg = Debug|x64
- {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|x64.Build.0 = Debug|x64
- {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|Win32.ActiveCfg = Release|Win32
- {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|Win32.Build.0 = Release|Win32
- {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|x64.ActiveCfg = Release|x64
- {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|x64.Build.0 = Release|x64
{07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|Win32.ActiveCfg = Debug|Win32
{07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|Win32.Build.0 = Debug|Win32
{07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|x64.ActiveCfg = Debug|x64
@@ -2067,7 +2057,6 @@ Global {E37561EB-B9C5-4215-9FF9-DB559916FBA2} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9}
{A9265E36-7F2D-440C-BF3E-F447FDB6200F} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9}
{6A1969EA-9657-4828-93E0-8D21A970F868} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9}
- {D5E2FEC1-B29A-476C-BD41-469FE282EE0F} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2}
{07137F45-8B5F-4561-BEC8-B883E9123785} = {F9C41695-3353-4564-A154-58106829B19C}
{12FFF2B0-0D0B-430B-A4C6-1577CA98F598} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2}
{D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55}
diff --git a/bin16/mir_icons.sln b/bin16/mir_icons.sln index 9369ad9c06..8e7a14c662 100644 --- a/bin16/mir_icons.sln +++ b/bin16/mir_icons.sln @@ -22,8 +22,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xStatus_Jabber", "..\protoc EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HistoryPP_icons", "..\plugins\HistoryPlusPlus\historypp_icons\HistoryPP_icons.vcxproj", "{B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Omegle", "..\protocols\Omegle\proto_omegle\omegle_icons.vcxproj", "{C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TabSRMM_icons", "..\plugins\TabSRMM\TabSRMM_icons\NOVA\ICONS_NOVA_16.vcxproj", "{F553F140-B7D3-4984-90B1-00D4831B8A6E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_mRadio", "..\plugins\mRadio\proto_mradio\Proto_mRadio.vcxproj", "{2BCC460C-E7C0-4AA8-B680-B9DE561A8408}"
@@ -152,14 +150,6 @@ Global {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|Win32.Build.0 = Release|Win32
{B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|x64.ActiveCfg = Release|x64
{B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|x64.Build.0 = Release|x64
- {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|Win32.ActiveCfg = Debug|Win32
- {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|Win32.Build.0 = Debug|Win32
- {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|x64.ActiveCfg = Debug|x64
- {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|x64.Build.0 = Debug|x64
- {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|Win32.ActiveCfg = Release|Win32
- {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|Win32.Build.0 = Release|Win32
- {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|x64.ActiveCfg = Release|x64
- {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|x64.Build.0 = Release|x64
{F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|Win32.ActiveCfg = Debug|Win32
{F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|Win32.Build.0 = Debug|Win32
{F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|x64.ActiveCfg = Debug|x64
diff --git a/bin17/mir_full.sln b/bin17/mir_full.sln index 0d95180118..ca608abb64 100644 --- a/bin17/mir_full.sln +++ b/bin17/mir_full.sln @@ -126,8 +126,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ClientChangeNotify", "..\pl EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ListeningTo", "..\plugins\ListeningTo\listeningto.vcxproj", "{5FAA475D-0593-454F-8601-0D7150DCA4A0}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Omegle", "..\protocols\Omegle\omegle.vcxproj", "{D5E2FEC1-B29A-476C-BD41-469FE282EE0F}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RecentContacts", "..\plugins\RecentContacts\RecentContacts.vcxproj", "{07137F45-8B5F-4561-BEC8-B883E9123785}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Twitter", "..\protocols\Twitter\twitter.vcxproj", "{12FFF2B0-0D0B-430B-A4C6-1577CA98F598}"
@@ -933,14 +931,6 @@ Global {5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|Win32.Build.0 = Release|Win32
{5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|x64.ActiveCfg = Release|x64
{5FAA475D-0593-454F-8601-0D7150DCA4A0}.Release|x64.Build.0 = Release|x64
- {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|Win32.ActiveCfg = Debug|Win32
- {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|Win32.Build.0 = Debug|Win32
- {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|x64.ActiveCfg = Debug|x64
- {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Debug|x64.Build.0 = Debug|x64
- {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|Win32.ActiveCfg = Release|Win32
- {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|Win32.Build.0 = Release|Win32
- {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|x64.ActiveCfg = Release|x64
- {D5E2FEC1-B29A-476C-BD41-469FE282EE0F}.Release|x64.Build.0 = Release|x64
{07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|Win32.ActiveCfg = Debug|Win32
{07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|Win32.Build.0 = Debug|Win32
{07137F45-8B5F-4561-BEC8-B883E9123785}.Debug|x64.ActiveCfg = Debug|x64
@@ -2067,7 +2057,6 @@ Global {E37561EB-B9C5-4215-9FF9-DB559916FBA2} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9}
{A9265E36-7F2D-440C-BF3E-F447FDB6200F} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9}
{6A1969EA-9657-4828-93E0-8D21A970F868} = {703CFA44-C8E8-4547-B597-AE239F4F6DD9}
- {D5E2FEC1-B29A-476C-BD41-469FE282EE0F} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2}
{07137F45-8B5F-4561-BEC8-B883E9123785} = {F9C41695-3353-4564-A154-58106829B19C}
{12FFF2B0-0D0B-430B-A4C6-1577CA98F598} = {A035B524-0F2D-45D0-BCF2-3C20279C77E2}
{D85D47E7-EAD3-71E0-EE3A-49A7821D4DE4} = {D8EA3AE1-64AA-42ED-9F13-83F6C7B5AA55}
diff --git a/bin17/mir_icons.sln b/bin17/mir_icons.sln index 3a23b0485b..de2f2b3def 100644 --- a/bin17/mir_icons.sln +++ b/bin17/mir_icons.sln @@ -22,8 +22,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xStatus_Jabber", "..\protoc EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HistoryPP_icons", "..\plugins\HistoryPlusPlus\historypp_icons\HistoryPP_icons.vcxproj", "{B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_Omegle", "..\protocols\Omegle\proto_omegle\omegle_icons.vcxproj", "{C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TabSRMM_icons", "..\plugins\TabSRMM\TabSRMM_icons\NOVA\ICONS_NOVA_17.vcxproj", "{F553F140-B7D3-4984-90B1-00D4831B8A6E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Proto_mRadio", "..\plugins\mRadio\proto_mradio\Proto_mRadio.vcxproj", "{2BCC460C-E7C0-4AA8-B680-B9DE561A8408}"
@@ -152,14 +150,6 @@ Global {B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|Win32.Build.0 = Release|Win32
{B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|x64.ActiveCfg = Release|x64
{B2E0D5C5-D418-4962-812A-FBC5C7FFC4B6}.Release|x64.Build.0 = Release|x64
- {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|Win32.ActiveCfg = Debug|Win32
- {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|Win32.Build.0 = Debug|Win32
- {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|x64.ActiveCfg = Debug|x64
- {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Debug|x64.Build.0 = Debug|x64
- {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|Win32.ActiveCfg = Release|Win32
- {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|Win32.Build.0 = Release|Win32
- {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|x64.ActiveCfg = Release|x64
- {C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}.Release|x64.Build.0 = Release|x64
{F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|Win32.ActiveCfg = Debug|Win32
{F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|Win32.Build.0 = Debug|Win32
{F553F140-B7D3-4984-90B1-00D4831B8A6E}.Debug|x64.ActiveCfg = Debug|x64
diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp index c056d2220e..035a502159 100644 --- a/plugins/PluginUpdater/src/DlgUpdate.cpp +++ b/plugins/PluginUpdater/src/DlgUpdate.cpp @@ -557,6 +557,7 @@ static renameTable[] = { L"msvcp100.dll", nullptr },
{ L"msvcr100.dll", nullptr },
{ L"mtextcontrol.dll", nullptr },
+ { L"omegle.dll", nullptr },
{ L"openssl.dll", nullptr },
{ L"rate.dll", nullptr },
{ L"sms.dll", nullptr },
diff --git a/protocols/Omegle/CMakeLists.txt b/protocols/Omegle/CMakeLists.txt deleted file mode 100644 index 0a4459825e..0000000000 --- a/protocols/Omegle/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -file(GLOB SOURCES "src/*.h" "src/*.cpp" "res/*.rc" "${CMAKE_SOURCE_DIR}/utils/std_string_utils.cpp") -set(TARGET Omegle) -include(${CMAKE_SOURCE_DIR}/cmake/plugin.cmake) -add_subdirectory(proto_omegle)
\ No newline at end of file diff --git a/protocols/Omegle/omegle.vcxproj b/protocols/Omegle/omegle.vcxproj deleted file mode 100644 index 46a0270295..0000000000 --- a/protocols/Omegle/omegle.vcxproj +++ /dev/null @@ -1,60 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{D5E2FEC1-B29A-476C-BD41-469FE282EE0F}</ProjectGuid>
- <ProjectName>Omegle</ProjectName>
- </PropertyGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(ProjectDir)..\..\build\vc.common\plugin.props" />
- </ImportGroup>
- <ItemGroup>
- <ClCompile Include="src\chat.cpp" />
- <ClCompile Include="src\communication.cpp" />
- <ClCompile Include="src\connection.cpp" />
- <ClCompile Include="src\dialogs.cpp" />
- <ClCompile Include="src\main.cpp" />
- <ClCompile Include="src\messages.cpp" />
- <ClCompile Include="src\proto.cpp" />
- <ClCompile Include="src\stdafx.cxx">
- <PrecompiledHeader>Create</PrecompiledHeader>
- </ClCompile>
- <ClCompile Include="src\theme.cpp" />
- <ClInclude Include="src\client.h" />
- <ClInclude Include="src\constants.h" />
- <ClInclude Include="src\db.h" />
- <ClInclude Include="src\dialogs.h" />
- <ClInclude Include="src\http.h" />
- <ClInclude Include="src\proto.h" />
- <ClInclude Include="src\resource.h" />
- <ClInclude Include="src\stdafx.h" />
- <ClInclude Include="src\theme.h" />
- <ClInclude Include="src\version.h" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="..\..\utils\std_string_utils.cpp">
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="res\omegle.rc" />
- <ResourceCompile Include="res\version.rc" />
- </ItemGroup>
-</Project>
\ No newline at end of file diff --git a/protocols/Omegle/omegle.vcxproj.filters b/protocols/Omegle/omegle.vcxproj.filters deleted file mode 100644 index 9cb79f92b5..0000000000 --- a/protocols/Omegle/omegle.vcxproj.filters +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(ProjectDir)..\..\build\vc.common\common.filters" />
- <ItemGroup>
- <ClCompile Include="src\chat.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\communication.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\connection.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\dialogs.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\main.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\messages.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\proto.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\stdafx.cxx">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\theme.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\..\utils\std_string_utils.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="src\client.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\constants.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\db.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\dialogs.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\http.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\proto.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\resource.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\stdafx.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\theme.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\version.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="res\omegle.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- <ResourceCompile Include="res\version.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
-</Project>
\ No newline at end of file diff --git a/protocols/Omegle/proto_omegle/CMakeLists.txt b/protocols/Omegle/proto_omegle/CMakeLists.txt deleted file mode 100644 index 0842765ef2..0000000000 --- a/protocols/Omegle/proto_omegle/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -set(TARGET Proto_Omegle) -include(${CMAKE_SOURCE_DIR}/cmake/icons.cmake)
\ No newline at end of file diff --git a/protocols/Omegle/proto_omegle/omegle_icons.vcxproj b/protocols/Omegle/proto_omegle/omegle_icons.vcxproj deleted file mode 100644 index aa877e1e5d..0000000000 --- a/protocols/Omegle/proto_omegle/omegle_icons.vcxproj +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>Proto_Omegle</ProjectName>
- <ProjectGuid>{C5AB34D2-15F5-4CBA-8F42-DB48A4E52910}</ProjectGuid>
- </PropertyGroup>
- <ImportGroup Label="PropertySheets">
- <Import Project="$(ProjectDir)..\..\..\build\vc.common\icons.props" />
- </ImportGroup>
- <ItemGroup>
- <ClInclude Include="src\resource_icons.h" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="res\omegle_icons.rc" />
- </ItemGroup>
-</Project>
\ No newline at end of file diff --git a/protocols/Omegle/proto_omegle/omegle_icons.vcxproj.filters b/protocols/Omegle/proto_omegle/omegle_icons.vcxproj.filters deleted file mode 100644 index ffcde85266..0000000000 --- a/protocols/Omegle/proto_omegle/omegle_icons.vcxproj.filters +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(ProjectDir)..\..\..\build\vc.common\common.filters" />
- <ItemGroup>
- <ClInclude Include="src\resource_icons.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="res\omegle_icons.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
-</Project>
\ No newline at end of file diff --git a/protocols/Omegle/proto_omegle/res/omegle_icons.rc b/protocols/Omegle/proto_omegle/res/omegle_icons.rc deleted file mode 100644 index 132ee3694c..0000000000 --- a/protocols/Omegle/proto_omegle/res/omegle_icons.rc +++ /dev/null @@ -1,73 +0,0 @@ -// Microsoft Visual C++ generated resource script.
-//
-#include "..\src\resource_icons.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// Czech resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CSY)
-#ifdef _WIN32
-LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
-#pragma code_page(1250)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "..\\src\\resource_icons.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#include ""afxres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_OFFLINE ICON "proto_offline.ico"
-IDI_ONLINE ICON "proto_online.ico"
-#endif // Czech resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
diff --git a/protocols/Omegle/proto_omegle/res/proto_offline.ico b/protocols/Omegle/proto_omegle/res/proto_offline.ico Binary files differdeleted file mode 100644 index 87aa8098fb..0000000000 --- a/protocols/Omegle/proto_omegle/res/proto_offline.ico +++ /dev/null diff --git a/protocols/Omegle/proto_omegle/res/proto_online.ico b/protocols/Omegle/proto_omegle/res/proto_online.ico Binary files differdeleted file mode 100644 index 7b4a163786..0000000000 --- a/protocols/Omegle/proto_omegle/res/proto_online.ico +++ /dev/null diff --git a/protocols/Omegle/proto_omegle/src/resource_icons.h b/protocols/Omegle/proto_omegle/src/resource_icons.h deleted file mode 100644 index b150f4933c..0000000000 --- a/protocols/Omegle/proto_omegle/src/resource_icons.h +++ /dev/null @@ -1,17 +0,0 @@ -//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by omegle_icons.rc
-//
-#define IDI_OFFLINE 105
-#define IDI_ONLINE 104
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 103
-#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1001
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
diff --git a/protocols/Omegle/res/omegle.ico b/protocols/Omegle/res/omegle.ico Binary files differdeleted file mode 100644 index 1e665ceac0..0000000000 --- a/protocols/Omegle/res/omegle.ico +++ /dev/null diff --git a/protocols/Omegle/res/omegle.rc b/protocols/Omegle/res/omegle.rc deleted file mode 100644 index 6e8ee2de50..0000000000 --- a/protocols/Omegle/res/omegle.rc +++ /dev/null @@ -1,158 +0,0 @@ -// Microsoft Visual C++ generated resource script.
-//
-#include "..\src\resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "afxres.h"
-#include "..\src\constants.h"
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// Czech (Czech Republic) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CSY)
-LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
-#pragma code_page(1250)
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "..\\src\\resource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#include ""afxres.h""\r\n"
- "#include ""..\\src\\constants.h""\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_OMEGLE ICON "omegle.ico"
-IDI_TYPING_ON ICON "typing.ico"
-IDI_TYPING_OFF ICON "typingoff.ico"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_OPTIONS DIALOGEX 0, 0, 316, 235
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
-EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- LTEXT "Server:",IDC_STATIC,14,9,64,8,0,WS_EX_RIGHT
- COMBOBOX IDC_SERVER,84,7,79,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- LTEXT "Language:",IDC_STATIC,172,9,50,8,0,WS_EX_RIGHT
- COMBOBOX IDC_LANGUAGE,228,7,74,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- LTEXT "Visible name:",IDC_STATIC,14,25,64,8,0,WS_EX_RIGHT
- EDITTEXT IDC_NAME,84,22,79,14,ES_AUTOHSCROLL
- CONTROL "Meet strangers with common interests (separated by commas):",IDC_MEET_COMMON,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,39,288,10
- EDITTEXT IDC_INTERESTS,14,49,288,14,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL
- CONTROL "Automatically send one of these messages (each on new line) to stranger after connection:",IDC_HI_ENABLED,
- "Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,14,65,288,15
- EDITTEXT IDC_HI_MESSAGE,14,82,288,20,ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN | WS_VSCROLL
- LTEXT "This text will be sent when you use ""/asl"" message:",IDC_STATIC,14,105,288,8
- EDITTEXT IDC_ASL_MESSAGE,14,114,288,20,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL
- LTEXT "Last used question (Question mode):",IDC_STATIC,14,136,288,8
- EDITTEXT IDC_LAST_QUESTION,14,145,288,20,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL
- CONTROL "I want Omegle to reuse my questions if they are good enough (Question mode)",IDC_REUSE_QUESTIONS,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,167,288,10
- CONTROL "Automatically connect to stranger when protocol is turned online",IDC_AUTO_CONNECT,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,180,288,10
- CONTROL "Automatically connect to another stranger when current disconnects",IDC_DONTSTOP,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,192,288,10
- CONTROL "Don't clear chat before connecting to new stranger",IDC_NOCLEAR,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,204,288,10
- CONTROL "Load count of users on actual server after connection",IDC_SERVER_INFO,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,216,288,10
-END
-
-IDD_OmegleACCOUNT DIALOGEX 0, 0, 186, 134
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
-EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg", 0, 0, 0x0
-BEGIN
- COMBOBOX IDC_SERVER,60,0,125,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- LTEXT "Server:",IDC_STATIC,0,2,60,8
- LTEXT "Visible name:",IDC_STATIC,0,32,60,8
- EDITTEXT IDC_NAME,60,30,125,14,ES_AUTOHSCROLL
- CONTROL "Meet strangers with common interests",IDC_MEET_COMMON,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,0,52,185,10
- EDITTEXT IDC_INTERESTS,0,76,185,32,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL
- LTEXT "Your interests (separated by commas):",IDC_STATIC,0,66,185,8
- COMBOBOX IDC_LANGUAGE,60,15,125,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- LTEXT "Language:",IDC_STATIC,0,17,60,8
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO
-BEGIN
- IDD_OPTIONS, DIALOG
- BEGIN
- LEFTMARGIN, 7
- RIGHTMARGIN, 309
- VERTGUIDE, 14
- VERTGUIDE, 78
- VERTGUIDE, 84
- VERTGUIDE, 163
- VERTGUIDE, 172
- VERTGUIDE, 214
- VERTGUIDE, 302
- TOPMARGIN, 7
- BOTTOMMARGIN, 228
- END
-
- IDD_OmegleACCOUNT, DIALOG
- BEGIN
- VERTGUIDE, 60
- VERTGUIDE, 185
- END
-END
-#endif // APSTUDIO_INVOKED
-
-#endif // Czech (Czech Republic) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
diff --git a/protocols/Omegle/res/typing.ico b/protocols/Omegle/res/typing.ico Binary files differdeleted file mode 100644 index f5f6c458a6..0000000000 --- a/protocols/Omegle/res/typing.ico +++ /dev/null diff --git a/protocols/Omegle/res/typingoff.ico b/protocols/Omegle/res/typingoff.ico Binary files differdeleted file mode 100644 index d79ce47b07..0000000000 --- a/protocols/Omegle/res/typingoff.ico +++ /dev/null diff --git a/protocols/Omegle/res/version.rc b/protocols/Omegle/res/version.rc deleted file mode 100644 index 5a5ddd63ed..0000000000 --- a/protocols/Omegle/res/version.rc +++ /dev/null @@ -1,9 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#ifdef APSTUDIO_INVOKED -#error this file is not editable by Microsoft Visual C++ -#endif //APSTUDIO_INVOKED - -#include "..\src\version.h" - -#include "..\..\build\Version.rc" diff --git a/protocols/Omegle/src/chat.cpp b/protocols/Omegle/src/chat.cpp deleted file mode 100644 index 0cec37e307..0000000000 --- a/protocols/Omegle/src/chat.cpp +++ /dev/null @@ -1,316 +0,0 @@ -/*
-
-Omegle plugin for Miranda Instant Messenger
-_____________________________________________
-
-Copyright © 2011-17 Robert Pösel, 2017-23 Miranda NG team
-
-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
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "stdafx.h"
-
-const wchar_t msgChatModes[] =
-LPGENW("There are three different modes of chatting:\
-\n1) Standard mode\t - You chat with random stranger privately\
-\n2) Question mode\t - You ask two strangers a question and see how they discuss it (you can't join their conversation, only watch)\
-\n3) Spy mode\t - You and stranger got a question to discuss from third stranger (he can't join your conversation, only watch)\
-\n\nSend '/commands' for available commands.");
-
-const wchar_t msgChatCommands[] =
-LPGENW("You can use different commands:\
-\n/help\t - show info about chat modes\
-\n/new\t - start standard mode\
-\n/ask <question> - start question mode with your question\
-\n/ask\t - start question mode with your last asked question\
-\n/spy\t - start spy mode\
-\n/quit\t - disconnect from stranger or stop connecting\
-\n/asl\t - send your predefined ASL message\
-\n\nNote: You can reconnect to different stranger without disconnecting from current one.");
-
-void OmegleProto::UpdateChat(const wchar_t *name, const wchar_t *message, bool addtolog)
-{
- if (message == nullptr)
- return;
-
- // replace % to %% to not interfere with chat color codes
- CMStringW smessage(message);
- smessage.Replace(L"%", L"%%");
-
- GCEVENT gce = { m_si, GC_EVENT_MESSAGE };
- gce.time = ::time(0);
- gce.pszText.w = smessage.c_str();
-
- if (name == nullptr) {
- gce.iType = GC_EVENT_INFORMATION;
- name = TranslateT("Server");
- gce.bIsMe = false;
- }
- else gce.bIsMe = !mir_wstrcmp(name, this->facy.nick_);
-
- if (addtolog)
- gce.dwFlags |= GCEF_ADDTOLOG;
-
- gce.pszNick.w = name;
- gce.pszUID.w = gce.pszNick.w;
- Chat_Event(&gce);
-}
-
-int OmegleProto::OnChatEvent(WPARAM, LPARAM lParam)
-{
- GCHOOK *hook = reinterpret_cast<GCHOOK*>(lParam);
- if (mir_strcmp(hook->si->pszModule, m_szModuleName))
- return 0;
-
- switch (hook->iType) {
- case GC_USER_MESSAGE:
- {
- std::string text = mir_u2a_cp(hook->ptszText, CP_UTF8);
-
- // replace %% back to %, because chat automatically does this to sent messages
- utils::text::replace_all(&text, "%%", "%");
-
- if (text.empty())
- break;
-
- if (text.substr(0, 1) == "/") { // Process commands
-
- std::string command = "";
- std::string params = "";
-
- std::string::size_type pos = 0;
- if ((pos = text.find(" ")) != std::string::npos) {
- command = text.substr(1, pos - 1);
- params = text.substr(pos + 1);
- }
- else command = text.substr(1);
-
- if (!mir_strcmpi(command.c_str(), "new")) {
- facy.spy_mode_ = false;
- facy.question_.clear();
-
- ForkThread(&OmegleProto::NewChatWorker, nullptr);
- break;
- }
- else if (!mir_strcmpi(command.c_str(), "quit")) {
- ForkThread(&OmegleProto::StopChatWorker, nullptr);
- break;
- }
- else if (!mir_strcmpi(command.c_str(), "spy")) {
- facy.spy_mode_ = true;
- facy.question_.clear();
-
- ForkThread(&OmegleProto::NewChatWorker, nullptr);
- break;
- }
- else if (!mir_strcmpi(command.c_str(), "ask")) {
- if (params.empty()) {
- // Load last question
- DBVARIANT dbv;
- if (!getU8String(OMEGLE_KEY_LAST_QUESTION, &dbv)) {
- params = dbv.pszVal;
- db_free(&dbv);
- }
-
- if (params.empty()) {
- UpdateChat(nullptr, TranslateT("Last question is empty."), false);
- break;
- }
- }
- else {
- // Save actual question as last question
- if (params.length() >= OMEGLE_QUESTION_MIN_LENGTH)
- setU8String(OMEGLE_KEY_LAST_QUESTION, params.c_str());
- }
-
- if (params.length() < OMEGLE_QUESTION_MIN_LENGTH) {
- UpdateChat(nullptr, TranslateT("Your question is too short."), false);
- break;
- }
-
- facy.spy_mode_ = true;
- facy.question_ = params;
- ForkThread(&OmegleProto::NewChatWorker, nullptr);
- break;
- }
- else if (!mir_strcmpi(command.c_str(), "asl")) {
- DBVARIANT dbv;
- if (!getU8String(OMEGLE_KEY_ASL, &dbv)) {
- text = dbv.pszVal;
- db_free(&dbv);
-
- SendChatMessage(text);
- }
- else {
- UpdateChat(nullptr, TranslateT("Your '/asl' setting is empty."), false);
- break;
- }
- }
- else if (!mir_strcmpi(command.c_str(), "help")) {
- UpdateChat(nullptr, TranslateW(msgChatModes), false);
- }
- else if (!mir_strcmpi(command.c_str(), "commands")) {
- UpdateChat(nullptr, TranslateW(msgChatCommands), false);
- break;
- }
- else {
- UpdateChat(nullptr, TranslateT("Unknown command. Send '/commands' for list."), false);
- break;
- }
- }
- else // Outgoing message
- SendChatMessage(text);
- }
- break;
-
- case GC_SESSION_TERMINATE:
- facy.nick_ = nullptr;
- ForkThread(&OmegleProto::StopChatWorker, nullptr);
- break;
- }
-
- return 1;
-}
-
-void OmegleProto::SendChatMessage(std::string text)
-{
- switch (facy.state_) {
- case STATE_ACTIVE:
- debugLogA("**Chat - Outgoing message: %s", text.c_str());
- ForkThread(&OmegleProto::SendMsgWorker, new std::string(text));
- break;
-
- case STATE_INACTIVE:
- UpdateChat(nullptr, TranslateT("You aren't connected to any stranger. Send '/help' or '/commands' for help."), false);
- break;
-
- case STATE_SPY:
- UpdateChat(nullptr, TranslateT("You can't send messages in question mode."), false);
- break;
- }
-}
-
-void OmegleProto::AddChatContact(const wchar_t *name)
-{
- GCEVENT gce = { m_si, GC_EVENT_JOIN };
- gce.time = uint32_t(time(0));
- gce.dwFlags = GCEF_ADDTOLOG;
- gce.pszNick.w = name;
- gce.pszUID.w = gce.pszNick.w;
-
- if (name == nullptr)
- gce.bIsMe = false;
- else
- gce.bIsMe = mir_wstrcmp(name, this->facy.nick_);
-
- if (gce.bIsMe)
- gce.pszStatus.w = L"Admin";
- else
- gce.pszStatus.w = L"Normal";
-
- Chat_Event(&gce);
-}
-
-void OmegleProto::DeleteChatContact(const wchar_t *name)
-{
- GCEVENT gce = { m_si, GC_EVENT_PART };
- gce.dwFlags = GCEF_ADDTOLOG;
- gce.pszNick.w = name;
- gce.pszUID.w = gce.pszNick.w;
- gce.time = uint32_t(time(0));
- if (name == nullptr)
- gce.bIsMe = false;
- else
- gce.bIsMe = mir_wstrcmp(name, this->facy.nick_);
-
- Chat_Event(&gce);
-}
-
-INT_PTR OmegleProto::OnJoinChat(WPARAM, LPARAM suppress)
-{
- // Create the group chat session
- m_si = Chat_NewSession(GCW_PRIVMESS, m_szModuleName, m_tszUserName, m_tszUserName);
- if (!m_si || m_iStatus == ID_STATUS_OFFLINE)
- return 0;
-
- // Create a group
- Chat_AddGroup(m_si, TranslateT("Admin"));
- Chat_AddGroup(m_si, TranslateT("Normal"));
-
- SetTopic();
-
- // Note: Initialization will finish up in SetChatStatus, called separately
- if (!suppress)
- SetChatStatus(m_iStatus);
-
- return 0;
-}
-
-void OmegleProto::SetTopic(const wchar_t *topic)
-{
- GCEVENT gce = { m_si, GC_EVENT_TOPIC };
- gce.time = ::time(0);
-
- if (topic == nullptr)
- gce.pszText.w = TranslateT("Omegle is a great way of meeting new friends!");
- else
- gce.pszText.w = topic;
-
- Chat_Event(&gce);
-}
-
-INT_PTR OmegleProto::OnLeaveChat(WPARAM, LPARAM)
-{
- Chat_Control(m_si, SESSION_OFFLINE);
- Chat_Terminate(m_si);
- m_si = nullptr;
- return 0;
-}
-
-void OmegleProto::SetChatStatus(int status)
-{
- if (status == ID_STATUS_ONLINE) {
- // Load actual name from database
- facy.nick_ = db_get_wsa(0, m_szModuleName, OMEGLE_KEY_NAME);
- if (facy.nick_ == NULL) {
- facy.nick_ = mir_wstrdup(TranslateT("You"));
- db_set_ws(0, m_szModuleName, OMEGLE_KEY_NAME, facy.nick_);
- }
-
- // Add self contact
- AddChatContact(facy.nick_);
-
- Chat_Control(m_si, SESSION_INITDONE);
- Chat_Control(m_si, SESSION_ONLINE);
- }
- else Chat_Control(m_si, SESSION_OFFLINE);
-}
-
-void OmegleProto::ClearChat()
-{
- if (!getByte(OMEGLE_KEY_NO_CLEAR, 0))
- Chat_Control(m_si, WINDOW_CLEARLOG);
-}
-
-// TODO: Could this be done better?
-MCONTACT OmegleProto::GetChatHandle()
-{
- GC_INFO gci = {};
- gci.Flags = GCF_HCONTACT;
- gci.pszModule = m_szModuleName;
- gci.pszID = m_tszUserName;
- Chat_GetInfo(&gci);
-
- return gci.hContact;
-}
diff --git a/protocols/Omegle/src/client.h b/protocols/Omegle/src/client.h deleted file mode 100644 index 1a34b20629..0000000000 --- a/protocols/Omegle/src/client.h +++ /dev/null @@ -1,126 +0,0 @@ -/*
-
-Omegle plugin for Miranda Instant Messenger
-_____________________________________________
-
-Copyright © 2011-17 Robert Pösel, 2017-23 Miranda NG team
-
-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
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-#pragma once
-
-#define FORCE_DISCONNECT true
-
-#define STATE_INACTIVE 0 // not connected to any stranger
-#define STATE_WAITING 1 // connecting to stranger
-#define STATE_ACTIVE 2 // active discussion
-#define STATE_DISCONNECTING 3 // disconnecting from stranger
-#define STATE_SPY 4 // spy mode (read-only)
-
-#define HANDLE_ENTRY handle_entry(__FUNCTION__)
-#define HANDLE_SUCCESS handle_success(__FUNCTION__)
-#define HANDLE_ERROR(force_disconnect) handle_error(__FUNCTION__, force_disconnect)
-
-class Omegle_client
-{
-public:
-
- // Client definition
- Omegle_client()
- {
- nick_ = nullptr;
- //msgid_ = 0;
- state_ = STATE_INACTIVE;
-
- typing_ = spy_mode_ = false;
-
- error_count_ = 0;
-
- parent = nullptr;
- handle_ = nullptr;
- hConnection = nullptr;
- hEventsConnection = nullptr;
- connection_lock_ = nullptr;
- chatHandle_ = nullptr;
- }
-
- HNETLIBCONN hConnection;
- HNETLIBCONN hEventsConnection;
- HANDLE connection_lock_;
- HANDLE chatHandle_;
-
- // Parent handle
- OmegleProto* parent;
-
- // Chat data
- std::string chat_id_;
- std::string server_;
- std::string question_;
- ptrW nick_;
-
- //int msgid_;
-
- // State of client
- int state_;
- bool typing_;
- bool spy_mode_;
-
- // Data storage
- void store_headers(http::response *resp, NETLIBHTTPHEADER *headers, int headers_count);
-
- std::string get_server(bool not_last = false);
- std::string get_language();
-
- // Connection handling
- unsigned int error_count_;
-
- bool handle_entry(const std::string &method);
- bool handle_success(const std::string &method);
- bool handle_error(const std::string &method, bool force_disconnect = false);
-
- void __inline increment_error() { error_count_++; }
- void __inline decrement_error() { if (error_count_ > 0) error_count_--; }
- void __inline reset_error() { error_count_ = 0; }
-
- bool start();
- bool stop();
- bool events();
-
- bool typing_start();
- bool typing_stop();
- bool recaptcha();
-
- std::string get_page(int);
-
- bool send_message(const std::string &message_text);
-
- // HTTP communication
- http::response flap(const int request_type, std::string *post_data = nullptr, std::string *get_data = nullptr);
-
- std::string choose_server(int);
- std::string choose_action(int, std::string *get_data = nullptr);
-
- NETLIBHTTPHEADER *get_request_headers(int request_type, int *headers_count);
-
- // Netlib handle
-
- HNETLIBUSER handle_;
-
- void set_handle(HNETLIBUSER h)
- {
- handle_ = h;
- }
-};
diff --git a/protocols/Omegle/src/communication.cpp b/protocols/Omegle/src/communication.cpp deleted file mode 100644 index 060430a9ec..0000000000 --- a/protocols/Omegle/src/communication.cpp +++ /dev/null @@ -1,737 +0,0 @@ -/*
-
-Omegle plugin for Miranda Instant Messenger
-_____________________________________________
-
-Copyright © 2011-17 Robert Pösel, 2017-23 Miranda NG team
-
-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
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "stdafx.h"
-
-http::response Omegle_client::flap(const int request_type, std::string *post_data, std::string *get_data)
-{
- http::response resp;
-
- // Prepare the request
- NETLIBHTTPREQUEST nlhr = { sizeof(NETLIBHTTPREQUEST) };
-
- // Set request URL
- std::string url = choose_server(request_type) + choose_action(request_type, get_data);
- nlhr.szUrl = (char*)url.c_str();
-
- // Set timeout (bigger for channel request)
- nlhr.timeout = 1000 * ((request_type == OMEGLE_REQUEST_EVENTS) ? 65 : 20);
-
- // Set request type (GET/POST) and eventually also POST data
- if (post_data != nullptr) {
- nlhr.requestType = REQUEST_POST;
- nlhr.pData = (char*)(*post_data).c_str();
- nlhr.dataLength = (int)post_data->length();
- }
- else {
- nlhr.requestType = REQUEST_GET;
- }
-
- // Set headers - it depends on requestType so it must be after setting that
- nlhr.headers = get_request_headers(nlhr.requestType, &nlhr.headersCount);
-
- // Set flags
- nlhr.flags = NLHRF_HTTP11;
-
-#ifdef _DEBUG
- nlhr.flags |= NLHRF_DUMPASTEXT;
-#else
- nlhr.flags |= NLHRF_NODUMP;
-#endif
-
- // Set persistent connection (or not)
- switch (request_type)
- {
- case OMEGLE_REQUEST_HOME:
- nlhr.nlc = nullptr;
- break;
-
- case OMEGLE_REQUEST_EVENTS:
- nlhr.nlc = hEventsConnection;
- nlhr.flags |= NLHRF_PERSISTENT;
- break;
-
- default:
- WaitForSingleObject(connection_lock_, INFINITE);
- nlhr.nlc = hConnection;
- nlhr.flags |= NLHRF_PERSISTENT;
- break;
- }
-
- parent->debugLogA("@@@@@ Sending request to '%s'", nlhr.szUrl);
-
- // Send the request
- NLHR_PTR pnlhr(Netlib_HttpTransaction(handle_, &nlhr));
-
- mir_free(nlhr.headers);
-
- // Remember the persistent connection handle (or not)
- switch (request_type)
- {
- case OMEGLE_REQUEST_HOME:
- break;
-
- case OMEGLE_REQUEST_EVENTS:
- hEventsConnection = pnlhr ? pnlhr->nlc : nullptr;
- break;
-
- default:
- ReleaseMutex(connection_lock_);
- hConnection = pnlhr ? pnlhr->nlc : nullptr;
- break;
- }
-
- // Check and copy response data
- if (pnlhr != nullptr)
- {
- parent->debugLogA("@@@@@ Got response with code %d", pnlhr->resultCode);
- store_headers(&resp, pnlhr->headers, pnlhr->headersCount);
- resp.code = pnlhr->resultCode;
- resp.data = pnlhr->pData ? pnlhr->pData : "";
-
- // This error code gives us some error page, but we don't need that, so clear the response
- if (pnlhr->resultCode == HTTP_CODE_WEB_SERVER_IS_DOWN) {
- resp.data = "";
- }
-
- parent->debugLogA("&&&&& Got response: %s", resp.data.c_str());
- }
- else {
- parent->debugLogA("!!!!! No response from server (time-out)");
- resp.code = HTTP_CODE_FAKE_DISCONNECTED;
- // Better to have something set explicitely as this value is compaired in all communication requests
- }
-
- return resp;
-}
-
-bool Omegle_client::handle_entry(const std::string &method)
-{
- parent->debugLogA(" >> Entering %s()", method.c_str());
- return true;
-}
-
-bool Omegle_client::handle_success(const std::string &method)
-{
- parent->debugLogA(" << Quitting %s()", method.c_str());
- reset_error();
- return true;
-}
-
-bool Omegle_client::handle_error(const std::string &method, bool force_disconnect)
-{
- bool result;
- increment_error();
- parent->debugLogA("!!!!! %s(): Something with Omegle went wrong", method.c_str());
-
- if (force_disconnect)
- result = false;
- else if (error_count_ <= (UINT)db_get_b(0, parent->m_szModuleName, OMEGLE_KEY_TIMEOUTS_LIMIT, OMEGLE_TIMEOUTS_LIMIT))
- result = true;
- else
- result = false;
-
- if (result == false)
- {
- reset_error();
- parent->UpdateChat(nullptr, TranslateT("Connection error."));
- parent->StopChat(false);
- }
-
- return result;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-
-std::string Omegle_client::choose_server(int request_type)
-{
- switch (request_type)
- {
- case OMEGLE_REQUEST_HOME:
- return OMEGLE_SERVER_REGULAR;
-
- /* case OMEGLE_REQUEST_START:
- case OMEGLE_REQUEST_STOP:
- case OMEGLE_REQUEST_SEND:
- case OMEGLE_REQUEST_EVENTS:
- case OMEGLE_REQUEST_TYPING_START:
- case OMEGLE_REQUEST_TYPING_STOP:
- case OMEGLE_REQUEST_RECAPTCHA:
- case OMEGLE_REQUEST_COUNT:
- */ default:
- std::string server = OMEGLE_SERVER_CHAT;
- utils::text::replace_first(&server, "%s", this->server_);
- return server;
- }
-}
-
-std::string Omegle_client::choose_action(int request_type, std::string* get_data)
-{
- switch (request_type)
- {
- case OMEGLE_REQUEST_START:
- {
- std::string action = "/start?caps=recaptcha2,t&rcs=1&spid=&lang=";
- action += get_language();
- if (get_data != nullptr)
- action += (*get_data);
-
- return action;
- }
-
- case OMEGLE_REQUEST_STOP:
- return "/disconnect";
-
- case OMEGLE_REQUEST_SEND:
- return "/send";
-
- case OMEGLE_REQUEST_EVENTS:
- return "/events";
-
- case OMEGLE_REQUEST_TYPING_START:
- return "/typing";
-
- case OMEGLE_REQUEST_TYPING_STOP:
- return "/stoppedtyping";
-
- case OMEGLE_REQUEST_RECAPTCHA:
- return "/recaptcha";
-
- case OMEGLE_REQUEST_COUNT:
- return "/count";
-
- // "/stoplookingforcommonlikes"
-
- /* case OMEGLE_REQUEST_HOME:
- */ default:
- return "/";
- }
-}
-
-
-NETLIBHTTPHEADER* Omegle_client::get_request_headers(int request_type, int* headers_count)
-{
- if (request_type == REQUEST_POST)
- *headers_count = 4;
- else
- *headers_count = 3;
-
- NETLIBHTTPHEADER *headers = (NETLIBHTTPHEADER*)mir_calloc(sizeof(NETLIBHTTPHEADER)*(*headers_count));
-
- if (request_type == REQUEST_POST) {
- headers[3].szName = "Content-Type";
- headers[3].szValue = "application/x-www-form-urlencoded; charset=utf-8";
- }
-
- headers[2].szName = "User-Agent";
- headers[2].szValue = Netlib_GetUserAgent();
- headers[1].szName = "Accept";
- headers[1].szValue = "*/*";
- headers[0].szName = "Accept-Language";
- headers[0].szValue = "en,en-US;q=0.9";
-
- return headers;
-}
-
-void Omegle_client::store_headers(http::response* resp, NETLIBHTTPHEADER* headers, int headersCount)
-{
- for (size_t i = 0; i < (size_t)headersCount; i++)
- {
- std::string header_name = headers[i].szName;
- std::string header_value = headers[i].szValue;
-
- // TODO RM: (un)comment
- //parent->debugLogA("----- Got header '%s': %s", header_name.c_str(), header_value.c_str());
- resp->headers[header_name] = header_value;
- }
-}
-
-//////////////////////////////////////////////////////////////////////////////
-
-bool Omegle_client::start()
-{
- HANDLE_ENTRY;
-
- this->server_ = get_server();
- //parent->debugLogA("Chosing server %s", this->server_.c_str());
- //std::string log = Translate("Chosing server: ") + this->server_;
- //parent->UpdateChat(NULL, log.c_str());
-
- std::string data;
-
- if (this->spy_mode_) {
- //// get last server from list, which is for spy mode
- //this->server_ = servers[_countof(servers)-1];
-
- if (this->question_.empty()) {
- data = "&wantsspy=1";
- }
- else {
- data = "&ask=" + utils::url::encode(this->question_);
- data += "&cansavequestion=";
- data += db_get_b(0, parent->m_szModuleName, OMEGLE_KEY_REUSE_QUESTION, 0) ? "1" : "0";
- }
- }
- else if (db_get_b(0, parent->m_szModuleName, OMEGLE_KEY_MEET_COMMON, 0))
- {
- DBVARIANT dbv;
- if (!db_get_utf(NULL, parent->m_szModuleName, OMEGLE_KEY_INTERESTS, &dbv))
- {
- std::string topics = dbv.pszVal;
- std::string topic;
-
- db_free(&dbv);
-
- std::string::size_type pos = 0;
- std::string::size_type pos2 = 0;
- while ((pos2 = topics.find(",", pos)) != std::string::npos) {
- topic = topics.substr(pos, pos2 - pos);
- topic = utils::text::trim(topic);
-
- if (!topic.empty()) {
- if (pos > 0)
- data += ",";
-
- data += "\"" + topic + "\"";
- }
-
- pos = pos2 + 1;
- }
-
- topic = topics.substr(pos);
- topic = utils::text::trim(topic);
- if (!topic.empty()) {
- if (pos > 0)
- data += ",";
- data += "\"" + topic + "\"";
- }
-
- parent->debugLogA("TOPICS: %s", data.c_str());
-
- if (!data.empty()) {
- data = "[" + data + "]";
- data = "&topics=" + utils::url::encode(data);
- }
-
- //// get any server but last, which is for spy mode
- //this->server_ = get_server(true);
- }
- }
-
- if (db_get_b(0, parent->m_szModuleName, OMEGLE_KEY_SERVER_INFO, 0))
- {
- std::string count = get_page(OMEGLE_REQUEST_COUNT);
- if (!count.empty()) {
- char str[255];
- mir_snprintf(str, Translate("Connected to server %s. There are %s users online now."), server_.c_str(), count.c_str());
-
- wchar_t *msg = mir_a2u(str);
- parent->UpdateChat(nullptr, msg);
- mir_free(msg);
- }
- }
- else {
- char str[255];
- mir_snprintf(str, Translate("Connected to server %s."), server_.c_str());
-
- wchar_t *msg = mir_a2u(str);
- parent->UpdateChat(nullptr, msg);
- mir_free(msg);
- }
-
- // Send validation
- http::response resp = flap(OMEGLE_REQUEST_START, nullptr, &data);
-
- switch (resp.code)
- {
- case HTTP_CODE_FAKE_DISCONNECTED:
- {
- // If is is only timeout error, try login once more
- if (HANDLE_ERROR(false))
- return start();
- else
- return false;
- }
-
- case HTTP_CODE_OK:
- {
- if (!resp.data.empty()) {
- this->chat_id_ = resp.data.substr(1, resp.data.length() - 2);
- this->state_ = STATE_WAITING;
-
- return HANDLE_SUCCESS;
- }
- else {
- return HANDLE_ERROR(FORCE_DISCONNECT);
- }
- }
-
- default:
- return HANDLE_ERROR(FORCE_DISCONNECT);
- }
-}
-
-bool Omegle_client::stop()
-{
- if (parent->isOffline())
- return true;
-
- HANDLE_ENTRY;
-
- std::string data = "id=" + this->chat_id_;
-
- http::response resp = flap(OMEGLE_REQUEST_STOP, &data);
-
- Netlib_Shutdown(hConnection);
- Netlib_Shutdown(hEventsConnection);
-
- return (resp.data == "win") ? HANDLE_SUCCESS : HANDLE_ERROR(false);
-}
-
-bool Omegle_client::events()
-{
- HANDLE_ENTRY;
-
- std::string post_data = "id=" + this->chat_id_;
-
- // Get update
- http::response resp = flap(OMEGLE_REQUEST_EVENTS, &post_data);
-
- // Return
- switch (resp.code)
- {
- case HTTP_CODE_OK:
- {
- if (resp.data == "null") {
- // Everything is OK, no new message received -- OR it is a problem
- // TODO: if we are waiting for Stranger with common likes, then we should try standard Stranger if this takes too long
- return HANDLE_ERROR(false);
- }
- else if (resp.data == "fail") {
- // Something went wrong
- return HANDLE_ERROR(false);
- }
-
- JSONROOT root(resp.data.c_str());
- if (root == nullptr)
- return HANDLE_ERROR(false);
-
- bool newStranger = false;
- bool waiting = false;
-
- for (size_t i = 0; i < json_size(root); i++) {
- JSONNode *item = json_at(root, i);
- if (item == nullptr)
- continue;
-
- std::string name = _T2A(json_as_string(json_at(item, 0)));
-
- if (name == "waiting") {
- // We are just waiting for new Stranger
- waiting = true;
- }
- else if (name == "identDigests") {
- // We get some comma separated hashes, I'm not sure what for
- }
- else if (name == "statusInfo") {
- JSONNode *data = json_at(item, 1);
-
- // We got some object as second parameter
- //data["antinudepercent"]; // probably 1 by default
- //data["antinudeservers"]; // array of server names, like "waw3.omegle.com"
- //data["rtmfp"]; // some rtmfp protocol address
- //data["servers"]; // array of server names, like "front5.omegle.com"
- //data["spyeeQueueTime"]; // some float number, e.g. 0.0701999903
- //data["spyQueueTime"]; // some float number, e.g. 4.7505000114
- //data["timestamp"]; // e.g. 1445336566.0196209
-
- // We got info about count of connected people there
- ptrW count(json_as_string(json_get(data, "count")));
- wchar_t strT[255];
- mir_snwprintf(strT, TranslateT("On whole Omegle are %s strangers online now."), count.get());
-
- parent->UpdateChat(nullptr, strT);
- }
- else if (name == "serverMessage") {
- ptrW message(json_as_string(json_at(item, 1)));
- parent->UpdateChat(nullptr, TranslateW(message));
- }
- else if (name == "connected") {
- // Stranger connected
- if (this->spy_mode_ && !this->question_.empty()) {
- parent->AddChatContact(TranslateT("Stranger 1"));
- parent->AddChatContact(TranslateT("Stranger 2"));
- this->state_ = STATE_SPY;
- }
- else {
- parent->AddChatContact(TranslateT("Stranger"));
- this->state_ = STATE_ACTIVE;
- }
-
- newStranger = true;
- waiting = false;
- }
- else if (name == "commonLikes") {
- std::wstring likes = TranslateT("You and the Stranger both like: ");
-
- JSONNode *items = json_at(item, 1);
- size_t size = json_size(items);
- for (size_t j = 0; j < size; j++) {
- likes += ptrW(json_as_string(json_at(items, j)));
- if (j < size - 1)
- likes += L", ";
- }
-
- parent->debugLogW(L"Got common likes: '%s'", likes.c_str());
- parent->SetTopic(likes.c_str());
- }
- else if (name == "question") {
- ptrW question(json_as_string(json_at(item, 1)));
- parent->SetTopic(question);
- }
- else if (name == "typing" || name == "spyTyping") {
- // Stranger is typing, not supported by chat module yet
- Skin_PlaySound("StrangerTyp");
-
- ptrW who(name == "spyTyping" ? json_as_string(json_at(item, 1)) : mir_wstrdup(L"Stranger"));
- Srmm_SetStatusText(parent->GetChatHandle(), CMStringW(FORMAT, TranslateT("%s is typing."), TranslateW(who)), g_plugin.getIcon(IDI_TYPING_ON));
- }
- else if (name == "stoppedTyping" || name == "spyStoppedTyping") {
- // Stranger stopped typing, not supported by chat module yet
- Skin_PlaySound("StrangerTypStop");
-
- ptrW who(name == "spyTyping" ? json_as_string(json_at(item, 1)) : mir_wstrdup(L"Stranger"));
- Srmm_SetStatusText(parent->GetChatHandle(), CMStringW(FORMAT, TranslateT("%s stopped typing."), TranslateW(who)), g_plugin.getIcon(IDI_TYPING_OFF));
- }
- else if (name == "gotMessage") {
- Srmm_SetStatusText(parent->GetChatHandle(), nullptr);
-
- // Play sound as we received message
- Skin_PlaySound("StrangerMessage");
-
- if (state_ == STATE_ACTIVE) {
- ptrW msg(json_as_string(json_at(item, 1)));
- parent->UpdateChat(TranslateT("Stranger"), msg);
- }
- }
- else if (name == "spyMessage") {
- Srmm_SetStatusText(parent->GetChatHandle(), nullptr);
-
- // Play sound as we received message
- Skin_PlaySound("StrangerMessage");
-
- if (state_ == STATE_SPY) {
- ptrW stranger(json_as_string(json_at(item, 1)));
- ptrW msg(json_as_string(json_at(item, 2)));
- parent->UpdateChat(stranger, msg);
- }
- }
- else if (name == "strangerDisconnected") {
- Srmm_SetStatusText(parent->GetChatHandle(), nullptr);
-
- // Stranger disconnected
- if (db_get_b(0, parent->m_szModuleName, OMEGLE_KEY_DONT_STOP, 0))
- {
- Skin_PlaySound("StrangerChange");
- parent->NewChat();
- }
- else
- parent->StopChat(false);
- }
- else if (name == "spyDisconnected") {
- Srmm_SetStatusText(parent->GetChatHandle(), nullptr);
-
- ptrW stranger(json_as_string(json_at(item, 1)));
-
- wchar_t strT[255];
- mir_snwprintf(strT, TranslateT("%s disconnected."), TranslateW(stranger));
- parent->UpdateChat(nullptr, strT);
-
- // Stranger disconnected
- if (db_get_b(0, parent->m_szModuleName, OMEGLE_KEY_DONT_STOP, 0))
- {
- Skin_PlaySound("StrangerChange");
- parent->NewChat();
- }
- else
- parent->StopChat(false);
- }
- else if (name == "recaptchaRequired") {
- // Nothing to do with recaptcha
- parent->UpdateChat(nullptr, TranslateT("Recaptcha is required.\nOpen http://omegle.com , solve Recaptcha and try again."));
- parent->StopChat(false);
- }
- else if (name == "recaptchaRejected") {
- // Nothing to do with recaptcha
- parent->StopChat(false);
- }
- else if (name == "error") {
- ptrW error(json_as_string(json_at(item, 1)));
-
- wchar_t strT[255];
- mir_snwprintf(strT, TranslateT("Error: %s"), TranslateW(error));
- parent->UpdateChat(nullptr, strT);
- }
- }
-
- if (newStranger && !spy_mode_) {
- // We got new stranger in this event, lets say him "Hi message" if enabled
- if (db_get_b(0, parent->m_szModuleName, OMEGLE_KEY_HI_ENABLED, 0)) {
- DBVARIANT dbv;
- if (!db_get_utf(NULL, parent->m_szModuleName, OMEGLE_KEY_HI, &dbv)) {
- std::vector<std::string> messages;
- utils::text::explode(std::string(dbv.pszVal), "\r\n", &messages);
- db_free(&dbv);
-
- int pos = rand() % messages.size();
- std::string *message = new std::string(messages.at(pos));
-
- parent->debugLogA("**Chat - saying Hi! message");
- parent->ForkThread(&OmegleProto::SendMsgWorker, message);
- }
- else parent->debugLogA("**Chat - Hi message is enabled but not used");
- }
- }
-
- if (waiting) {
- // If we are only waiting in this event...
- parent->UpdateChat(nullptr, TranslateT("We are still waiting..."));
- }
-
- return HANDLE_SUCCESS;
- }
-
- case HTTP_CODE_FAKE_DISCONNECTED:
- // timeout
- return HANDLE_SUCCESS;
-
- default:
- return HANDLE_ERROR(false);
- }
-}
-
-bool Omegle_client::send_message(const std::string &message_text)
-{
- HANDLE_ENTRY;
-
- std::string data = "msg=" + utils::url::encode(message_text);
- data += "&id=" + this->chat_id_;
-
- http::response resp = flap(OMEGLE_REQUEST_SEND, &data);
-
- switch (resp.code)
- {
- case HTTP_CODE_OK:
- if (resp.data == "win") {
- return HANDLE_SUCCESS;
- }
-
- case HTTP_CODE_FAKE_DISCONNECTED:
- default:
- return HANDLE_ERROR(false);
- }
-}
-
-bool Omegle_client::typing_start()
-{
- HANDLE_ENTRY;
-
- std::string data = "id=" + this->chat_id_;
-
- http::response resp = flap(OMEGLE_REQUEST_TYPING_START, &data);
-
- switch (resp.code)
- {
- case HTTP_CODE_OK:
- if (resp.data == "win") {
- return HANDLE_SUCCESS;
- }
-
- case HTTP_CODE_FAKE_DISCONNECTED:
- default:
- return HANDLE_ERROR(false);
- }
-}
-
-bool Omegle_client::typing_stop()
-{
- HANDLE_ENTRY;
-
- std::string data = "id=" + this->chat_id_;
-
- http::response resp = flap(OMEGLE_REQUEST_TYPING_STOP, &data);
-
- switch (resp.code)
- {
- case HTTP_CODE_OK:
- if (resp.data == "win") {
- return HANDLE_SUCCESS;
- }
-
- case HTTP_CODE_FAKE_DISCONNECTED:
- default:
- return HANDLE_ERROR(false);
- }
-}
-
-bool Omegle_client::recaptcha()
-{
- // TODO: Implement!
-
- HANDLE_ENTRY;
-
- // data:{id:this.clientID,challenge:b,response:a}}
- //std::string data = "?id=...&challenge= ..., &response= ...";
-
- http::response resp = flap(OMEGLE_REQUEST_RECAPTCHA);
-
- switch (resp.code)
- {
- case HTTP_CODE_OK:
- /* if (resp.data == "win") {
- return handle_success( "typing_start" );
- }*/
-
- case HTTP_CODE_FAKE_DISCONNECTED:
- default:
- return HANDLE_ERROR(false);
- }
-}
-
-std::string Omegle_client::get_page(const int request_type)
-{
- HANDLE_ENTRY;
-
- http::response resp = flap(request_type);
-
- switch (resp.code)
- {
- case HTTP_CODE_OK:
- HANDLE_SUCCESS;
- break;
-
- case HTTP_CODE_FAKE_DISCONNECTED:
- default:
- HANDLE_ERROR(false);
- }
-
- return resp.data;
-}
diff --git a/protocols/Omegle/src/connection.cpp b/protocols/Omegle/src/connection.cpp deleted file mode 100644 index f0f40221f1..0000000000 --- a/protocols/Omegle/src/connection.cpp +++ /dev/null @@ -1,178 +0,0 @@ -/*
-
-Omegle plugin for Miranda Instant Messenger
-_____________________________________________
-
-Copyright © 2011-17 Robert Pösel, 2017-23 Miranda NG team
-
-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
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-#include "stdafx.h"
-
-// Known server messages, only to inform lpgen
-const char *server_messages[] = {
- LPGEN("Stranger is using Omegle's mobile Web site (omegle.com on a phone or tablet)"),
- LPGEN("You both speak the same language.")
-};
-
-void OmegleProto::SignOn(void*)
-{
- SYSTEMTIME t;
- GetLocalTime(&t);
- debugLogA("[%d.%d.%d] Using Omegle Protocol %s", t.wDay, t.wMonth, t.wYear, __VERSION_STRING_DOTS);
-
- ScopedLock s(signon_lock_);
-
- int old_status = m_iStatus;
- m_iStatus = m_iDesiredStatus;
- ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
-
- setDword("LogonTS", (uint32_t)time(0));
- ClearChat();
- OnJoinChat(0, false);
-
- if (getByte(OMEGLE_KEY_AUTO_CONNECT, 0))
- NewChat();
-}
-
-void OmegleProto::SignOff(void*)
-{
- ScopedLock s(signon_lock_);
-
- int old_status = m_iStatus;
- m_iStatus = ID_STATUS_OFFLINE;
-
- Netlib_Shutdown(facy.hEventsConnection);
-
- OnLeaveChat(NULL, NULL);
-
- delSetting("LogonTS");
-
- ProtoBroadcastAck(0, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus);
-}
-
-void OmegleProto::StopChat(bool disconnect)
-{
- if (facy.state_ == STATE_WAITING)
- UpdateChat(nullptr, TranslateT("Connecting canceled."), false);
-
- else if (facy.state_ == STATE_ACTIVE || facy.state_ == STATE_SPY) {
- bool spy = facy.state_ == STATE_SPY;
-
- if (disconnect) {
- facy.state_ = STATE_DISCONNECTING;
- UpdateChat(nullptr, TranslateT("Disconnecting..."), true);
-
- if (facy.stop())
- debugLogA("***** Disconnected from stranger %s", facy.chat_id_.c_str());
- else
- debugLogA("***** Error in disconnecting from stranger %s", facy.chat_id_.c_str());
- }
-
- if (spy) {
- DeleteChatContact(TranslateT("Stranger 1"));
- DeleteChatContact(TranslateT("Stranger 2"));
- }
- else DeleteChatContact(TranslateT("Stranger"));
-
- SetTopic(); // reset topic content
-
- Srmm_SetStatusText(GetChatHandle(), nullptr);
- }
- else return; // disconnecting or inactive
-
- facy.state_ = STATE_INACTIVE;
- facy.chat_id_.clear();
-}
-
-void OmegleProto::NewChat()
-{
- if (facy.state_ == STATE_WAITING) {
- UpdateChat(nullptr, TranslateT("We are already waiting for new stranger..."), false);
- return;
- }
-
- if (facy.state_ == STATE_ACTIVE || facy.state_ == STATE_SPY) {
- UpdateChat(nullptr, TranslateT("Disconnecting..."), true);
-
- if (facy.stop())
- debugLogA("***** Disconnected from stranger %s", facy.chat_id_.c_str());
- else
- debugLogA("***** Error in disconnecting from stranger %s", facy.chat_id_.c_str());
-
- if (facy.state_ == STATE_SPY) {
- DeleteChatContact(TranslateT("Stranger 1"));
- DeleteChatContact(TranslateT("Stranger 2"));
- }
- else {
- DeleteChatContact(TranslateT("Stranger"));
- }
-
- SetTopic(); // reset topic content
-
- ClearChat();
-
- UpdateChat(nullptr, TranslateT("Connecting..."), true);
-
- facy.state_ = STATE_WAITING;
-
- if (facy.start()) {
- UpdateChat(nullptr, TranslateT("Waiting for Stranger..."), true);
- debugLogA("***** Waiting for stranger %s", facy.chat_id_.c_str());
- }
- }
- else if (facy.state_ == STATE_DISCONNECTING) {
- //UpdateChat(NULL, TranslateT("We are disconnecting now, wait..."), false);
- return;
- }
- else {
- ClearChat();
- UpdateChat(nullptr, TranslateT("Connecting..."), true);
-
- facy.state_ = STATE_WAITING;
-
- if (facy.start()) {
- UpdateChat(nullptr, TranslateT("Waiting for Stranger..."), true);
- debugLogA("***** Waiting for stranger %s", facy.chat_id_.c_str());
-
- ForkThread(&OmegleProto::EventsLoop, this);
- }
- }
-}
-
-void OmegleProto::EventsLoop(void *)
-{
- ScopedLock s(events_loop_lock_);
-
- time_t tim = ::time(0);
- debugLogA(">>>>> Entering Omegle::EventsLoop[%d]", tim);
-
- while (facy.events()) {
- if (facy.state_ == STATE_INACTIVE || facy.state_ == STATE_DISCONNECTING || !isOnline())
- break;
- debugLogA("***** OmegleProto::EventsLoop[%d] refreshing...", tim);
- }
-
- ResetEvent(events_loop_lock_);
-
- Netlib_CloseHandle(facy.hConnection);
- facy.hConnection = nullptr;
-
- Netlib_CloseHandle(facy.hEventsConnection);
- facy.hEventsConnection = nullptr;
-
- debugLogA("<<<<< Exiting OmegleProto::EventsLoop[%d]", tim);
-}
diff --git a/protocols/Omegle/src/constants.h b/protocols/Omegle/src/constants.h deleted file mode 100644 index 960a07e980..0000000000 --- a/protocols/Omegle/src/constants.h +++ /dev/null @@ -1,47 +0,0 @@ -/*
-
-Omegle plugin for Miranda Instant Messenger
-_____________________________________________
-
-Copyright © 2011-17 Robert Pösel, 2017-23 Miranda NG team
-
-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
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-#pragma once
-
-// Product management
-#define OMEGLE_NAME "Omegle"
-#define OMEGLE_SERVER_REGULAR "https://www.omegle.com"
-#define OMEGLE_SERVER_CHAT "https://%s.omegle.com"
-
-// Limits
-#define OMEGLE_TIMEOUTS_LIMIT 6
-// There is "no limit" on Omegle, but we should set some wise limit
-#define OMEGLE_MESSAGE_LIMIT 4096
-#define OMEGLE_MESSAGE_LIMIT_TEXT "4096"
-
-#define OMEGLE_QUESTION_MIN_LENGTH 10
-
-// Omegle request types
-#define OMEGLE_REQUEST_HOME 100 // getting server name
-#define OMEGLE_REQUEST_COUNT 105 // get count of connected users
-#define OMEGLE_REQUEST_START 110 // starting conversation
-#define OMEGLE_REQUEST_STOP 120 // ending conversation
-#define OMEGLE_REQUEST_SEND 300 // sending message
-#define OMEGLE_REQUEST_EVENTS 301 // receiving events
-#define OMEGLE_REQUEST_TYPING_START 310 // started typing
-#define OMEGLE_REQUEST_TYPING_STOP 311 // stoped typing
-#define OMEGLE_REQUEST_RECAPTCHA 400 // recaptcha handling
diff --git a/protocols/Omegle/src/db.h b/protocols/Omegle/src/db.h deleted file mode 100644 index 45d3478828..0000000000 --- a/protocols/Omegle/src/db.h +++ /dev/null @@ -1,45 +0,0 @@ -/*
-
-Omegle plugin for Miranda Instant Messenger
-_____________________________________________
-
-Copyright © 2011-17 Robert Pösel, 2017-23 Miranda NG team
-
-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
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-#pragma once
-
-// DB macros
-#define getU8String( setting, dest ) db_get_utf( NULL, m_szModuleName, setting, dest )
-#define setU8String( setting, value ) db_set_utf( NULL, m_szModuleName, setting, value )
-
-// DB settings
-#define OMEGLE_KEY_TIMEOUTS_LIMIT "TimeoutsLimit" // [HIDDEN]
-
-#define OMEGLE_KEY_ASL "MessageAsl"
-#define OMEGLE_KEY_HI "MessageHi"
-#define OMEGLE_KEY_HI_ENABLED "MessageHiEnabled"
-#define OMEGLE_KEY_NAME "Nick"
-#define OMEGLE_KEY_DONT_STOP "DontStop"
-#define OMEGLE_KEY_NO_CLEAR "NoClear"
-#define OMEGLE_KEY_MEET_COMMON "MeetCommon"
-#define OMEGLE_KEY_INTERESTS "Interests"
-#define OMEGLE_KEY_REUSE_QUESTION "ReuseQuestion"
-#define OMEGLE_KEY_SERVER "Server"
-#define OMEGLE_KEY_LANGUAGE "Language"
-#define OMEGLE_KEY_SERVER_INFO "GetServerInfo"
-#define OMEGLE_KEY_LAST_QUESTION "LastQuestion"
-#define OMEGLE_KEY_AUTO_CONNECT "AutoConnect"
diff --git a/protocols/Omegle/src/dialogs.cpp b/protocols/Omegle/src/dialogs.cpp deleted file mode 100644 index 82708bf836..0000000000 --- a/protocols/Omegle/src/dialogs.cpp +++ /dev/null @@ -1,335 +0,0 @@ -/*
-
-Omegle plugin for Miranda Instant Messenger
-_____________________________________________
-
-Copyright © 2011-17 Robert Pösel, 2017-23 Miranda NG team
-
-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
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-#include "stdafx.h"
-
-struct
-{
- const char *id;
- const wchar_t *lang;
-}
-static languages[] = {
- { "en", LPGENW("English") },
- { "af", LPGENW("Afrikaans") },
- { "sq", LPGENW("Albanian") },
- { "ar", LPGENW("Arabic") },
- { "hy", LPGENW("Armenian") },
- { "az", LPGENW("Azerbaijani") },
- { "eu", LPGENW("Basque") },
- { "be", LPGENW("Belarusian") },
- { "bn", LPGENW("Bengali") },
- { "bs", LPGENW("Bosnian") },
- { "bg", LPGENW("Bulgarian") },
- { "ceb", LPGENW("Cebuano") },
- { "cs", LPGENW("Czech") },
- { "zh-CN", LPGENW("Chinese (simplified)") },
- { "zh-TW", LPGENW("Chinese (traditional)") },
- { "da", LPGENW("Danish") },
- { "eo", LPGENW("Esperanto") },
- { "et", LPGENW("Estonian") },
- { "tl", LPGENW("Filipino") },
- { "fi", LPGENW("Finnish") },
- { "fr", LPGENW("French") },
- { "gl", LPGENW("Galician") },
- { "ka", LPGENW("Georgian") },
- { "gu", LPGENW("Gujarati") },
- { "ht", LPGENW("Haitian Creole") },
- { "iw", LPGENW("Hebrew") },
- { "hi", LPGENW("Hindi") },
- { "hmn", LPGENW("Hmong") },
- { "nl", LPGENW("Dutch") },
- { "hr", LPGENW("Croat") },
- { "id", LPGENW("Indonesian") },
- { "ga", LPGENW("Irish") },
- { "is", LPGENW("Icelandic") },
- { "it", LPGENW("Italian") },
- { "ja", LPGENW("Japanese") },
- { "jw", LPGENW("Javanese") },
- { "yi", LPGENW("Yiddish") },
- { "kn", LPGENW("Kannada") },
- { "ca", LPGENW("Catalan") },
- { "km", LPGENW("Khmer") },
- { "ko", LPGENW("Korean") },
- { "lo", LPGENW("Lao") },
- { "la", LPGENW("Latina") },
- { "lt", LPGENW("Lithuanian") },
- { "lv", LPGENW("Latvian") },
- { "hu", LPGENW("Hungarian") },
- { "mk", LPGENW("Macedonian") },
- { "ms", LPGENW("Malay") },
- { "mt", LPGENW("Maltese") },
- { "mr", LPGENW("Marathi") },
- { "de", LPGENW("German") },
- { "no", LPGENW("Norwegian") },
- { "fa", LPGENW("Persian") },
- { "pl", LPGENW("Polish") },
- { "pt", LPGENW("Portuguese") },
- { "ro", LPGENW("Romanian") },
- { "ru", LPGENW("Russian") },
- { "el", LPGENW("Greek") },
- { "sk", LPGENW("Slovak") },
- { "sl", LPGENW("Slovenian") },
- { "sr", LPGENW("Serbian") },
- { "sw", LPGENW("Swahili") },
- { "es", LPGENW("Spanish") },
- { "sv", LPGENW("Swedish") },
- { "ta", LPGENW("Tamil") },
- { "te", LPGENW("Telugu") },
- { "th", LPGENW("Thai") },
- { "tr", LPGENW("Turkish") },
- { "uk", LPGENW("Ukrainian") },
- { "ur", LPGENW("Urdu") },
- { "cy", LPGENW("Welsh") },
- { "vi", LPGENW("Vietnamese") }
-};
-
-std::string Omegle_client::get_language()
-{
- int language = db_get_b(0, parent->m_szModuleName, OMEGLE_KEY_LANGUAGE, 0);
- if (language < 0 || language >= (_countof(languages)))
- language = 0;
-
- return language > 0 ? languages[language].id : "en";
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// Servers list
-
-static const char *servers[] = { LPGEN("Random"), "front1", "front2", "front3", "front4", "front5", "front6", "front7", "front8", "front9", "front10", "front11", "front12", "front13", "front14", "front15", "front16", "front17", "front18", "front19", "front20", "front21", "front22", "front23", "front24", "front25", "front26", "front27", "front28", "front29", "front30", "front31", "front32" };
-
-std::string Omegle_client::get_server(bool not_last)
-{
- int q = not_last ? 1 : 0;
-
- int server = db_get_b(0, parent->m_szModuleName, OMEGLE_KEY_SERVER, 0);
- if (server < 0 || server >= (int)(_countof(servers) - q))
- server = 0;
-
- if (server == 0) {
- srand(::time(0));
- server = (rand() % (_countof(servers) - 1 - q)) + 1;
- }
-
- return servers[server];
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// Options
-
-static BOOL LoadDBCheckState(OmegleProto* ppro, HWND hwnd, int idCtrl, const char* szSetting, uint8_t bDef = 0)
-{
- BOOL state = db_get_b(0, ppro->m_szModuleName, szSetting, bDef);
- CheckDlgButton(hwnd, idCtrl, state ? BST_CHECKED : BST_UNCHECKED);
- return state;
-}
-
-static BOOL StoreDBCheckState(OmegleProto* ppro, HWND hwnd, int idCtrl, const char* szSetting)
-{
- BOOL state = IsDlgButtonChecked(hwnd, idCtrl);
- db_set_b(0, ppro->m_szModuleName, szSetting, (uint8_t)state);
- return state;
-}
-
-static void LoadDBText(OmegleProto* ppro, HWND hwnd, int idCtrl, const char* szSetting)
-{
- ptrW tstr(db_get_wsa(0, ppro->m_szModuleName, szSetting));
- if (tstr)
- SetDlgItemText(hwnd, idCtrl, tstr);
-}
-
-static void StoreDBText(OmegleProto* ppro, HWND hwnd, int idCtrl, const char* szSetting)
-{
- wchar_t tstr[250 + 1];
-
- GetDlgItemText(hwnd, idCtrl, tstr, _countof(tstr));
- if (tstr[0] != '\0')
- db_set_ws(0, ppro->m_szModuleName, szSetting, tstr);
- else
- db_unset(0, ppro->m_szModuleName, szSetting);
-}
-
-INT_PTR CALLBACK OmegleAccountProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
-{
- OmegleProto *proto;
-
- switch (message) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwnd);
-
- proto = reinterpret_cast<OmegleProto*>(lparam);
- SetWindowLongPtr(hwnd, GWLP_USERDATA, lparam);
-
- SendDlgItemMessage(hwnd, IDC_INTERESTS, EM_LIMITTEXT, 512, 0);
-
- // Server
- SendDlgItemMessageA(hwnd, IDC_SERVER, CB_INSERTSTRING, 0, reinterpret_cast<LPARAM>(Translate(servers[0])));
- for (size_t i = 1; i < _countof(servers); i++)
- SendDlgItemMessageA(hwnd, IDC_SERVER, CB_INSERTSTRING, i, reinterpret_cast<LPARAM>(servers[i]));
- SendDlgItemMessage(hwnd, IDC_SERVER, CB_SETCURSEL, db_get_b(0, proto->m_szModuleName, OMEGLE_KEY_SERVER, 0), 0);
-
- // Language
- for (size_t i = 0; i < _countof(languages); i++)
- SendDlgItemMessageW(hwnd, IDC_LANGUAGE, CB_INSERTSTRING, i, reinterpret_cast<LPARAM>(TranslateW(languages[i].lang)));
- SendDlgItemMessage(hwnd, IDC_LANGUAGE, CB_SETCURSEL, db_get_b(0, proto->m_szModuleName, OMEGLE_KEY_LANGUAGE, 0), 0);
-
- LoadDBText(proto, hwnd, IDC_NAME, OMEGLE_KEY_NAME);
- LoadDBText(proto, hwnd, IDC_INTERESTS, OMEGLE_KEY_INTERESTS);
- LoadDBCheckState(proto, hwnd, IDC_MEET_COMMON, OMEGLE_KEY_MEET_COMMON);
- return TRUE;
-
- case WM_COMMAND:
- switch (LOWORD(wparam)) {
- case IDC_LANGUAGE:
- case IDC_SERVER:
- if (HIWORD(wparam) == CBN_SELCHANGE)
- SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
- break;
-
- case IDC_NAME:
- case IDC_INTERESTS:
- if (HIWORD(wparam) != EN_CHANGE || (HWND)lparam != GetFocus())
- return TRUE;
-
- SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
- break;
-
- case IDC_MEET_COMMON:
- if (HIWORD(wparam) == BN_CLICKED)
- SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
- break;
- }
- break;
-
- case WM_NOTIFY:
- if (reinterpret_cast<NMHDR*>(lparam)->code == PSN_APPLY) {
- proto = reinterpret_cast<OmegleProto*>(GetWindowLongPtr(hwnd, GWLP_USERDATA));
-
- db_set_b(0, proto->m_szModuleName, OMEGLE_KEY_SERVER, SendDlgItemMessage(hwnd, IDC_SERVER, CB_GETCURSEL, 0, 0));
- db_set_b(0, proto->m_szModuleName, OMEGLE_KEY_LANGUAGE, SendDlgItemMessage(hwnd, IDC_LANGUAGE, CB_GETCURSEL, 0, 0));
-
- StoreDBText(proto, hwnd, IDC_NAME, OMEGLE_KEY_NAME);
- StoreDBText(proto, hwnd, IDC_INTERESTS, OMEGLE_KEY_INTERESTS);
- StoreDBCheckState(proto, hwnd, IDC_MEET_COMMON, OMEGLE_KEY_MEET_COMMON);
- return TRUE;
- }
- break;
- }
- return FALSE;
-}
-
-INT_PTR CALLBACK OmegleOptionsProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam)
-{
- OmegleProto *proto = reinterpret_cast<OmegleProto*>(GetWindowLongPtr(hwnd, GWLP_USERDATA));
-
- switch (message) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwnd);
-
- proto = reinterpret_cast<OmegleProto*>(lparam);
- SetWindowLongPtr(hwnd, GWLP_USERDATA, lparam);
-
- SendDlgItemMessage(hwnd, IDC_INTERESTS, EM_LIMITTEXT, 250, 0);
- SendDlgItemMessage(hwnd, IDC_HI_MESSAGE, EM_LIMITTEXT, 250, 0);
- SendDlgItemMessage(hwnd, IDC_ASL_MESSAGE, EM_LIMITTEXT, 250, 0);
-
- // Server
- SendDlgItemMessageA(hwnd, IDC_SERVER, CB_INSERTSTRING, 0, reinterpret_cast<LPARAM>(Translate(servers[0])));
- for (size_t i = 1; i < _countof(servers); i++)
- SendDlgItemMessageA(hwnd, IDC_SERVER, CB_INSERTSTRING, i, reinterpret_cast<LPARAM>(servers[i]));
- SendDlgItemMessage(hwnd, IDC_SERVER, CB_SETCURSEL, db_get_b(0, proto->m_szModuleName, OMEGLE_KEY_SERVER, 0), 0);
-
- // Language
- for (size_t i = 0; i < _countof(languages); i++)
- SendDlgItemMessageW(hwnd, IDC_LANGUAGE, CB_INSERTSTRING, i, reinterpret_cast<LPARAM>(TranslateW(languages[i].lang)));
- SendDlgItemMessage(hwnd, IDC_LANGUAGE, CB_SETCURSEL, db_get_b(0, proto->m_szModuleName, OMEGLE_KEY_LANGUAGE, 0), 0);
-
- LoadDBText(proto, hwnd, IDC_NAME, OMEGLE_KEY_NAME);
- LoadDBText(proto, hwnd, IDC_INTERESTS, OMEGLE_KEY_INTERESTS);
- LoadDBText(proto, hwnd, IDC_HI_MESSAGE, OMEGLE_KEY_HI);
- LoadDBText(proto, hwnd, IDC_ASL_MESSAGE, OMEGLE_KEY_ASL);
- LoadDBText(proto, hwnd, IDC_LAST_QUESTION, OMEGLE_KEY_LAST_QUESTION);
-
- LoadDBCheckState(proto, hwnd, IDC_MEET_COMMON, OMEGLE_KEY_MEET_COMMON);
- LoadDBCheckState(proto, hwnd, IDC_HI_ENABLED, OMEGLE_KEY_HI_ENABLED);
- LoadDBCheckState(proto, hwnd, IDC_NOCLEAR, OMEGLE_KEY_NO_CLEAR);
- LoadDBCheckState(proto, hwnd, IDC_DONTSTOP, OMEGLE_KEY_DONT_STOP);
- LoadDBCheckState(proto, hwnd, IDC_REUSE_QUESTIONS, OMEGLE_KEY_REUSE_QUESTION);
- LoadDBCheckState(proto, hwnd, IDC_SERVER_INFO, OMEGLE_KEY_SERVER_INFO);
- LoadDBCheckState(proto, hwnd, IDC_AUTO_CONNECT, OMEGLE_KEY_AUTO_CONNECT);
- return TRUE;
-
- case WM_COMMAND:
- switch (LOWORD(wparam)) {
- case IDC_SERVER:
- case IDC_LANGUAGE:
- if (HIWORD(wparam) == CBN_SELCHANGE)
- SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
- break;
-
- case IDC_NAME:
- case IDC_INTERESTS:
- case IDC_HI_MESSAGE:
- case IDC_ASL_MESSAGE:
- if (HIWORD(wparam) != EN_CHANGE || (HWND)lparam != GetFocus())
- return TRUE;
-
- SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
- break;
- case IDC_MEET_COMMON:
- case IDC_HI_ENABLED:
- case IDC_NOCLEAR:
- case IDC_DONTSTOP:
- case IDC_REUSE_QUESTIONS:
- case IDC_SERVER_INFO:
- case IDC_AUTO_CONNECT:
- if (HIWORD(wparam) == BN_CLICKED)
- SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
- break;
- }
- break;
-
- case WM_NOTIFY:
- if (reinterpret_cast<NMHDR*>(lparam)->code == PSN_APPLY) {
- proto = reinterpret_cast<OmegleProto*>(GetWindowLongPtr(hwnd, GWLP_USERDATA));
-
- db_set_b(0, proto->m_szModuleName, OMEGLE_KEY_SERVER, SendDlgItemMessage(hwnd, IDC_SERVER, CB_GETCURSEL, 0, 0));
- db_set_b(0, proto->m_szModuleName, OMEGLE_KEY_LANGUAGE, SendDlgItemMessage(hwnd, IDC_LANGUAGE, CB_GETCURSEL, 0, 0));
-
- StoreDBText(proto, hwnd, IDC_NAME, OMEGLE_KEY_NAME);
- StoreDBText(proto, hwnd, IDC_INTERESTS, OMEGLE_KEY_INTERESTS);
- StoreDBText(proto, hwnd, IDC_HI_MESSAGE, OMEGLE_KEY_HI);
- StoreDBText(proto, hwnd, IDC_ASL_MESSAGE, OMEGLE_KEY_ASL);
-
- StoreDBCheckState(proto, hwnd, IDC_MEET_COMMON, OMEGLE_KEY_MEET_COMMON);
- StoreDBCheckState(proto, hwnd, IDC_HI_ENABLED, OMEGLE_KEY_HI_ENABLED);
- StoreDBCheckState(proto, hwnd, IDC_NOCLEAR, OMEGLE_KEY_NO_CLEAR);
- StoreDBCheckState(proto, hwnd, IDC_DONTSTOP, OMEGLE_KEY_DONT_STOP);
- StoreDBCheckState(proto, hwnd, IDC_REUSE_QUESTIONS, OMEGLE_KEY_REUSE_QUESTION);
- StoreDBCheckState(proto, hwnd, IDC_SERVER_INFO, OMEGLE_KEY_SERVER_INFO);
- StoreDBCheckState(proto, hwnd, IDC_AUTO_CONNECT, OMEGLE_KEY_AUTO_CONNECT);
- return TRUE;
- }
- break;
- }
-
- return FALSE;
-}
diff --git a/protocols/Omegle/src/dialogs.h b/protocols/Omegle/src/dialogs.h deleted file mode 100644 index 080b36c07a..0000000000 --- a/protocols/Omegle/src/dialogs.h +++ /dev/null @@ -1,26 +0,0 @@ -/*
-
-Omegle plugin for Miranda Instant Messenger
-_____________________________________________
-
-Copyright © 2011-17 Robert Pösel, 2017-23 Miranda NG team
-
-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
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-#pragma once
-
-INT_PTR CALLBACK OmegleAccountProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam);
-INT_PTR CALLBACK OmegleOptionsProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam);
diff --git a/protocols/Omegle/src/http.h b/protocols/Omegle/src/http.h deleted file mode 100644 index b107aaf3a0..0000000000 --- a/protocols/Omegle/src/http.h +++ /dev/null @@ -1,36 +0,0 @@ -/*
-
-Omegle plugin for Miranda Instant Messenger
-_____________________________________________
-
-Copyright © 2011-17 Robert Pösel, 2017-23 Miranda NG team
-
-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
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-#pragma once
-
-#define HTTP_CODE_FAKE_DISCONNECTED 0
-
-namespace http
-{
- struct response
- {
- response() : code(0) {}
- int code;
- std::map< std::string, std::string > headers;
- std::string data;
- };
-}
diff --git a/protocols/Omegle/src/main.cpp b/protocols/Omegle/src/main.cpp deleted file mode 100644 index 72b1edc3cd..0000000000 --- a/protocols/Omegle/src/main.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/*
-
-Omegle plugin for Miranda Instant Messenger
-_____________________________________________
-
-Copyright © 2011-17 Robert Pösel, 2017-23 Miranda NG team
-
-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
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-#include "stdafx.h"
-
-// TODO: Make following as "globals" structure?
-
-CMPlugin g_plugin;
-
-uint32_t g_mirandaVersion;
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-PLUGININFOEX pluginInfoEx = {
- sizeof(PLUGININFOEX),
- __PLUGIN_NAME,
- PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
- __DESCRIPTION,
- __AUTHOR,
- __COPYRIGHT,
- __AUTHORWEB,
- UNICODE_AWARE,
- // {9E1D9244-606C-4ef4-99A0-1D7D23CB7601}
- { 0x9e1d9244, 0x606c, 0x4ef4, { 0x99, 0xa0, 0x1d, 0x7d, 0x23, 0xcb, 0x76, 0x1 } }
-};
-
-CMPlugin::CMPlugin() :
- ACCPROTOPLUGIN<OmegleProto>("Omegle", pluginInfoEx)
-{
- SetUniqueId("Nick");
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// Interface information
-
-extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOCOL, MIID_LAST };
-
-/////////////////////////////////////////////////////////////////////////////////////////
-// Load
-
-int CMPlugin::Load()
-{
- InitIcons();
- return 0;
-}
diff --git a/protocols/Omegle/src/messages.cpp b/protocols/Omegle/src/messages.cpp deleted file mode 100644 index fd7a79e4ae..0000000000 --- a/protocols/Omegle/src/messages.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/*
-
-Omegle plugin for Miranda Instant Messenger
-_____________________________________________
-
-Copyright © 2011-17 Robert Pösel, 2017-23 Miranda NG team
-
-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
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-#include "stdafx.h"
-
-void OmegleProto::SendMsgWorker(void *p)
-{
- if (p == nullptr)
- return;
-
- std::string data = *(std::string*)p;
- delete (std::string*)p;
-
- data = utils::text::trim(data);
-
- if (facy.state_ == STATE_ACTIVE && data.length() && facy.send_message(data)) {
- wchar_t *msg = mir_a2u_cp(data.c_str(), CP_UTF8);
- UpdateChat(facy.nick_, msg);
- mir_free(msg);
- }
-}
-
-void OmegleProto::SendTypingWorker(void *p)
-{
- if (p == nullptr)
- return;
-
- // Save typing info
- bool typ = (*static_cast<int*>(p) == PROTOTYPE_SELFTYPING_ON);
- delete (int*)p;
-
- // Ignore same typing info
- if (facy.typing_ == typ)
- return;
-
- if (facy.state_ != STATE_ACTIVE)
- return;
-
- facy.typing_ = typ;
-
- if (typ)
- facy.typing_start();
- else
- facy.typing_stop();
-}
-
-void OmegleProto::NewChatWorker(void*)
-{
- NewChat();
-}
-
-void OmegleProto::StopChatWorker(void*)
-{
- StopChat();
-}
diff --git a/protocols/Omegle/src/proto.cpp b/protocols/Omegle/src/proto.cpp deleted file mode 100644 index 36b85b01dd..0000000000 --- a/protocols/Omegle/src/proto.cpp +++ /dev/null @@ -1,174 +0,0 @@ -/*
-
-Omegle plugin for Miranda Instant Messenger
-_____________________________________________
-
-Copyright © 2011-17 Robert Pösel, 2017-23 Miranda NG team
-
-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
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-#include "stdafx.h"
-
-OmegleProto::OmegleProto(const char* proto_name, const wchar_t* username) :
- PROTO<OmegleProto>(proto_name, username)
-{
- this->facy.parent = this;
-
- this->signon_lock_ = CreateMutex(nullptr, FALSE, nullptr);
- this->log_lock_ = CreateMutex(nullptr, FALSE, nullptr);
- this->facy.connection_lock_ = CreateMutex(nullptr, FALSE, nullptr);
- this->events_loop_lock_ = CreateMutex(nullptr, FALSE, nullptr);
-
- // Group chats
- CreateProtoService(PS_JOINCHAT, &OmegleProto::OnJoinChat);
- CreateProtoService(PS_LEAVECHAT, &OmegleProto::OnLeaveChat);
-
- HookProtoEvent(ME_OPT_INITIALISE, &OmegleProto::OnOptionsInit);
- HookProtoEvent(ME_GC_EVENT, &OmegleProto::OnChatEvent);
-
- // Create standard network connection
- NETLIBUSER nlu = {};
- nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE;
- nlu.szSettingsModule = m_szModuleName;
- nlu.szDescriptiveName.w = m_tszUserName;
- m_hNetlibUser = Netlib_RegisterUser(&nlu);
- if (m_hNetlibUser == nullptr) {
- wchar_t error[200];
- mir_snwprintf(error, TranslateT("Unable to initialize Netlib for %s."), m_tszUserName);
- MessageBox(nullptr, error, L"Miranda NG", MB_OK | MB_ICONERROR);
- }
-
- facy.set_handle(m_hNetlibUser);
-
- g_plugin.addSound("StrangerTyp", m_tszUserName, LPGENW("Stranger is typing"));
- g_plugin.addSound("StrangerTypStop", m_tszUserName, LPGENW("Stranger stopped typing"));
- g_plugin.addSound("StrangerChange", m_tszUserName, LPGENW("Changing stranger"));
- g_plugin.addSound("StrangerMessage", m_tszUserName, LPGENW("Receive message"));
-
- // Register group chat
- GCREGISTER gcr = {};
- gcr.dwFlags = 0; //GC_TYPNOTIF; //GC_ACKMSG;
- gcr.pszModule = m_szModuleName;
- gcr.ptszDispName = m_tszUserName;
- gcr.iMaxText = OMEGLE_MESSAGE_LIMIT;
- Chat_Register(&gcr);
-}
-
-OmegleProto::~OmegleProto()
-{
- Netlib_CloseHandle(m_hNetlibUser);
-
- WaitForSingleObject(this->signon_lock_, IGNORE);
- WaitForSingleObject(this->log_lock_, IGNORE);
- WaitForSingleObject(this->events_loop_lock_, IGNORE);
-
- CloseHandle(this->signon_lock_);
- CloseHandle(this->log_lock_);
- CloseHandle(this->events_loop_lock_);
- CloseHandle(this->facy.connection_lock_);
-}
-
-//////////////////////////////////////////////////////////////////////////////
-
-INT_PTR OmegleProto::GetCaps(int type, MCONTACT)
-{
- switch (type) {
- case PFLAGNUM_1:
- return PF1_CHAT;
- case PFLAGNUM_2:
- return PF2_ONLINE;
- case PFLAGNUM_4:
- return PF4_SUPPORTTYPING;
- case PFLAG_MAXLENOFMESSAGE:
- return OMEGLE_MESSAGE_LIMIT;
- case PFLAG_UNIQUEIDTEXT:
- return (INT_PTR)TranslateT("Visible name");
- }
- return 0;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-
-int OmegleProto::SetStatus(int new_status)
-{
- // Routing statuses not supported by Omegle
- switch (new_status) {
- case ID_STATUS_OFFLINE:
- case ID_STATUS_CONNECTING:
- new_status = ID_STATUS_OFFLINE;
- break;
- default:
- new_status = ID_STATUS_ONLINE;
- break;
- }
-
- m_iDesiredStatus = new_status;
-
- if (new_status == m_iStatus)
- return 0;
-
- if (m_iStatus == ID_STATUS_CONNECTING && new_status != ID_STATUS_OFFLINE)
- return 0;
-
- if (new_status == ID_STATUS_OFFLINE)
- ForkThread(&OmegleProto::SignOff, this);
- else
- ForkThread(&OmegleProto::SignOn, this);
-
- return 0;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// EVENTS
-
-MWindow OmegleProto::OnCreateAccMgrUI(MWindow hwndParent)
-{
- return CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_OmegleACCOUNT), hwndParent, OmegleAccountProc, (LPARAM)this);
-}
-
-void OmegleProto::OnShutdown()
-{
- SetStatus(ID_STATUS_OFFLINE);
-}
-
-int OmegleProto::OnOptionsInit(WPARAM wParam, LPARAM)
-{
- OPTIONSDIALOGPAGE odp = {};
- odp.szTitle.w = m_tszUserName;
- odp.dwInitParam = LPARAM(this);
- odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE | ODPF_DONTTRANSLATE;
-
- odp.position = 271828;
- odp.szGroup.w = LPGENW("Network");
- odp.szTab.w = LPGENW("Account");
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
- odp.pfnDlgProc = OmegleOptionsProc;
- g_plugin.addOptions(wParam, &odp);
- return 0;
-}
-
-void OmegleProto::OnContactDeleted(MCONTACT)
-{
- OnLeaveChat(NULL, NULL);
-}
-
-int OmegleProto::UserIsTyping(MCONTACT hContact, int type)
-{
- if (hContact && facy.state_ == STATE_ACTIVE)
- ForkThread(&OmegleProto::SendTypingWorker, new int(type));
-
- return 0;
-}
diff --git a/protocols/Omegle/src/proto.h b/protocols/Omegle/src/proto.h deleted file mode 100644 index da10733393..0000000000 --- a/protocols/Omegle/src/proto.h +++ /dev/null @@ -1,109 +0,0 @@ -/*
-
-Omegle plugin for Miranda Instant Messenger
-_____________________________________________
-
-Copyright © 2011-17 Robert Pösel, 2017-23 Miranda NG team
-
-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
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-#pragma once
-
-class OmegleProto : public PROTO<OmegleProto>
-{
- SESSION_INFO *m_si;
-
-public:
- OmegleProto(const char *proto_name, const wchar_t *username);
- ~OmegleProto();
-
- inline const char* ModuleName() const
- {
- return m_szModuleName;
- }
-
- inline bool isOnline()
- {
- return (m_iStatus != ID_STATUS_OFFLINE && m_iStatus != ID_STATUS_CONNECTING);
- }
-
- inline bool isOffline()
- {
- return (m_iStatus == ID_STATUS_OFFLINE);
- }
-
- // PROTO_INTERFACE
-
- INT_PTR GetCaps(int type, MCONTACT hContact = NULL) override;
-
- int SetStatus(int iNewStatus) override;
-
- int UserIsTyping(MCONTACT hContact, int type) override;
-
- void OnContactDeleted(MCONTACT) override;
- MWindow OnCreateAccMgrUI(MWindow) override;
- void OnShutdown() override;
-
- // Events
- int __cdecl OnOptionsInit(WPARAM, LPARAM);
-
- // Chat handling
- int __cdecl OnChatEvent(WPARAM, LPARAM);
- INT_PTR __cdecl OnJoinChat(WPARAM, LPARAM);
- INT_PTR __cdecl OnLeaveChat(WPARAM, LPARAM);
-
- // Loops
- void __cdecl EventsLoop(void*);
-
- // Worker threads
- void __cdecl SignOn(void*);
- void __cdecl SignOff(void*);
-
- void __cdecl SendMsgWorker(void*);
- void __cdecl SendTypingWorker(void*);
-
- void __cdecl NewChatWorker(void*);
- void __cdecl StopChatWorker(void*);
-
- void StopChat(bool disconnect = true);
- void NewChat();
-
- // Chat handling
- void UpdateChat(const wchar_t *name, const wchar_t *message, bool addtochat = true);
- void SendChatMessage(std::string message);
- void AddChatContact(const wchar_t *nick);
- void DeleteChatContact(const wchar_t *name);
- void SetChatStatus(int);
- void ClearChat();
- void SetTopic(const wchar_t *topic = nullptr);
- MCONTACT GetChatHandle();
-
- // Connection client
- Omegle_client facy;
-
- HANDLE signon_lock_;
- HANDLE log_lock_;
- HANDLE events_loop_lock_;
-
- static void CALLBACK APC_callback(ULONG_PTR p);
-};
-
-struct CMPlugin : public ACCPROTOPLUGIN<OmegleProto>
-{
- CMPlugin();
-
- int Load() override;
-};
diff --git a/protocols/Omegle/src/resource.h b/protocols/Omegle/src/resource.h deleted file mode 100644 index 6d48095934..0000000000 --- a/protocols/Omegle/src/resource.h +++ /dev/null @@ -1,35 +0,0 @@ -//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by ..\res\omegle.rc
-//
-#define IDI_OMEGLE 101
-#define IDI_TYPING_ON 105
-#define IDI_TYPING_OFF 106
-#define IDD_OmegleACCOUNT 111
-#define IDD_OPTIONS 122
-#define IDC_SERVER 1204
-#define IDC_NAME 1205
-#define IDC_MEET_COMMON 1206
-#define IDC_INTERESTS 1207
-#define IDC_HI_ENABLED 1208
-#define IDC_SERVER2 1208
-#define IDC_HI_MESSAGE 1209
-#define IDC_ASL_MESSAGE 1210
-#define IDC_LAST_QUESTION 1211
-#define IDC_LANGUAGE 1212
-#define IDC_NOCLEAR 1213
-#define IDC_DONTSTOP 1214
-#define IDC_REUSE_QUESTIONS 1215
-#define IDC_SERVER_INFO 1217
-#define IDC_AUTO_CONNECT 1219
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 124
-#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1208
-#define _APS_NEXT_SYMED_VALUE 131
-#endif
-#endif
diff --git a/protocols/Omegle/src/stdafx.cxx b/protocols/Omegle/src/stdafx.cxx deleted file mode 100644 index ebbde0ade1..0000000000 --- a/protocols/Omegle/src/stdafx.cxx +++ /dev/null @@ -1,18 +0,0 @@ -/*
-Copyright (C) 2012-23 Miranda NG team (https://miranda-ng.org)
-
-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 the Free Software Foundation version 2
-of the License.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "stdafx.h"
\ No newline at end of file diff --git a/protocols/Omegle/src/stdafx.h b/protocols/Omegle/src/stdafx.h deleted file mode 100644 index 81425082c5..0000000000 --- a/protocols/Omegle/src/stdafx.h +++ /dev/null @@ -1,97 +0,0 @@ -/*
-
-Omegle plugin for Miranda Instant Messenger
-_____________________________________________
-
-Copyright © 2011-17 Robert Pösel, 2017-23 Miranda NG team
-
-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
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-#pragma once
-
-#pragma warning(disable:4996)
-
-#include <string>
-#include <cstring>
-#include <sstream>
-#include <fstream>
-#include <map>
-#include <vector>
-#include <stdarg.h>
-#include <time.h>
-#include <assert.h>
-#include <io.h>
-
-#include <windows.h>
-#include <commctrl.h>
-
-#include <newpluginapi.h>
-#include <m_system.h>
-#include <m_chat_int.h>
-#include <m_clistint.h>
-#include <m_langpack.h>
-#include <m_netlib.h>
-#include <m_options.h>
-#include <m_popup.h>
-#include <m_protocols.h>
-#include <m_protosvc.h>
-#include <m_protoint.h>
-#include <m_skin.h>
-#include <statusmodes.h>
-#include <m_icolib.h>
-#include <m_utils.h>
-#include <m_hotkeys.h>
-#include <m_message.h>
-#include <m_http.h>
-#include <m_json.h>
-
-#include "version.h"
-
-class OmegleProto;
-
-#include "../../utils/std_string_utils.h"
-
-#include "http.h"
-#include "client.h"
-#include "proto.h"
-#include "db.h"
-#include "constants.h"
-#include "dialogs.h"
-#include "theme.h"
-#include "resource.h"
-
-extern uint32_t g_mirandaVersion;
-
-class ScopedLock
-{
-public:
- ScopedLock(HANDLE h) : handle_(h)
- {
- WaitForSingleObject(handle_, INFINITE);
- }
- ~ScopedLock()
- {
- if (handle_)
- ReleaseMutex(handle_);
- }
- void Unlock()
- {
- ReleaseMutex(handle_);
- handle_ = nullptr;
- }
-private:
- HANDLE handle_;
-};
diff --git a/protocols/Omegle/src/theme.cpp b/protocols/Omegle/src/theme.cpp deleted file mode 100644 index f9899adbe9..0000000000 --- a/protocols/Omegle/src/theme.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/*
-
-Omegle plugin for Miranda Instant Messenger
-_____________________________________________
-
-Copyright © 2011-17 Robert Pösel, 2017-23 Miranda NG team
-
-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
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-#include "stdafx.h"
-
-static IconItem iconList[] =
-{
- { LPGEN("Omegle Icon"), "omegle", IDI_OMEGLE },
- { LPGEN("Stranger is typing"), "typing_on", IDI_TYPING_ON },
- { LPGEN("Stranger stopped typing"), "typing_off", IDI_TYPING_OFF },
-};
-
-void InitIcons(void)
-{
- g_plugin.registerIcon("Protocols/Omegle", iconList, "Omegle");
-}
diff --git a/protocols/Omegle/src/theme.h b/protocols/Omegle/src/theme.h deleted file mode 100644 index 0418ca4268..0000000000 --- a/protocols/Omegle/src/theme.h +++ /dev/null @@ -1,25 +0,0 @@ -/*
-
-Omegle plugin for Miranda Instant Messenger
-_____________________________________________
-
-Copyright © 2011-17 Robert Pösel, 2017-23 Miranda NG team
-
-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
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-*/
-
-#pragma once
-
-void InitIcons(void);
diff --git a/protocols/Omegle/src/version.h b/protocols/Omegle/src/version.h deleted file mode 100644 index 3780281020..0000000000 --- a/protocols/Omegle/src/version.h +++ /dev/null @@ -1,13 +0,0 @@ -#define __MAJOR_VERSION 0
-#define __MINOR_VERSION 1
-#define __RELEASE_NUM 3
-#define __BUILD_NUM 4
-
-#include <stdver.h>
-
-#define __PLUGIN_NAME "Omegle protocol"
-#define __FILENAME "Omegle.dll"
-#define __DESCRIPTION "Omegle protocol support for Miranda NG."
-#define __AUTHOR "Robert Pösel"
-#define __AUTHORWEB "https://miranda-ng.org/p/Omegle"
-#define __COPYRIGHT "© 2011-17 Robert Pösel, 2017-23 Miranda NG team"
diff --git a/src/mir_app/src/newplugins.cpp b/src/mir_app/src/newplugins.cpp index 0fadf63e72..da6318d9e0 100644 --- a/src/mir_app/src/newplugins.cpp +++ b/src/mir_app/src/newplugins.cpp @@ -133,6 +133,7 @@ static const MUUID pluginBannedList[] = { 0x69b9443b, 0xdc58, 0x4876, { 0xad, 0x39, 0xe3, 0xf4, 0x18, 0xa1, 0x33, 0xc5 } }, // mTextControl
{ 0x97724af9, 0xf3fb, 0x47d3, { 0xa3, 0xbf, 0xea, 0xa9, 0x35, 0xc7, 0x4e, 0x6d } }, // msn
{ 0x45230488, 0x977b, 0x405b, { 0x85, 0x6d, 0xea, 0x27, 0x6d, 0x70, 0x83, 0xb7 } }, // Rate
+ { 0x9e1d9244, 0x606c, 0x4ef4, { 0x99, 0xa0, 0x1d, 0x7d, 0x23, 0xcb, 0x76, 0x01 } }, // Omegle
};
bool isPluginBanned(const MUUID &u1)
|