diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/chatlogger.cpp | 8 | ||||
-rw-r--r-- | src/chatlogger.h | 2 | ||||
-rw-r--r-- | src/client.cpp | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/src/chatlogger.cpp b/src/chatlogger.cpp index ad86de8e9..33763e561 100644 --- a/src/chatlogger.cpp +++ b/src/chatlogger.cpp @@ -39,7 +39,6 @@ #include "logger.h" #include "configuration.h" - #include "utils/mkdir.h" #include "utils/stringutils.h" @@ -204,3 +203,10 @@ void ChatLogger::loadLast(std::string name, std::list<std::string> &list, if (logFile.is_open()) logFile.close(); } + +void ChatLogger::clear() +{ + mLogDir = ""; + mServerName = ""; + mLogFileName = ""; +} diff --git a/src/chatlogger.h b/src/chatlogger.h index 91805a8bc..bb02d8127 100644 --- a/src/chatlogger.h +++ b/src/chatlogger.h @@ -59,6 +59,8 @@ class ChatLogger void setBaseLogDir(const std::string &logDir) { mBaseLogDir = logDir; } + void clear(); + private: /** * Sets the file to log to and opens it diff --git a/src/client.cpp b/src/client.cpp index 18318acb6..835bbc965 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -999,6 +999,8 @@ int Client::gameExec() Net::getNpcHandler()->clearDialogs(); Net::getGuildHandler()->clear(); Net::getPartyHandler()->clear(); + if (chatLogger) + chatLogger->clear(); } mOldState = mState; |