diff options
Diffstat (limited to 'plugins/SmileyAdd/src/main.cpp')
-rw-r--r-- | plugins/SmileyAdd/src/main.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/SmileyAdd/src/main.cpp b/plugins/SmileyAdd/src/main.cpp index f8ee1407a1..b9ac55fb91 100644 --- a/plugins/SmileyAdd/src/main.cpp +++ b/plugins/SmileyAdd/src/main.cpp @@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //globals
HINSTANCE g_hInst;
-HANDLE hEvent1;
+HANDLE hEvent1, hLogger;
HGENMENU hContactMenuItem;
char* metaProtoName;
@@ -89,7 +89,6 @@ extern "C" __declspec(dllexport) int Load(void) if (ServiceExists(MS_SMILEYADD_REPLACESMILEYS)) {
ReportError(TranslateT("Only one instance of SmileyAdd could be executed.\nRemove duplicate instances from 'Plugins' directory"));
-
return 1;
}
@@ -99,6 +98,11 @@ extern "C" __declspec(dllexport) int Load(void) opt.Load();
+ // initialize log
+ TCHAR szLogFileName[MAX_PATH];
+ mir_sntprintf(szLogFileName, MAX_PATH, _T("%s\\smiley.log"), VARST(_T("%miranda_profile%")));
+ hLogger = mir_createLog("smileys", _T("Crash log"), szLogFileName, 0);
+
// create smiley events
hEvent1 = CreateHookableEvent(ME_SMILEYADD_OPTIONSCHANGED);
|