diff options
author | Yohann Ferreira <bertram@cegetel.net> | 2005-12-06 22:18:00 +0000 |
---|---|---|
committer | Yohann Ferreira <bertram@cegetel.net> | 2005-12-06 22:18:00 +0000 |
commit | 619d958712ac1f370225cd6e1381ad9c1c85a15f (patch) | |
tree | f60c6465908e3a39f7c83b2a98712dadaa0b5cf7 /src/dalstorage.cpp | |
parent | e33d204e20f8659999b85d6d0e66e4dc43555a56 (diff) | |
download | manaserv-619d958712ac1f370225cd6e1381ad9c1c85a15f.tar.gz manaserv-619d958712ac1f370225cd6e1381ad9c1c85a15f.tar.bz2 manaserv-619d958712ac1f370225cd6e1381ad9c1c85a15f.tar.xz manaserv-619d958712ac1f370225cd6e1381ad9c1c85a15f.zip |
Improved the getEmailList() function. Now the file used as db or the db name is shown in log. Added some missing messages and values for them. Login, pass min, max length can be changed there now. Added check and appropriate response when selecting, creating a character.
Diffstat (limited to 'src/dalstorage.cpp')
-rw-r--r-- | src/dalstorage.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/dalstorage.cpp b/src/dalstorage.cpp index c62b0dc4..187a9a26 100644 --- a/src/dalstorage.cpp +++ b/src/dalstorage.cpp @@ -73,15 +73,26 @@ DALStorage::open(void) using namespace dal; + static bool dbFileShown = false; + std::string dbFile(getName()); try { // open a connection to the database. #if defined (MYSQL_SUPPORT) || defined (POSTGRESQL_SUPPORT) mDb->connect(getName(), getUser(), getPassword()); + if (!dbFileShown) + { + LOG_INFO("Using " << dbFile << " as Database Name.") + dbFileShown = true; + } #elif defined (SQLITE_SUPPORT) // create the database file name. - std::string dbFile(getName()); dbFile += ".db"; mDb->connect(dbFile, "", ""); + if (!dbFileShown) + { + LOG_INFO("SQLite uses ./" << dbFile << " as DB.") + dbFileShown = true; + } #endif // ensure that the required tables are created. @@ -340,7 +351,7 @@ DALStorage::delAccount(const std::string& userName) } /** - * Return the list of all Emails addresses + * Return the list of all Emails addresses. */ std::list<std::string> DALStorage::getEmailList() |