From 631e22caadf37a547bafccc0f90251621b0bd987 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Mon, 22 Jun 2015 14:21:07 +0000 Subject: MirLua: console refactoring git-svn-id: http://svn.miranda-ng.org/main/trunk@14328 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/main.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'plugins/MirLua/src/main.cpp') diff --git a/plugins/MirLua/src/main.cpp b/plugins/MirLua/src/main.cpp index a747a6ea9e..64fc38f641 100644 --- a/plugins/MirLua/src/main.cpp +++ b/plugins/MirLua/src/main.cpp @@ -9,7 +9,6 @@ HANDLE g_hCommonFolderPath; HANDLE g_hCustomFolderPath; CMLua *g_mLua; -HANDLE hConsole = NULL; PLUGININFOEX pluginInfo = { @@ -62,33 +61,18 @@ extern "C" int __declspec(dllexport) Load(void) { mir_getLP(&pluginInfo); - if (db_get_b(NULL, MODULE, "ShowConsole", 0)) - { - if (!AttachConsole(ATTACH_PARENT_PROCESS)) - if (AllocConsole()) - { - freopen("CONOUT$", "w", stdout); - hConsole = CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE, 0, NULL, CONSOLE_TEXTMODE_BUFFER, NULL); - SetConsoleTitle(_T("MirLua Console")); - } - } + HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded); g_hCommonFolderPath = FoldersRegisterCustomPathT("MirLua", Translate("Common scripts folder"), COMMON_SCRIPTS_PATHT); g_hCustomFolderPath = FoldersRegisterCustomPathT("MirLua", Translate("Custom scripts folder"), CUSTOM_SCRIPTS_PATHT); g_mLua = new CMLua(); - HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded); - return 0; } extern "C" int __declspec(dllexport) Unload(void) { - if (hConsole) - CloseHandle(hConsole); - FreeConsole(); - delete g_mLua; return 0; -- cgit v1.2.3