diff options
author | George Hazan <ghazan@miranda.im> | 2018-11-12 20:12:53 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-11-12 20:12:53 +0300 |
commit | 488214ac8af0c4aeb1a5c1d8fd48368daaf4c4c7 (patch) | |
tree | 96b0db981b4f5054f24d484902b597ba7da1c1a5 /plugins/HTTPServer | |
parent | 9b35784c5042984fbb60785f0a4a41a64af545f6 (diff) |
end of ME_OPT_INITIALISE related zoo in another plugins
Diffstat (limited to 'plugins/HTTPServer')
-rw-r--r-- | plugins/HTTPServer/src/GuiElements.cpp | 4 | ||||
-rw-r--r-- | plugins/HTTPServer/src/main.cpp | 10 |
2 files changed, 5 insertions, 9 deletions
diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp index 66fddc14aa..de1a8553af 100644 --- a/plugins/HTTPServer/src/GuiElements.cpp +++ b/plugins/HTTPServer/src/GuiElements.cpp @@ -28,8 +28,6 @@ static HANDLE hShowStatisticsViewService = nullptr; static HANDLE hShareNewFileMenuItem = nullptr;
static HANDLE hShowStatisticsViewMenuItem = nullptr;
-static HANDLE hEventOptionsInitialize = nullptr;
-
HWND hwndStatsticView = nullptr;
bool bLastAutoRefress = false;
@@ -1455,7 +1453,5 @@ void InitGuiElements() hShowStatisticsViewMenuItem = Menu_AddMainMenuItem(&mi);
}
- hEventOptionsInitialize = HookEvent(ME_OPT_INITIALISE, OptionsInitialize);
-
bShowPopups = db_get_b(NULL, MODULENAME, "ShowPopups", bShowPopups) != 0;
}
diff --git a/plugins/HTTPServer/src/main.cpp b/plugins/HTTPServer/src/main.cpp index b20ef338c1..bc3e9e4d57 100644 --- a/plugins/HTTPServer/src/main.cpp +++ b/plugins/HTTPServer/src/main.cpp @@ -42,8 +42,8 @@ const char* pszDefaultShares[] = { nullptr, nullptr
};
-void ConnectionOpen(HANDLE hNewConnection, DWORD dwRemoteIP);
-int PreShutdown(WPARAM /*wparam*/, LPARAM /*lparam*/);
+int OptionsInitialize(WPARAM, LPARAM);
+int PreShutdown(WPARAM, LPARAM);
HNETLIBUSER hNetlibUser;
HANDLE hDirectBoundPort;
@@ -74,7 +74,6 @@ int nMaxConnectionsPerUser = -1; int nDefaultDownloadLimit = -1;
bool bIsOnline = true;
-static HANDLE hEventProtoAck = nullptr;
bool bLimitOnlyWhenOnline = true;
@@ -330,7 +329,7 @@ bool bReadConfigurationFile() bool bWriteConfigurationFile()
{
CLFileShareListAccess clCritSection;
- char szBuf[1000], temp[200];
+ char szBuf[1000];
mir_strcpy(szBuf, szPluginPath);
mir_strcat(szBuf, szConfigFile);
HANDLE hFile = CreateFile(szBuf, GENERIC_WRITE, FILE_SHARE_READ, nullptr, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
@@ -833,7 +832,8 @@ int CMPlugin::Load() db_set_b(NULL, MODULENAME, "IndexCreationMode", (BYTE)indexCreationMode);
}
- hEventProtoAck = HookEvent(ME_PROTO_ACK, nProtoAck);
+ HookEvent(ME_OPT_INITIALISE, OptionsInitialize);
+ HookEvent(ME_PROTO_ACK, nProtoAck);
return 0;
}
|