From bf9bccc30a186e338f96c230a4f63cc924c77bd8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 14 Jun 2011 23:23:30 +0300 Subject: Add ability to add comments to any players. --- src/client.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/client.cpp') diff --git a/src/client.cpp b/src/client.cpp index 5e1fca53b..f20c674d9 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -235,6 +235,7 @@ Client *Client::mInstance = 0; Client::Client(const Options &options): mOptions(options), mServerConfigDir(""), + mUsersDir(""), mRootDir(""), mCurrentDialog(0), mQuitDialog(0), @@ -1458,6 +1459,7 @@ void Client::initServerConfig(std::string serverName) } initPacketLimiter(); initTradeFilter(); + initUsersDir(); player_relations.init(); // Initialize the item and emote shortcuts. @@ -1844,6 +1846,16 @@ void Client::initTradeFilter() } } +void Client::initUsersDir() +{ + mUsersDir = Client::getServerConfigDirectory() + "/users/"; + if (mkdir_r(mUsersDir.c_str())) + { + logger->error(strprintf(_("%s doesn't exist and can't be created! " + "Exiting."), mUsersDir.c_str())); + } +} + void Client::initPacketLimiter() { //here i setting packet limits. but current server is broken, @@ -2049,6 +2061,11 @@ const std::string Client::getServerConfigDirectory() return instance()->mServerConfigDir; } +const std::string Client::getUsersDirectory() +{ + return instance()->mUsersDir; +} + void Client::setGuiAlpha(float n) { instance()->mGuiAlpha = n; -- cgit v1.2.3-60-g2f50