summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/main.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-07-02 08:52:29 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-07-02 08:52:29 +0000
commit2481102c6541df37a773569dd4d67b579f04d819 (patch)
treec8dac50aac18414c42e8c024340eab7a6ee5ab32 /plugins/MirLua/src/main.cpp
parentcea0c911bc4bb8d527739cbaf1a098ac2344a7d8 (diff)
MirLua:
- removed console - changed logging (via netlib) - version bump git-svn-id: http://svn.miranda-ng.org/main/trunk@14467 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/main.cpp')
-rw-r--r--plugins/MirLua/src/main.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/MirLua/src/main.cpp b/plugins/MirLua/src/main.cpp
index 62ebb97be3..e9bf5fff64 100644
--- a/plugins/MirLua/src/main.cpp
+++ b/plugins/MirLua/src/main.cpp
@@ -8,6 +8,8 @@ HINSTANCE g_hInstance;
HANDLE g_hCommonFolderPath;
HANDLE g_hCustomFolderPath;
+HANDLE hNetlib = NULL;
+
CMLua *g_mLua;
PLUGININFOEX pluginInfo =
@@ -54,6 +56,13 @@ extern "C" int __declspec(dllexport) Load(void)
g_hCommonFolderPath = FoldersRegisterCustomPathT("MirLua", Translate("Common scripts folder"), COMMON_SCRIPTS_PATHT);
g_hCustomFolderPath = FoldersRegisterCustomPathT("MirLua", Translate("Custom scripts folder"), CUSTOM_SCRIPTS_PATHT);
+ NETLIBUSER nlu = { 0 };
+ nlu.cbSize = sizeof(nlu);
+ nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_UNICODE;
+ nlu.ptszDescriptiveName = _T(MODULE);
+ nlu.szSettingsModule = MODULE;
+ hNetlib = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
+
g_mLua = new CMLua();
return 0;
@@ -63,5 +72,11 @@ extern "C" int __declspec(dllexport) Unload(void)
{
delete g_mLua;
+ if (hNetlib)
+ {
+ Netlib_CloseHandle(hNetlib);
+ hNetlib = NULL;
+ }
+
return 0;
}