diff options
-rw-r--r-- | include/m_chat_int.h | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/main.cpp | 8 | ||||
-rw-r--r-- | plugins/TabSRMM/src/mim.cpp | 2 | ||||
-rw-r--r-- | src/modules/chat/tools.cpp | 5 |
4 files changed, 14 insertions, 2 deletions
diff --git a/include/m_chat_int.h b/include/m_chat_int.h index 4df6029480..98e14d30f7 100644 --- a/include/m_chat_int.h +++ b/include/m_chat_int.h @@ -419,6 +419,7 @@ struct CHAT_MANAGER void (*ShowRoom)(SESSION_INFO*, WPARAM wp, BOOL bSetForeground);
void (*OnAddLog)(SESSION_INFO*, int);
void (*OnClearLog)(SESSION_INFO*);
+ void (*OnGetLogName)(SESSION_INFO*, const TCHAR*);
void (*OnEventBroadcast)(SESSION_INFO *si, GCEVENT *gce);
void (*OnSetStatusBar)(SESSION_INFO*);
diff --git a/plugins/TabSRMM/src/chat/main.cpp b/plugins/TabSRMM/src/chat/main.cpp index 914084cf02..e13811a375 100644 --- a/plugins/TabSRMM/src/chat/main.cpp +++ b/plugins/TabSRMM/src/chat/main.cpp @@ -47,6 +47,14 @@ static void OnAddLog(SESSION_INFO *si, int isOk) SendMessage(si->hWnd, GC_REDRAWLOG2, 0, 0);
}
+static void OnGetLogName(SESSION_INFO *si, LPCTSTR ptszParsedName)
+{
+ if (!M.pathIsAbsolute(ptszParsedName))
+ mir_sntprintf(si->pszLogFileName, MAX_PATH, _T("%s%s"), M.getChatLogPath(), ptszParsedName);
+ else
+ mir_sntprintf(si->pszLogFileName, MAX_PATH, _T("%s"), ptszParsedName);
+}
+
static void OnCreateSession(SESSION_INFO *si, MODULEINFO *mi)
{
Chat_SetFilters(si);
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp index 423d1d721a..d385388432 100644 --- a/plugins/TabSRMM/src/mim.cpp +++ b/plugins/TabSRMM/src/mim.cpp @@ -215,8 +215,8 @@ INT_PTR CMimAPI::foldersPathChanged() FoldersGetCustomPathT(m_hChatLogsPath, szTemp, MAX_PATH, const_cast<TCHAR *>(getChatLogPath()));
mir_sntprintf(m_szChatLogsPath, MAX_PATH, _T("%s"), szTemp);
Utils::ensureTralingBackslash(m_szChatLogsPath);
- replaceStrT(g_Settings.pszLogDir, m_szChatLogsPath);
}
+
CreateDirectoryTreeT(m_szProfilePath);
CreateDirectoryTreeT(m_szSkinsPath);
CreateDirectoryTreeT(m_szSavedAvatarsPath);
diff --git a/src/modules/chat/tools.cpp b/src/modules/chat/tools.cpp index 5574f49e86..23980a5e91 100644 --- a/src/modules/chat/tools.cpp +++ b/src/modules/chat/tools.cpp @@ -801,7 +801,10 @@ TCHAR* GetChatLogsFilename(SESSION_INFO *si, time_t tTime) dat.hContact = si->hContact;
dat.variables = rva;
TCHAR *tszParsedName = (TCHAR*)CallService(MS_UTILS_REPLACEVARS, (WPARAM)ptszVarPath, (LPARAM)&dat);
- PathToAbsoluteT(tszParsedName, si->pszLogFileName);
+ if (ci.OnGetLogName)
+ ci.OnGetLogName(si, tszParsedName);
+ else
+ PathToAbsoluteT(tszParsedName, si->pszLogFileName);
mir_free(tszParsedName);
for (int i = 0; i < SIZEOF(rva); i++)
|