aboutsummaryrefslogtreecommitdiff
path: root/src/realmd/Main.cpp
diff options
context:
space:
mode:
authorXTZGZoReX <none@none>2009-03-18 20:46:39 +0100
committerXTZGZoReX <none@none>2009-03-18 20:46:39 +0100
commit5184783bd165bec038273fa5cfbc593716856fc2 (patch)
treeb9d15444d71ffddeb3f8e5341a05fcec06fca2c2 /src/realmd/Main.cpp
parent5f2e9f1ed190b3108a55efe809463c0b1ed401bd (diff)
* Fixed/improved the config library: Removed useless methods and fixed the existing.
* Few related changes to make the rest of the core reflect the changes. --HG-- branch : trunk
Diffstat (limited to 'src/realmd/Main.cpp')
-rw-r--r--src/realmd/Main.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/realmd/Main.cpp b/src/realmd/Main.cpp
index f36558e6fba..898a87af2d7 100644
--- a/src/realmd/Main.cpp
+++ b/src/realmd/Main.cpp
@@ -57,7 +57,7 @@ char serviceDescription[] = "Massive Network Game Object Server";
int m_ServiceStatus = -1;
#endif
-bool StartDB(std::string &dbstring);
+bool StartDB();
void UnhookSignals();
void HookSignals();
@@ -179,8 +179,7 @@ extern int main(int argc, char **argv)
}
///- Initialize the database connection
- std::string dbstring;
- if(!StartDB(dbstring))
+ if(!StartDB())
return 1;
///- Get the list of realms for the server
@@ -304,15 +303,15 @@ void OnSignal(int s)
}
/// Initialize connection to the database
-bool StartDB(std::string &dbstring)
+bool StartDB()
{
- if(!sConfig.GetString("LoginDatabaseInfo", &dbstring))
+ std::string dbstring = sConfig.GetStringDefault("LoginDatabaseInfo", "");
+ if(dbstring.empty())
{
sLog.outError("Database not specified");
return false;
}
- sLog.outString("Database: %s", dbstring.c_str() );
if(!LoginDatabase.Initialize(dbstring.c_str()))
{
sLog.outError("Cannot connect to database");