diff options
author | Robert Pösel <robyer@seznam.cz> | 2012-07-12 13:10:56 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2012-07-12 13:10:56 +0000 |
commit | ea0f78b397cc5acc88d286ef0c78e9aeafbf242d (patch) | |
tree | acbea0a18a2eb9a9a0115f8116c34ec0a0725666 /plugins/WhoUsesMyFiles/wumfplug.c | |
parent | f53121766f887f34a489c06669735ccbd2a859ab (diff) |
WUMF: don't block whole plugin without admin privileges, but only monitoring.
git-svn-id: http://svn.miranda-ng.org/main/trunk@921 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/WhoUsesMyFiles/wumfplug.c')
-rw-r--r-- | plugins/WhoUsesMyFiles/wumfplug.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/WhoUsesMyFiles/wumfplug.c b/plugins/WhoUsesMyFiles/wumfplug.c index 9bcb59540b..8c54f36990 100644 --- a/plugins/WhoUsesMyFiles/wumfplug.c +++ b/plugins/WhoUsesMyFiles/wumfplug.c @@ -294,11 +294,6 @@ static INT_PTR WumfMenuCommand(WPARAM wParam,LPARAM lParam) __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
{
- if (!IsUserAnAdmin()) {
- MessageBox(NULL, "Plugin WhoUsesMyFiles cannot be loaded. It requires admin privileges.", "Miranda IM", MB_OK);
- return NULL;
- }
-
return &pluginInfo;
}
@@ -622,9 +617,14 @@ __declspec(dllexport) int Load(void) HookEvent(ME_TTB_MODULELOADED, InitTopToolbar);
setlocale( LC_ALL, ".ACP");
// _setmbcp(_MB_CP_ANSI);
- SetTimer(NULL, 777, TIME,(TIMERPROC) TimerProc);
- return 0;
+ if (IsUserAnAdmin()) {
+ SetTimer(NULL, 777, TIME,(TIMERPROC) TimerProc);
+ } else {
+ MessageBox(NULL, "Plugin WhoUsesMyFiles requires admin privileges in order to work.", "Miranda IM", MB_OK);
+ }
+
+ return 0;
}
__declspec(dllexport) int Unload(void)
|