diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-06-14 23:23:30 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-06-14 23:36:38 +0300 |
commit | bf9bccc30a186e338f96c230a4f63cc924c77bd8 (patch) | |
tree | e46dbc2f022842982d89164ee598e1bcf827aa39 /src/client.cpp | |
parent | fb0f86589ae9e2d582383cea43e0a391e8d4739d (diff) | |
download | manaverse-bf9bccc30a186e338f96c230a4f63cc924c77bd8.tar.gz manaverse-bf9bccc30a186e338f96c230a4f63cc924c77bd8.tar.bz2 manaverse-bf9bccc30a186e338f96c230a4f63cc924c77bd8.tar.xz manaverse-bf9bccc30a186e338f96c230a4f63cc924c77bd8.zip |
Add ability to add comments to any players.
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
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; |