mirror of
https://github.com/spiffcode/hostile-takeover.git
synced 2026-04-27 22:05:06 -06:00
Make startup release logging less verbose
This commit is contained in:
parent
3c8476388a
commit
39b5b9e923
@ -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<std::string> BadWords::Split(const std::string& s, char ch) {
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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<std::string> 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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user