summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-23 22:20:47 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-24 21:08:17 +0300
commit576b7dca4676ba2c1ea63afb6bbc96fd11183048 (patch)
tree5eef4087911e0e74ebcfb4d2026b811f0256cc71 /src/client.cpp
parentc97f245c597ebe8f488e72c435960dbee9bf66c6 (diff)
downloadmanaverse-576b7dca4676ba2c1ea63afb6bbc96fd11183048.tar.gz
manaverse-576b7dca4676ba2c1ea63afb6bbc96fd11183048.tar.bz2
manaverse-576b7dca4676ba2c1ea63afb6bbc96fd11183048.tar.xz
manaverse-576b7dca4676ba2c1ea63afb6bbc96fd11183048.zip
improve dirs usage in Client.
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp25
1 files changed, 5 insertions, 20 deletions
diff --git a/src/client.cpp b/src/client.cpp
index ccd2b76c7..4838618b6 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -2457,7 +2457,7 @@ void Client::storeSafeParameters() const
void Client::initTradeFilter() const
{
const std::string tradeListName =
- Client::getServerConfigDirectory() + "/tradefilter.txt";
+ getServerConfigDirectory() + "/tradefilter.txt";
std::ofstream tradeFile;
struct stat statbuf;
@@ -2489,7 +2489,7 @@ void Client::initTradeFilter() const
void Client::initUsersDir()
{
- mUsersDir = Client::getServerConfigDirectory() + "/users/";
+ mUsersDir = getServerConfigDirectory() + "/users/";
if (mkdir_r(mUsersDir.c_str()))
{
// TRANSLATORS: directory creation error
@@ -2497,7 +2497,7 @@ void Client::initUsersDir()
"Exiting."), mUsersDir.c_str()));
}
- mNpcsDir = Client::getServerConfigDirectory() + "/npcs/";
+ mNpcsDir = getServerConfigDirectory() + "/npcs/";
if (mkdir_r(mNpcsDir.c_str()))
{
// TRANSLATORS: directory creation error
@@ -2586,8 +2586,8 @@ void Client::initPacketLimiter()
if (!mServerConfigDir.empty())
{
- const std::string packetLimitsName =
- Client::getServerConfigDirectory() + "/packetlimiter.txt";
+ const std::string packetLimitsName = getServerConfigDirectory()
+ + "/packetlimiter.txt";
std::ifstream inPacketFile;
struct stat statbuf;
@@ -2730,21 +2730,6 @@ bool Client::limitPackets(const int type)
return true;
}
-const std::string Client::getServerConfigDirectory()
-{
- return instance()->mServerConfigDir;
-}
-
-const std::string Client::getUsersDirectory()
-{
- return instance()->mUsersDir;
-}
-
-const std::string Client::getNpcsDirectory()
-{
- return instance()->mNpcsDir;
-}
-
void Client::setGuiAlpha(const float n)
{
instance()->mGuiAlpha = n;