diff --git a/server/badwords.cpp b/server/badwords.cpp index 8d92614..bc13049 100644 --- a/server/badwords.cpp +++ b/server/badwords.cpp @@ -199,7 +199,7 @@ void BadWords::AddWord(const std::string& word, bool standalone, current_index = nodes_.size(); nodes_.push_back(MatchNode()); } - LOG() << "added: " << word << " total nodes:" << nodes_.size(); + //LOG() << "added: " << word << " total nodes:" << nodes_.size(); } std::vector BadWords::Split(const std::string& s, char ch) { diff --git a/server/levelinfocache.cpp b/server/levelinfocache.cpp index 62c63bd..e034fdb 100644 --- a/server/levelinfocache.cpp +++ b/server/levelinfocache.cpp @@ -6,14 +6,18 @@ namespace wi { void LevelInfoCache::SubmitIndex(const std::string& indexfile) { + int cLoaded = 0; IndexLoader index; if (index.InitFromFile(indexfile.c_str())) { int c = index.GetCount(); for (int i = 0; i < c; i++) { const IndexEntry *entry = index.GetEntry(i); - SubmitHelper(entry->packid); + if (SubmitHelper(entry->packid)) { + cLoaded++; + } } } + RLOG() << cLoaded << " mission packs successfully submitted."; } bool LevelInfoCache::SubmitHelper(const PackId& packid) { @@ -40,7 +44,6 @@ bool LevelInfoCache::Submit(PackFileReader& pakr, const PackId& packid) { } map_.insert(PackMap::value_type(packid.id, std::make_pair(packid, infomap))); - RLOG() << "Added: " << PackManager::GetPackFilename(&packid); return true; } diff --git a/server/server.cpp b/server/server.cpp index de7d386..a6e765a 100644 --- a/server/server.cpp +++ b/server/server.cpp @@ -293,7 +293,6 @@ void Server::OnCommand(const std::string command, const json::JsonMap *map) { } void Server::OnModeratorListUpdated(ThreadedFileWatcher *watcher) { - RLOG() << watcher->filename() << " has changed!"; FILE *f = fopen(watcher->filename().c_str(), "r"); if (f != NULL) { std::vector moderator_names; @@ -307,12 +306,12 @@ void Server::OnModeratorListUpdated(ThreadedFileWatcher *watcher) { } if (strncmp(start, "mod,", 4) == 0) { std::string name(start + 4, cch - 4); - RLOG() << "moderator: '" << name << "'"; + //RLOG() << "moderator: '" << name << "'"; moderator_names.push_back(name); } if (strncmp(start, "admin,", 6) == 0) { std::string name(start + 6, cch - 6); - RLOG() << "admin: '" << name << "'"; + //RLOG() << "admin: '" << name << "'"; admin_names.push_back(name); } } @@ -320,6 +319,7 @@ void Server::OnModeratorListUpdated(ThreadedFileWatcher *watcher) { moderator_names_ = moderator_names; admin_names_ = admin_names; } + RLOG() << watcher->filename() << " has changed! " << moderator_names_.size() << " moderators, " << admin_names_.size() << " admins."; } bool Server::IsModerator(const char *name) {