]> jfr.im git - irc/evilnet/mod.chanfix.git/commitdiff
Removed unused var from OPLIST, log ALL commands (per request) to chanfix-admin.log
authorbuzlip01 <redacted>
Thu, 30 Mar 2006 01:13:30 +0000 (01:13 +0000)
committerbuzlip01 <redacted>
Thu, 30 Mar 2006 01:13:30 +0000 (01:13 +0000)
21 files changed:
ADDFLAGCommand.cc
ADDNOTECommand.cc
CHECKCommand.cc
DELFLAGCommand.cc
DELNOTECommand.cc
HISTORYCommand.cc
INFOCommand.cc
INVITECommand.cc
LISTBLOCKEDCommand.cc
LISTHOSTSCommand.cc
OPLISTCommand.cc
OPNICKSCommand.cc
REHASHCommand.cc
RELOADCommand.cc
SCORECommand.cc
SETCommand.cc
SHUTDOWNCommand.cc
STATUSCommand.cc
USETCommand.cc
WHOGROUPCommand.cc
WHOISCommand.cc

index 612246ee939e07b7a0945faec180c84bab221311..6b08720d2fa6a0299108489aaf94cf5c13685058 100644 (file)
@@ -135,6 +135,12 @@ bot->SendTo(theClient,
                             std::string("Added flag '%c' to user %s.")).c_str(),
                                         flag,
                                         targetUser->getUserName().c_str());
+
+bot->logAdminMessage("%s (%s) ADDFLAG %s %c",
+                     theUser->getUserName().c_str(),
+                     theClient->getRealNickUserHost().c_str(),
+                     targetUser->getUserName(),flag);
+
 } //ADDFLAGCommand::Exec
 } //Namespace cf
 } //Namespace gnuworld
index e4efa465363787d64186585faf9a0a49671973ff..65ac4c521c18246bf8381c37114ee3ca0e17495a 100644 (file)
@@ -65,6 +65,12 @@ bot->SendTo(theClient,
                             std::string("Note recorded for channel %s.")).c_str(),
                                         theChan->getChannel().c_str());
 
+bot->logAdminMessage("%s (%s) ADDNOTE %s %s",
+                     theUser->getUserName().c_str(),
+                     theClient->getRealNickUserHost().c_str(),
+                     theChan->getChannel().c_str(),st.assemble(2).c_str());
+
+
 return;
 }
 } // namespace cf
index 990fff6176affb8cb8099c674a8e84cecc6d77a4..1b2984c027cda40236ae271eab783be685753de2 100644 (file)
@@ -60,6 +60,12 @@ bot->SendTo(theClient,
                                         bot->countChanOps(netChan), netChan->size(),
                                         netChan->getName().c_str());
 
+bot->logAdminMessage("%s (%s) CHECK %s",
+                     theUser->getUserName().c_str(),
+                     theClient->getRealNickUserHost().c_str(),
+                     netChan->getName().c_str());
+
+
 return;
 }
 
index def478d226212b844f4cd5e25f33c1b849e0d590..29720c1fbf8d547ddb5e5c2071ea2eb041edbcf6 100644 (file)
@@ -134,6 +134,13 @@ bot->SendTo(theClient,
                             language::deleted_flag,
                             std::string("Deleted flag '%c' from user %s.")).c_str(), flag,
                                         targetUser->getUserName().c_str());
+
+bot->logAdminMessage("%s (%s) DELFLAG %s %c",
+                     theUser->getUserName().c_str(),
+                     theClient->getRealNickUserHost().c_str(),
+                     targetUser->getUserName().c_str(),flag);
+
+
 } //DELFLAGCommand::Exec
 
 } //Namespace cf
index 231ea7cb001e02b8c909aaadb902fc2ccbd96345..555df949bc785d1de42768a300cd16086d93edca 100644 (file)
@@ -141,6 +141,13 @@ bot->SendTo(theClient,
                             std::string("Note #%d for channel %s deleted.")).c_str(),
                                         messageId, theChan->getChannel().c_str());
 
+
+bot->logAdminMessage("%s (%s) DELNOTE %s %d",
+                     theUser->getUserName().c_str(),
+                     theClient->getRealNickUserHost().c_str(),
+                     theChan->getChannel().c_str(), messageId);
+
+
 return;
 }
 
index ff89007ee390fcbf1d1c815332b765c873394f1b..1b60626021e1d5b98b970606cd85e12efcfe1f9f 100644 (file)
@@ -113,6 +113,12 @@ bot->SendTo(theClient,
 /* Dispose of our connection instance */
 bot->theManager->removeConnection(cacheCon);
 
+bot->logAdminMessage("%s (%s) HISTORY %s",
+                     theUser->getUserName().c_str(),
+                     theClient->getRealNickUserHost().c_str(),
+                     theChan->getChannel().c_str());
+
+
 return;
 }
 
index e0e7d74c24ba9c4d11051cb72ddea18eb1beb25f..a0b28110666270fc54aa6169e7703d3821a61527 100644 (file)
@@ -183,6 +183,12 @@ bot->SendTo(theClient,
 /* Dispose of our connection instance */
 bot->theManager->removeConnection(cacheCon);
 
+bot->logAdminMessage("%s (%s) INFO %s",
+                     theUser->getUserName().c_str(),
+                     theClient->getRealNickUserHost().c_str(),
+                     theChan->getChannel().c_str());
+
+
 return;
 }
 
index e65c53ef37d53508539f413b0ab45cb6a7297f08..da759c6377bc376e133710aada94b6c80c8629f5 100644 (file)
@@ -80,6 +80,12 @@ if (theChannelUser) {
 
 bot->Invite(theClient, theChannel);
 
+bot->logAdminMessage("%s (%s) INVITE %s [CODER-CHAN]",
+                     theUser->getUserName().c_str(),
+                     theClient->getRealNickUserHost().c_str(),
+                     theChannel->getName().c_str());
+
+
 return;
 }
 
index 4107fa9d9b4c5d68d2cc70a150808c2c68e3ad48..aa1469cf28ff87f6f8f66955de81dcdf9396c9a0 100644 (file)
@@ -98,6 +98,11 @@ bot->SendTo(theClient,
                std::string("%d channels blocked.")).c_str(),
                numBlocks);
 
+bot->logAdminMessage("%s (%s) LISTBLOCKED",
+                     theUser->getUserName().c_str(),
+                     theClient->getRealNickUserHost().c_str());
+
+
 return;
 }
 } // namespace cf
index 85c1400eb62141ea647e268c96941a80100cfe34..a4368a5e1bfbfc4e40f0a329f3c40f1d9df6dad1 100644 (file)
@@ -99,6 +99,12 @@ bot->SendTo(theClient,
                        language::host_list_footer,
                        std::string("End of host list.")).c_str());
 
+bot->logAdminMessage("%s (%s) LISTHOSTS %s",
+                     theUser->getUserName().c_str(),
+                     theClient->getRealNickUserHost().c_str(),
+                     targetUser->getUserName().c_str());
+
+
 return;
 } //LISTHOSTSCommand::Exec
 
index 173c6d50cd90aac8edad2f3e6904d62f6b446485..bed2249f45ee258f013fbe8554fc06261d38f8f8 100644 (file)
@@ -98,7 +98,6 @@ bot->SendTo(theClient,
 
 unsigned int opCount = 0;
 bool inChan = false;
-Channel* netChan = Network->findChannel(st[1]);
 std::string firstop;
 std::string lastop;
 std::string nickName = "";
@@ -118,6 +117,12 @@ for (chanfix::chanOpsType::iterator opPtr = myOps.begin();
              lastop.c_str(), inChan ? nickName.c_str() : "", inChan ? "\002" : "");
 }
 
+bot->logAdminMessage("%s (%s) OPLIST %s %s",
+                     theUser->getUserName().c_str(),
+                     theClient->getRealNickUserHost().c_str(),
+                     st[1].c_str(), all ? "ALL" : "");
+
+
 return;
 }
 
index 2889984b13069accf7492650f682a3c8bd0b9afe..d2b4160e9514d565e519f281bb7419e9a8f5eaf4 100644 (file)
@@ -93,6 +93,12 @@ else
 /* Log command */
 /* ... */
 
+bot->logAdminMessage("%s (%s) OPNICKS %s",
+                     theUser->getUserName().c_str(),
+                     theClient->getRealNickUserHost().c_str(),
+                     netChan->getName().c_str());
+
+
 return;
 }
 
index 0c43575cdb85827d925232d5331b598abc0a9c1c..6864dc1b48cc791c67ff8d730339d001969bec7c 100644 (file)
@@ -85,6 +85,12 @@ if (option == "TRANSLATIONS") {
   return;
 }
 
+bot->logAdminMessage("%s (%s) REHASH %s",
+                     theUser->getUserName().c_str(),
+                     theClient->getRealNickUserHost().c_str(),
+                     !option.empty() ? option.c_str() : "");
+
+
 return;
 }
 
index b55e859bcc643052a8a14cc6064dbcb9c63b7a28..667cbadab356741068be3461066e0f5241ab2470 100644 (file)
@@ -59,6 +59,12 @@ bot->logDebugMessage("%s (%s) is reloading the chanfix module.",
                     theUser->getUserName().c_str(),
                     theClient->getRealNickUserHost().c_str());
 
+bot->logAdminMessage("%s (%s) RELOAD %s",
+                     theUser->getUserName().c_str(),
+                     theClient->getRealNickUserHost().c_str(),
+                     (st.size() < 2) ? "" : st.assemble(1).c_str());
+
+
 if (st.size() < 2)
   server->UnloadClient(bot, "Reloading...");
 else
index 6f1eb8ca2e756a4a5a52b9a0c484cb61d6b5037b..8514810265eb5d785aab7811b82f2a0ab2bdb34a 100644 (file)
@@ -80,6 +80,12 @@ if (myOps.empty()) {
 }
 
 if (st.size() > 2) {
+  bot->logAdminMessage("%s (%s) %s %s",
+                     theUser->getUserName().c_str(),
+                     theClient->getRealNickUserHost().c_str(),
+                     compact ? "CSCORE" : "SCORE",
+                     st.assemble(1).c_str());
+
   const char* scUser = st[2].c_str();
   if (st[2][0] == '=') {
     /* Nickname */
@@ -250,6 +256,13 @@ if (!compact) {
   strScoresNOP << ".";
 }
 
+bot->logAdminMessage("%s (%s) %s %s %s",
+                     theUser->getUserName().c_str(),
+                     theClient->getRealNickUserHost().c_str(),
+                     compact ? "CSCORE" : "SCORE",
+                     st.assemble(1).c_str());
+
+
 if (compact) {
   bot->SendTo(theClient, "~S %s %s", st[1].c_str(), strScoresDB.str().c_str());
   if (!netChan) {
@@ -308,6 +321,7 @@ if (compact) {
     bot->SendTo(theClient, strScoresNOP.str());
 }
 
+
 return;
 }
 
index 1a7481558c3e4d68f1009cfef9513db0b1a83b80..5e16d88cddfc3408b37a673ed574c826637a32ac 100644 (file)
@@ -56,6 +56,12 @@ std::string::size_type pos;
 while ((pos = option.find('_', 0)) != std::string::npos)
   option.erase(pos, 1);
 
+bot->logAdminMessage("%s (%s) SET %s %s",
+                     theUser->getUserName().c_str(),
+                     theClient->getRealNickUserHost().c_str(),
+                     option.c_str(), value.c_str());
+
+
 if (option == "NUMSERVERS") {
   int setting = atoi(value.c_str());
   if (setting < 0) {
index c9abff235ed8fe1bf357b1f069d95e2bd24f8337..bcb755fe6c6cf94e222a2e9b7dbb5703707fe25f 100644 (file)
@@ -59,6 +59,12 @@ bot->logDebugMessage("%s (%s) is shutting me down.",
                     theUser->getUserName().c_str(),
                     theClient->getRealNickUserHost().c_str());
 
+bot->logAdminMessage("%s (%s) SHUTDOWN %s",
+                     theUser->getUserName().c_str(),
+                     theClient->getRealNickUserHost().c_str(),
+                     (st.size() < 2) ? "" : st.assemble(1).c_str());
+
+
 if (st.size() < 2)
   server->Shutdown();
 else
index be9a69758d596df9e677479b251ff8eb802aaeb4..c4010106abcbe0b83c646c6a4fd8ee0d11b8492d 100644 (file)
@@ -95,6 +95,11 @@ else
                        language::status_channel_service_not_linked,
                        std::string("Channel service not linked. New channels will not be scored.")).c_str());
 
+bot->logAdminMessage("%s (%s) STATUS",
+                     theUser->getUserName().c_str(),
+                     theClient->getRealNickUserHost().c_str());
+
+
 return;
 }
 
index 6f5053614516fe1ff05e7cb0fc3b6f5d85666c53..53ccbedb5cd0d7d808a4d928f8a5dfdf8a681157 100644 (file)
@@ -47,6 +47,8 @@ StringTokenizer st(Message);
 std::string option;
 std::string value;
 
+
+
 if (st.size() == 4) {
   sqlUser* targetUser = bot->isAuthed(st[1]);
   option = string_upper(st[2]);
@@ -85,6 +87,12 @@ if (st.size() == 4) {
 option = string_upper(st[1]);
 value = string_upper(st[2]);
 
+bot->logAdminMessage("%s (%s) USET %s %s",
+                     theUser->getUserName().c_str(),
+                     theClient->getRealNickUserHost().c_str(),
+                     option.c_str(), value.c_str());
+
+
 if (option == "NOTICE") {
   if (value == "ON" || value == "YES" || value == "1") {
     theUser->setNotice(true);
index 7e90d55e091b315dfc4ed0b284dfdb13684d5e7f..38f4683592a1527d796d6a0abaea069c9d7087b9 100644 (file)
@@ -42,6 +42,12 @@ void WHOGROUPCommand::Exec(iClient* theClient, sqlUser* theUser, const std::stri
 {
 StringTokenizer st(Message);
 
+bot->logAdminMessage("%s (%s) WHOGROUP %s",
+                     theUser->getUserName().c_str(),
+                     theClient->getRealNickUserHost().c_str(),
+                     (st.size() > 1) ? st[1].c_str() : "");
+
+
 if (st.size() == 1) {
   /* No parameter supplied, so list all groups */
   PgDatabase* cacheCon = bot->theManager->getConnection();
index 414a9366985dfee24a681d93042d365a4f9daadb..9a0f4d65e4028adac8d40fbc6be84f1bf20d0818 100644 (file)
@@ -42,7 +42,13 @@ namespace cf
 void WHOISCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
-       
+
+bot->logAdminMessage("%s (%s) WHOIS %s",
+                     theUser->getUserName().c_str(),
+                     theClient->getRealNickUserHost().c_str(),
+                     st[1].c_str());
+
+
 if (st[1] == "*") {
   unsigned int numUsers = 0;
   bot->SendTo(theClient,