]> jfr.im git - irc/evilnet/mod.chanfix.git/commitdiff
Fixed code errors in LISTBLOCKED
authorbuzlip01 <redacted>
Tue, 28 Mar 2006 03:26:03 +0000 (03:26 +0000)
committerbuzlip01 <redacted>
Tue, 28 Mar 2006 03:26:03 +0000 (03:26 +0000)
LISTBLOCKEDCommand.cc

index 718a37a4f6e1277110a89ee1b082b9e960fce03c..4107fa9d9b4c5d68d2cc70a150808c2c68e3ad48 100644 (file)
@@ -41,7 +41,6 @@ namespace cf
 {
 void LISTBLOCKEDCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
 {
-StringTokenizer st(Message);
 
 /* Check if channel blocking has been disabled in the config. */
 if (!bot->doChanBlocking()) {
@@ -56,7 +55,11 @@ if (!bot->doChanBlocking()) {
 PgDatabase* cacheCon = bot->theManager->getConnection();
 
 std::stringstream theQuery;
-theQuery << "SELECT channel FROM channels WHERE flags = 1 OR flags = 3 ORDER BY channel ASC";
+theQuery << "SELECT channel FROM channels WHERE flags = "
+        << sqlChannel::F_BLOCKED
+        << " OR flags = "
+        << sqlChannel::F_BLOCKED + sqlChannel::F_ALERT
+        << " ORDER BY channel ASC";
 
 if (!cacheCon->ExecTuplesOk(theQuery.str().c_str())) {
   elog << "chanfix::LISTBLOCKEDCommand> SQL Error: "
@@ -98,4 +101,4 @@ bot->SendTo(theClient,
 return;
 }
 } // namespace cf
-} // namespace gnuworld
\ No newline at end of file
+} // namespace gnuworld