]> jfr.im git - irc/evilnet/mod.chanfix.git/commitdiff
Made logAdminMessage() logfile lines containes dates and times, also removed a redund...
authorCompster <redacted>
Wed, 4 Jan 2006 05:46:49 +0000 (05:46 +0000)
committerCompster <redacted>
Wed, 4 Jan 2006 05:46:49 +0000 (05:46 +0000)
chanfix.cc

index 97a4926493506cc8c65dacf6c273b10e16175f87..c5f8c0bdf869fd83c7f7d647b77067a8768a17db 100644 (file)
@@ -810,11 +810,13 @@ Channel* tmpChan = Network->findChannel(consoleChan);
 if (!tmpChan)
   return false;
 
+/* Everything sent here is also logged to a file on disk */
+std::string theLog = std::string( "[" ) + tsToDateTime(currentTime(), true) + "] " + buf ;
+adminLog << theLog << std::endl;
+
 std::string message = std::string( "[" ) + nickName + "] " + buf ;
 serverNotice(tmpChan, message);
 
-/* Everything sent here is also logged to a file on disk */
-adminLog << message << std::endl;
 return true;
 }
 
@@ -2142,7 +2144,7 @@ return;
 void chanfix::giveAllOpsPoints()
 {
 Channel* thisChan;
-typedef std::map<std::string,bool> ScoredOpsMapType;
+
 ScoredOpsMapType scoredOpsList;
 ScoredOpsMapType::iterator scOpiter;
 for (xNetwork::channelIterator ptr = Network->channels_begin();
@@ -2161,14 +2163,13 @@ for (xNetwork::channelIterator ptr = Network->channels_begin();
        scOpiter = scoredOpsList.find(curUser->getClient()->getAccount());
        if (scOpiter == scoredOpsList.end()) {
          givePoints(thisChan, curUser->getClient());
-         scoredOpsList.insert(make_pair(curUser->getClient()->getAccount(), true));
+         scoredOpsList.insert(make_pair(curUser->getClient()->getAccount(),true));
        }
       }
     }
   }
 }
-if (scoredOpsList.size() > 0)
-  scoredOpsList.clear();
+
 return;
 } //giveAllOpsPoints