]> jfr.im git - irc/evilnet/mod.chanfix.git/commitdiff
bug fix for 1453584. Renamed sqlUser to sqlcfUser to avoid possible conflicts
authorsirvulcan <redacted>
Thu, 5 Oct 2006 01:45:50 +0000 (01:45 +0000)
committersirvulcan <redacted>
Thu, 5 Oct 2006 01:45:50 +0000 (01:45 +0000)
52 files changed:
ADDFLAGCommand.cc
ADDHOSTCommand.cc
ADDNOTECommand.cc
ADDUSERCommand.cc
ALERTCommand.cc
BLOCKCommand.cc
CANFIXCommand.cc
CHANFIXCommand.cc
CHECKCommand.cc
DEBUGCommand.cc
DELFLAGCommand.cc
DELHOSTCommand.cc
DELNOTECommand.cc
DELUSERCommand.cc
HELPCommand.cc
HISTORYCommand.cc
INFOCommand.cc
INVITECommand.cc
LASTCOMCommand.cc
LISTBLOCKEDCommand.cc
LISTHOSTSCommand.cc
LISTTEMPBLOCKEDCommand.cc
Makefile.am
Makefile.in
OPLISTCommand.cc
OPNICKSCommand.cc
QUOTECommand.cc
REHASHCommand.cc
RELOADCommand.cc
REQUESTOPCommand.cc
SAYCommand.cc
SCORECommand.cc
SETCommand.cc
SETGROUPCommand.cc
SHUTDOWNCommand.cc
SIMULATECommand.cc
STATUSCommand.cc
SUSPENDCommand.cc
TEMPBLOCKCommand.cc
UNALERTCommand.cc
UNBLOCKCommand.cc
UNSUSPENDCommand.cc
UNTEMPBLOCKCommand.cc
USERSCORESCommand.cc
USETCommand.cc
WHOGROUPCommand.cc
WHOISCommand.cc
chanfix.cc
chanfix.example.conf.in
chanfix.h
chanfixCommands.h
sqlChannel.h

index 6fcac88f112ae358bc134dba3d6457a81bcb3c79..cb752c767d6a0a21b265d92824bb3f34d9927a0e 100644 (file)
@@ -30,7 +30,7 @@
 #include "chanfix.h"
 #include "responses.h"
 #include "StringTokenizer.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id$");
 
@@ -38,7 +38,7 @@ namespace gnuworld
 {
 namespace cf
 {
-void ADDFLAGCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void ADDFLAGCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
@@ -60,7 +60,7 @@ if (!bot->getFlagType(flag)) {
   return;
 }
 
-sqlUser* targetUser = bot->isAuthed(st[1]);
+sqlcfUser* targetUser = bot->isAuthed(st[1]);
 if (!targetUser) {
   bot->SendTo(theClient,
               bot->getResponse(theUser,
@@ -69,8 +69,8 @@ if (!targetUser) {
   return;
 }
 
-if (flag == bot->getFlagChar(sqlUser::F_OWNER) &&
-    !theUser->getFlag(sqlUser::F_OWNER)) {
+if (flag == bot->getFlagChar(sqlcfUser::F_OWNER) &&
+    !theUser->getFlag(sqlcfUser::F_OWNER)) {
   bot->SendTo(theClient,
               bot->getResponse(theUser,
                               language::owner_add_owner_only,
@@ -78,8 +78,8 @@ if (flag == bot->getFlagChar(sqlUser::F_OWNER) &&
   return;
 }
 
-if (flag == bot->getFlagChar(sqlUser::F_USERMANAGER) && 
-    !theUser->getFlag(sqlUser::F_OWNER)) {
+if (flag == bot->getFlagChar(sqlcfUser::F_USERMANAGER) && 
+    !theUser->getFlag(sqlcfUser::F_OWNER)) {
   bot->SendTo(theClient,
               bot->getResponse(theUser,
                               language::user_man_add_owner_only,
@@ -88,8 +88,8 @@ if (flag == bot->getFlagChar(sqlUser::F_USERMANAGER) &&
 }
 
 /* A serveradmin can only add flags to users on his/her own group. */
-if (theUser->getFlag(sqlUser::F_SERVERADMIN) && 
-    !theUser->getFlag(sqlUser::F_USERMANAGER)) {
+if (theUser->getFlag(sqlcfUser::F_SERVERADMIN) && 
+    !theUser->getFlag(sqlcfUser::F_USERMANAGER)) {
   if (targetUser->getGroup() != theUser->getGroup()) {
     bot->SendTo(theClient,
                 bot->getResponse(theUser,
@@ -97,14 +97,14 @@ if (theUser->getFlag(sqlUser::F_SERVERADMIN) &&
                                 std::string("You cannot add a flag to a user in a different group.")).c_str());
     return;
   }
-  if (flag == bot->getFlagChar(sqlUser::F_BLOCK)) {
+  if (flag == bot->getFlagChar(sqlcfUser::F_BLOCK)) {
     bot->SendTo(theClient,
                 bot->getResponse(theUser,
                                 language::cant_add_block_flag,
                                 std::string("You cannot add a block flag.")).c_str());
     return;
   }
-  if (flag == bot->getFlagChar(sqlUser::F_SERVERADMIN)) {
+  if (flag == bot->getFlagChar(sqlcfUser::F_SERVERADMIN)) {
     bot->SendTo(theClient,
                 bot->getResponse(theUser,
                                 language::cant_add_serveradmin_flag,
index ac0eb2935d969b765c4171d4fc494100dd546c04..c55650167026e72ea0f0efdb25ea522f52bf7db3 100644 (file)
@@ -29,7 +29,7 @@
 #include "chanfix.h"
 #include "responses.h"
 #include "StringTokenizer.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id$");
 
@@ -37,11 +37,11 @@ namespace gnuworld
 {
 namespace cf
 {
-void ADDHOSTCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void ADDHOSTCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
-sqlUser* targetUser = bot->isAuthed(st[1]);  
+sqlcfUser* targetUser = bot->isAuthed(st[1]);  
 if (!targetUser) {
   bot->SendTo(theClient,
              bot->getResponse(theUser,
@@ -51,7 +51,7 @@ if (!targetUser) {
 }
 
 /* Can't add a host to an owner unless you're an owner. */
-if (targetUser->getFlag(sqlUser::F_OWNER) && !theUser->getFlag(sqlUser::F_OWNER)) {
+if (targetUser->getFlag(sqlcfUser::F_OWNER) && !theUser->getFlag(sqlcfUser::F_OWNER)) {
   bot->SendTo(theClient,
              bot->getResponse(theUser,
                        language::cant_add_host_an_owner,
@@ -60,7 +60,7 @@ if (targetUser->getFlag(sqlUser::F_OWNER) && !theUser->getFlag(sqlUser::F_OWNER)
 }
 
 /* Can only add a host to a user manager if you're an owner. */
-if (targetUser->getFlag(sqlUser::F_USERMANAGER) && !theUser->getFlag(sqlUser::F_OWNER)) {
+if (targetUser->getFlag(sqlcfUser::F_USERMANAGER) && !theUser->getFlag(sqlcfUser::F_OWNER)) {
   bot->SendTo(theClient,
              bot->getResponse(theUser,
                        language::cant_add_host_manager,
@@ -69,8 +69,8 @@ if (targetUser->getFlag(sqlUser::F_USERMANAGER) && !theUser->getFlag(sqlUser::F_
 }
 
 /* A serveradmin can only add hosts to users on his/her own group. */
-if (theUser->getFlag(sqlUser::F_SERVERADMIN) &&
-    !theUser->getFlag(sqlUser::F_USERMANAGER)) {
+if (theUser->getFlag(sqlcfUser::F_SERVERADMIN) &&
+    !theUser->getFlag(sqlcfUser::F_USERMANAGER)) {
   if (targetUser->getGroup() != theUser->getGroup()) {
     bot->SendTo(theClient,
                bot->getResponse(theUser,
index f028fe5a2434fdbe12958a3387a2d0390a51366b..92a20c0a13784b7c2e483d953124d52da698b681 100644 (file)
@@ -30,7 +30,7 @@
 #include "responses.h"
 #include "StringTokenizer.h"
 #include "sqlChannel.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id$");
 
@@ -38,7 +38,7 @@ namespace gnuworld
 {
 namespace cf
 {
-void ADDNOTECommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void ADDNOTECommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
index ac2629f26a0c7f9f341ebc58d214d0ddd17c2e4e..020f0f6a7beefc6615d9c5216463a806782b0bff 100644 (file)
@@ -30,7 +30,7 @@
 #include "chanfix.h"
 #include "responses.h"
 #include "StringTokenizer.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id$");
 
@@ -38,11 +38,11 @@ namespace gnuworld
 {
 namespace cf
 {
-void ADDUSERCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void ADDUSERCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
-sqlUser* targetUser = bot->isAuthed(st[1]);
+sqlcfUser* targetUser = bot->isAuthed(st[1]);
 if (targetUser) {
   bot->SendTo(theClient,
               bot->getResponse(theUser,
@@ -51,7 +51,7 @@ if (targetUser) {
   return;
 }
 
-sqlUser *newUser = new sqlUser(bot->theManager);
+sqlcfUser *newUser = new sqlcfUser(bot->theManager);
 assert(newUser != 0);
 newUser->setUserName(st[1]);
 newUser->setCreated(bot->currentTime());
@@ -64,8 +64,8 @@ newUser->setLastUpdatedBy( std::string( "("
        + theClient->getRealNickUserHost() ) );
 
 /* A user added by a serveradmin automatically has the same group. */
-if (theUser->getFlag(sqlUser::F_SERVERADMIN) &&
-    !theUser->getFlag(sqlUser::F_USERMANAGER))
+if (theUser->getFlag(sqlcfUser::F_SERVERADMIN) &&
+    !theUser->getFlag(sqlcfUser::F_USERMANAGER))
   newUser->setGroup(theUser->getGroup());
 else
   newUser->setGroup("undernet.org");
index 0b581e5da5248cf38ea4e000a41cb268f98bc1a7..6c3ecc2495476b92e41b4a37365f6bc224714593 100644 (file)
@@ -30,7 +30,7 @@
 #include "responses.h"
 #include "StringTokenizer.h"
 #include "sqlChannel.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id$");
 
@@ -39,7 +39,7 @@ namespace gnuworld
 namespace cf
 {
 
-void ALERTCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void ALERTCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
index fe769a3a5dd89aee82aaedf465ad1eeda71712cb..e5a58b016505c8740c7f44cc2358b1e30eec6a4c 100644 (file)
@@ -31,7 +31,7 @@
 #include "responses.h"
 #include "StringTokenizer.h"
 #include "sqlChannel.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id$");
 
@@ -40,7 +40,7 @@ namespace gnuworld
 namespace cf
 {
 
-void BLOCKCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void BLOCKCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
index db034e93d96be2e791d2aa9e686326540c9ca43e..fa80be827384c9b809c4b20ad447f22084dd528a 100644 (file)
@@ -40,7 +40,7 @@ namespace gnuworld
 namespace cf
 {
 
-void CANFIXCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void CANFIXCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
index b612469d5c09ba6df68275a2597ef329fbe8e356..02832f748e450eed53a11c3aa988290e20ace92f 100644 (file)
@@ -38,7 +38,7 @@ namespace gnuworld
 namespace cf
 {
 
-void CHANFIXCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void CHANFIXCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
index 1a189e47db60277b47c27a799cd6a6b643504570..0d4b43655914dd51c26fbe12eba7518853c10dc2 100644 (file)
@@ -38,7 +38,7 @@ namespace gnuworld
 namespace cf
 {
 
-void CHECKCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void CHECKCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
index ab127f8ab31a3f8260aaf37a3dfd2189f3a2adb7..41e14db73358d87a73548846a711585d1517ffcf 100644 (file)
@@ -39,7 +39,7 @@ namespace gnuworld
 namespace cf
 {
 
-void DEBUGCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void DEBUGCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 #ifndef CHANFIX_DEBUG
 return;
index 86562c5bdbc5065aa16f6efd7c1acf2c3fa0618f..c3feadc6e2ff7bb749de4b274ab77ce7b208ec23 100644 (file)
@@ -29,7 +29,7 @@
 #include "chanfix.h"
 #include "responses.h"
 #include "StringTokenizer.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id$");
 
@@ -38,7 +38,7 @@ namespace gnuworld
 namespace cf
 {
 
-void DELFLAGCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void DELFLAGCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
@@ -60,7 +60,7 @@ if (!bot->getFlagType(flag)) {
   return;
 }
 
-sqlUser* targetUser = bot->isAuthed(st[1]);
+sqlcfUser* targetUser = bot->isAuthed(st[1]);
 if (!targetUser) {
   bot->SendTo(theClient,
               bot->getResponse(theUser,
@@ -69,8 +69,8 @@ if (!targetUser) {
   return;
 }
 
-if (flag == bot->getFlagChar(sqlUser::F_OWNER) &&
-    !theUser->getFlag(sqlUser::F_OWNER)) {
+if (flag == bot->getFlagChar(sqlcfUser::F_OWNER) &&
+    !theUser->getFlag(sqlcfUser::F_OWNER)) {
   bot->SendTo(theClient,
               bot->getResponse(theUser,
                               language::only_owner_del_owner_flag,
@@ -78,8 +78,8 @@ if (flag == bot->getFlagChar(sqlUser::F_OWNER) &&
   return;
 }
 
-if (flag == bot->getFlagChar(sqlUser::F_USERMANAGER) &&
-    !theUser->getFlag(sqlUser::F_OWNER)) {
+if (flag == bot->getFlagChar(sqlcfUser::F_USERMANAGER) &&
+    !theUser->getFlag(sqlcfUser::F_OWNER)) {
   bot->SendTo(theClient,
               bot->getResponse(theUser,
                               language::only_owner_del_user_flag,
@@ -88,8 +88,8 @@ if (flag == bot->getFlagChar(sqlUser::F_USERMANAGER) &&
 }
 
 /* A serveradmin can only delete flags from users on his/her own group. */
-if (theUser->getFlag(sqlUser::F_SERVERADMIN) &&
-    !theUser->getFlag(sqlUser::F_USERMANAGER)) {
+if (theUser->getFlag(sqlcfUser::F_SERVERADMIN) &&
+    !theUser->getFlag(sqlcfUser::F_USERMANAGER)) {
   if (targetUser->getGroup() != theUser->getGroup()) {
     bot->SendTo(theClient,
                 bot->getResponse(theUser,
@@ -97,14 +97,14 @@ if (theUser->getFlag(sqlUser::F_SERVERADMIN) &&
                                 std::string("You cannot delete a flag from a user in a different group.")).c_str());
     return;
   }
-  if (flag == bot->getFlagChar(sqlUser::F_BLOCK)) {
+  if (flag == bot->getFlagChar(sqlcfUser::F_BLOCK)) {
     bot->SendTo(theClient,
                 bot->getResponse(theUser,
                                 language::cant_remove_block_flag,
                                 std::string("You cannot remove a block flag.")).c_str());
     return;
   }
-  if (flag == bot->getFlagChar(sqlUser::F_SERVERADMIN)) {
+  if (flag == bot->getFlagChar(sqlcfUser::F_SERVERADMIN)) {
     bot->SendTo(theClient,
                 bot->getResponse(theUser,
                                 language::cant_remove_server_flag,
index f3808fc05c0ab3579936a23143960178373dd972..859f571120350ad090e885f1807e92c336d9d051 100644 (file)
@@ -29,7 +29,7 @@
 #include "chanfix.h"
 #include "responses.h"
 #include "StringTokenizer.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id$");
 
@@ -38,11 +38,11 @@ namespace gnuworld
 namespace cf
 {
 
-void DELHOSTCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void DELHOSTCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
-sqlUser* targetUser = bot->isAuthed(st[1]);
+sqlcfUser* targetUser = bot->isAuthed(st[1]);
 if (!targetUser) {
   bot->SendTo(theClient,
              bot->getResponse(theUser,
@@ -52,7 +52,7 @@ if (!targetUser) {
 }
 
 /* Can't delete a host from an owner unless you're an owner. */
-if (targetUser->getFlag(sqlUser::F_OWNER) && !theUser->getFlag(sqlUser::F_OWNER)) {
+if (targetUser->getFlag(sqlcfUser::F_OWNER) && !theUser->getFlag(sqlcfUser::F_OWNER)) {
   bot->SendTo(theClient,
              bot->getResponse(theUser,
                        language::cant_del_host_an_owner,
@@ -61,7 +61,7 @@ if (targetUser->getFlag(sqlUser::F_OWNER) && !theUser->getFlag(sqlUser::F_OWNER)
 }
 
 /* Can only delete a host from a user manager if you're an owner. */
-if (targetUser->getFlag(sqlUser::F_USERMANAGER) && !theUser->getFlag(sqlUser::F_OWNER)) {
+if (targetUser->getFlag(sqlcfUser::F_USERMANAGER) && !theUser->getFlag(sqlcfUser::F_OWNER)) {
   bot->SendTo(theClient,
              bot->getResponse(theUser,
                        language::cant_del_host_manager,
@@ -70,8 +70,8 @@ if (targetUser->getFlag(sqlUser::F_USERMANAGER) && !theUser->getFlag(sqlUser::F_
 }
 
 /* A serveradmin can only add flags to users on his/her own group. */
-if (theUser->getFlag(sqlUser::F_SERVERADMIN) &&
-    !theUser->getFlag(sqlUser::F_USERMANAGER)) {
+if (theUser->getFlag(sqlcfUser::F_SERVERADMIN) &&
+    !theUser->getFlag(sqlcfUser::F_USERMANAGER)) {
   if (targetUser->getGroup() != theUser->getGroup()) {
     bot->SendTo(theClient,
                bot->getResponse(theUser,
index 9bf0007070d181ef10596a0e442eb6df468b44e6..5e6066c3ec941c9a0a243c69710bb3561c16fd73 100644 (file)
@@ -30,7 +30,7 @@
 #include "responses.h"
 #include "StringTokenizer.h"
 #include "sqlChannel.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id$");
 
@@ -39,7 +39,7 @@ namespace gnuworld
 namespace cf
 {
 
-void DELNOTECommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void DELNOTECommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
@@ -115,7 +115,7 @@ if (channelID != theChan->getID()) {
   return;
 }
 
-if (string_lower(user_name) != string_lower(theUser->getUserName()) && !theUser->getFlag(sqlUser::F_USERMANAGER)) {
+if (string_lower(user_name) != string_lower(theUser->getUserName()) && !theUser->getFlag(sqlcfUser::F_USERMANAGER)) {
   bot->SendTo(theClient,
               bot->getResponse(theUser,
                               language::note_not_added_by_you,
@@ -124,7 +124,7 @@ if (string_lower(user_name) != string_lower(theUser->getUserName()) && !theUser-
   return;
 }
 
-if (eventType != sqlChannel::EV_NOTE && !theUser->getFlag(sqlUser::F_OWNER)) {
+if (eventType != sqlChannel::EV_NOTE && !theUser->getFlag(sqlcfUser::F_OWNER)) {
   bot->SendTo(theClient,
               bot->getResponse(theUser,
                               language::note_not_manually_added,
index 05524104458736ec7fd2341affb46768d36a5ce8..1283502b42d1f04cb0944a58d5770aa23234552a 100644 (file)
@@ -29,7 +29,7 @@
 #include "chanfix.h"
 #include "responses.h"
 #include "StringTokenizer.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id$");
 
@@ -38,11 +38,11 @@ namespace gnuworld
 namespace cf
 {
 
-void DELUSERCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void DELUSERCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
-sqlUser* targetUser = bot->isAuthed(st[1]);
+sqlcfUser* targetUser = bot->isAuthed(st[1]);
 if (!targetUser) {
   bot->SendTo(theClient,
              bot->getResponse(theUser,
@@ -52,7 +52,7 @@ if (!targetUser) {
 }
 
 /* Can't delete an owner unless you're an owner. */
-if (targetUser->getFlag(sqlUser::F_OWNER) && !theUser->getFlag(sqlUser::F_OWNER)) {
+if (targetUser->getFlag(sqlcfUser::F_OWNER) && !theUser->getFlag(sqlcfUser::F_OWNER)) {
   bot->SendTo(theClient,
              bot->getResponse(theUser,
                        language::cant_delete_an_owner,
@@ -61,7 +61,7 @@ if (targetUser->getFlag(sqlUser::F_OWNER) && !theUser->getFlag(sqlUser::F_OWNER)
 }
 
 /* Can only delete a user manager if you're an owner. */
-if (targetUser->getFlag(sqlUser::F_USERMANAGER) && !theUser->getFlag(sqlUser::F_OWNER)) {
+if (targetUser->getFlag(sqlcfUser::F_USERMANAGER) && !theUser->getFlag(sqlcfUser::F_OWNER)) {
   bot->SendTo(theClient,
              bot->getResponse(theUser,
                        language::cant_delete_manager,
@@ -70,8 +70,8 @@ if (targetUser->getFlag(sqlUser::F_USERMANAGER) && !theUser->getFlag(sqlUser::F_
 }
 
 /* A serveradmin can only delete users in his/her own group. */
-if (theUser->getFlag(sqlUser::F_SERVERADMIN) &&
-    !theUser->getFlag(sqlUser::F_USERMANAGER)) {
+if (theUser->getFlag(sqlcfUser::F_SERVERADMIN) &&
+    !theUser->getFlag(sqlcfUser::F_USERMANAGER)) {
   if (targetUser->getGroup() != theUser->getGroup()) {
     bot->SendTo(theClient,
                bot->getResponse(theUser,
index fa9c4e78e906ca4dc95cdcc5cf2a0b587b39b313..574bd30623e8304c499f2ccd9cb2d66a40fdb2c8 100644 (file)
@@ -30,7 +30,7 @@
 #include "chanfixCommands.h"
 #include "responses.h"
 #include "StringTokenizer.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id$");
 
@@ -39,7 +39,7 @@ namespace gnuworld
 namespace cf
 {
 
-void HELPCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void HELPCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
@@ -55,22 +55,22 @@ if (st.size() < 2) {
 
   bot->SendTo(theClient, bot->getHelpMessage(theUser, "<INDEXLOGGEDIN>"));
 
-  if (theUser->getFlag(sqlUser::F_SERVERADMIN))
+  if (theUser->getFlag(sqlcfUser::F_SERVERADMIN))
     bot->SendTo(theClient, bot->getHelpMessage(theUser, "<INDEXSERVERADMIN>"));
 
-  if (theUser->getFlag(sqlUser::F_BLOCK))
+  if (theUser->getFlag(sqlcfUser::F_BLOCK))
     bot->SendTo(theClient, bot->getHelpMessage(theUser, "<INDEXBLOCK>"));
 
-  if (theUser->getFlag(sqlUser::F_COMMENT))
+  if (theUser->getFlag(sqlcfUser::F_COMMENT))
     bot->SendTo(theClient, bot->getHelpMessage(theUser, "<INDEXCOMMENT>"));
 
-  if (theUser->getFlag(sqlUser::F_CHANFIX))
+  if (theUser->getFlag(sqlcfUser::F_CHANFIX))
     bot->SendTo(theClient, bot->getHelpMessage(theUser, "<INDEXCHANFIX>"));
 
-  if (theUser->getFlag(sqlUser::F_OWNER))
+  if (theUser->getFlag(sqlcfUser::F_OWNER))
     bot->SendTo(theClient, bot->getHelpMessage(theUser, "<INDEXOWNER>"));
 
-  if (theUser->getFlag(sqlUser::F_USERMANAGER))
+  if (theUser->getFlag(sqlcfUser::F_USERMANAGER))
     bot->SendTo(theClient, bot->getHelpMessage(theUser, "<INDEXUSERADMIN>"));
 
 } else {
@@ -90,9 +90,9 @@ if (st.size() < 2) {
 
     if (real) {
       /* If you change this code, remember to change it in chanfix.cc */
-      sqlUser::flagType requiredFlags = commHandler->second->getRequiredFlags();
+      sqlcfUser::flagType requiredFlags = commHandler->second->getRequiredFlags();
       if (requiredFlags) {
-       if (requiredFlags == sqlUser::F_LOGGEDIN)
+       if (requiredFlags == sqlcfUser::F_LOGGEDIN)
          bot->SendTo(theClient, "This command requires authentication.");
        else {
          if (bot->getFlagChar(requiredFlags) != ' ')
index d8c9fcadb08d275dfbf2d0f6a08d6dde756d74f2..0e82a125b4b86ee5c5342834972bd98dbd9ca5a3 100644 (file)
@@ -30,7 +30,7 @@
 #include "responses.h"
 #include "StringTokenizer.h"
 #include "sqlChannel.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id$");
 
@@ -39,7 +39,7 @@ namespace gnuworld
 namespace cf
 {
 
-void HISTORYCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void HISTORYCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
index 4a9ca5a496750e0eb135899e17417ce2cd8a5d6f..6e16e5635402004046ec0c3ec37834e305ccc6f1 100644 (file)
@@ -31,7 +31,7 @@
 #include "responses.h"
 #include "StringTokenizer.h"
 #include "sqlChannel.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id$");
 
@@ -40,7 +40,7 @@ namespace gnuworld
 namespace cf
 {
 
-void INFOCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void INFOCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
index 1c622c57c7564f12436fc8355cc66c94e81b457a..9d962bb54d320e2d54dce0dea784b43ec56cfe76 100644 (file)
@@ -38,7 +38,7 @@ namespace gnuworld
 namespace cf
 {
 
-void INVITECommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void INVITECommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 
 StringTokenizer st(Message);
index 737fbe06f188b31fa880236e634e6672e9ac0295..fc2cd745602e09f5b1c1a8c8afbbea2827419714 100644 (file)
@@ -37,7 +37,7 @@
 #include        "responses.h"
 #include        "sqlChanOp.h"
 #include        "sqlChannel.h"
-#include        "sqlUser.h"
+#include        "sqlcfUser.h"
 
 #include        "Network.h"
 #include       "iClient.h"
@@ -53,7 +53,7 @@ namespace gnuworld
 namespace cf
 {
 
-void LASTCOMCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void LASTCOMCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st( Message ) ;
 unsigned int NumOfCom;
index 5ec13d3211fa6217cb05978c0d89a784cc65fb89..9efebe1d5247fa0d5506d5fa01f568bcb872e0cd 100644 (file)
@@ -31,7 +31,7 @@
 #include "responses.h"
 #include "StringTokenizer.h"
 #include "sqlChannel.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id$");
 
@@ -39,7 +39,7 @@ namespace gnuworld
 {
 namespace cf
 {
-void LISTBLOCKEDCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void LISTBLOCKEDCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 
 /* Check if channel blocking has been disabled in the config. */
index db5416f9a8ed58d891c019ae3faaf874b41f4fda..9d5316142d2fb2541e37e6913888064c3c9b888c 100644 (file)
@@ -29,7 +29,7 @@
 #include "chanfix.h"
 #include "responses.h"
 #include "StringTokenizer.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id$");
 
@@ -38,11 +38,11 @@ namespace gnuworld
 namespace cf
 {
 
-void LISTHOSTSCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void LISTHOSTSCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {       
 StringTokenizer st(Message);
 
-sqlUser* targetUser;
+sqlcfUser* targetUser;
 if (st.size() == 2)
   targetUser = bot->isAuthed(st[1]);
 else
@@ -57,7 +57,7 @@ if (!targetUser) {
   return;
 }
 
-sqlUser::flagType requiredFlags = sqlUser::F_USERMANAGER | sqlUser::F_SERVERADMIN;
+sqlcfUser::flagType requiredFlags = sqlcfUser::F_USERMANAGER | sqlcfUser::F_SERVERADMIN;
 if ((targetUser != theUser) && !theUser->getFlag(requiredFlags)) {
   bot->SendTo(theClient,
              bot->getResponse(theUser,
@@ -68,8 +68,8 @@ if ((targetUser != theUser) && !theUser->getFlag(requiredFlags)) {
 }
 
 /* A serveradmin can only view hosts of users in his/her own group. */
-if (theUser->getFlag(sqlUser::F_SERVERADMIN) &&
-    !theUser->getFlag(sqlUser::F_USERMANAGER)) {
+if (theUser->getFlag(sqlcfUser::F_SERVERADMIN) &&
+    !theUser->getFlag(sqlcfUser::F_USERMANAGER)) {
   if (targetUser->getGroup() != theUser->getGroup()) {
     bot->SendTo(theClient,
                bot->getResponse(theUser,
@@ -85,9 +85,9 @@ bot->SendTo(theClient,
                        std::string("Host list for %s:")).c_str(),
                        targetUser->getUserName().c_str());
 
-sqlUser::hostListType sqlHostList = targetUser->getHostList();
+sqlcfUser::hostListType sqlHostList = targetUser->getHostList();
 if (!sqlHostList.empty()) {
-  for (sqlUser::hostListType::iterator itr = sqlHostList.begin();
+  for (sqlcfUser::hostListType::iterator itr = sqlHostList.begin();
        itr != sqlHostList.end(); ++itr)
     bot->SendTo(theClient, *itr);
 } else {
index 8ece45218f2acb834dbdf515a102549c7e29959b..60bef2c6fe76a9e692335b7c442e7f51a90c18e8 100644 (file)
@@ -31,7 +31,7 @@
 #include "responses.h"
 #include "StringTokenizer.h"
 #include "sqlChannel.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id: LISTBLOCKEDCommand.cc 1553 2006-04-18 04:03:59Z sirvulcan $");
 
@@ -39,7 +39,7 @@ namespace gnuworld
 {
 namespace cf
 {
-void LISTTEMPBLOCKEDCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void LISTTEMPBLOCKEDCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 int numBlocks = 0;
 
index faee9e01e69fbf79712503194b67787c2eb89fa6..57328019db9a125ce55a26b94ad0fc91b68d8e4c 100644 (file)
@@ -52,7 +52,7 @@ libchanfix_la_SOURCES = chanfix.cc \
        sqlChanOp.cc \
        sqlChannel.cc \
        sqlManager.cc \
-       sqlUser.cc
+       sqlcfUser.cc
 
 libchanfix_la_CXXFLAGS = -I$(PGSQL_INCLUDE) -I${top_srcdir}/include \
        -I${top_srcdir}/libgnuworld \
@@ -71,7 +71,7 @@ EXTRA_DIST = chanfix.h \
        sqlChanOp.h \
        sqlChannel.h \
        sqlManager.h \
-       sqlUser.h \
+       sqlcfUser.h \
         $(COMMAND_CONF)
 
 confdir=${prefix}/bin
index 10effd60bd866dda44caf250d571b37837df295a..8c6da8ec8275a5a9d84bac98d1f9975166f25ac3 100644 (file)
@@ -100,7 +100,7 @@ am_libchanfix_la_OBJECTS = libchanfix_la-chanfix.lo \
        libchanfix_la-USETCommand.lo libchanfix_la-WHOGROUPCommand.lo \
        libchanfix_la-WHOISCommand.lo libchanfix_la-sqlChanOp.lo \
        libchanfix_la-sqlChannel.lo libchanfix_la-sqlManager.lo \
-       libchanfix_la-sqlUser.lo
+       libchanfix_la-sqlcfUser.lo
 libchanfix_la_OBJECTS = $(am_libchanfix_la_OBJECTS)
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
 depcomp = $(SHELL) $(top_srcdir)/depcomp
@@ -286,7 +286,7 @@ libchanfix_la_SOURCES = chanfix.cc \
        sqlChanOp.cc \
        sqlChannel.cc \
        sqlManager.cc \
-       sqlUser.cc
+       sqlcfUser.cc
 
 libchanfix_la_CXXFLAGS = -I$(PGSQL_INCLUDE) -I${top_srcdir}/include \
        -I${top_srcdir}/libgnuworld \
@@ -305,7 +305,7 @@ EXTRA_DIST = chanfix.h \
        sqlChanOp.h \
        sqlChannel.h \
        sqlManager.h \
-       sqlUser.h \
+       sqlcfUser.h \
         $(COMMAND_CONF)
 
 confdir = ${prefix}/bin
@@ -454,7 +454,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libchanfix_la-sqlChanOp.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libchanfix_la-sqlChannel.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libchanfix_la-sqlManager.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libchanfix_la-sqlUser.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libchanfix_la-sqlcfUser.Plo@am__quote@
 
 .cc.o:
 @am__fastdepCXX_TRUE@  if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
@@ -820,12 +820,12 @@ libchanfix_la-sqlManager.lo: sqlManager.cc
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchanfix_la_CXXFLAGS) $(CXXFLAGS) -c -o libchanfix_la-sqlManager.lo `test -f 'sqlManager.cc' || echo '$(srcdir)/'`sqlManager.cc
 
-libchanfix_la-sqlUser.lo: sqlUser.cc
-@am__fastdepCXX_TRUE@  if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchanfix_la_CXXFLAGS) $(CXXFLAGS) -MT libchanfix_la-sqlUser.lo -MD -MP -MF "$(DEPDIR)/libchanfix_la-sqlUser.Tpo" -c -o libchanfix_la-sqlUser.lo `test -f 'sqlUser.cc' || echo '$(srcdir)/'`sqlUser.cc; \
-@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/libchanfix_la-sqlUser.Tpo" "$(DEPDIR)/libchanfix_la-sqlUser.Plo"; else rm -f "$(DEPDIR)/libchanfix_la-sqlUser.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='sqlUser.cc' object='libchanfix_la-sqlUser.lo' libtool=yes @AMDEPBACKSLASH@
+libchanfix_la-sqlcfUser.lo: sqlcfUser.cc
+@am__fastdepCXX_TRUE@  if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchanfix_la_CXXFLAGS) $(CXXFLAGS) -MT libchanfix_la-sqlcfUser.lo -MD -MP -MF "$(DEPDIR)/libchanfix_la-sqlcfUser.Tpo" -c -o libchanfix_la-sqlcfUser.lo `test -f 'sqlcfUser.cc' || echo '$(srcdir)/'`sqlcfUser.cc; \
+@am__fastdepCXX_TRUE@  then mv -f "$(DEPDIR)/libchanfix_la-sqlcfUser.Tpo" "$(DEPDIR)/libchanfix_la-sqlcfUser.Plo"; else rm -f "$(DEPDIR)/libchanfix_la-sqlcfUser.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='sqlcfUser.cc' object='libchanfix_la-sqlcfUser.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchanfix_la_CXXFLAGS) $(CXXFLAGS) -c -o libchanfix_la-sqlUser.lo `test -f 'sqlUser.cc' || echo '$(srcdir)/'`sqlUser.cc
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libchanfix_la_CXXFLAGS) $(CXXFLAGS) -c -o libchanfix_la-sqlcfUser.lo `test -f 'sqlcfUser.cc' || echo '$(srcdir)/'`sqlcfUser.cc
 
 mostlyclean-libtool:
        -rm -f *.lo
index 67acc575da21e5259b9d6885dce51b4c7055688d..635e080829dcd7fee99d3320fc9a54031aae7ef9 100644 (file)
@@ -40,7 +40,7 @@ namespace gnuworld
 namespace cf
 {
 
-void OPLISTCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void OPLISTCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
index 27ecb1760f50bd1499b1e86f229008aa0134d122..65254a0ba8da95e6ec0f5192ff0183c5898be585 100644 (file)
@@ -38,7 +38,7 @@ namespace gnuworld
 namespace cf
 {
 
-void OPNICKSCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void OPNICKSCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
index 5d252f5f8ced24c1dd264212e84fd9697a1353b5..a3ccefe54225be1a5dcb3bf736bed5ed9524ae6d 100644 (file)
@@ -39,7 +39,7 @@ namespace gnuworld
 namespace cf
 {
 
-void QUOTECommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void QUOTECommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 #ifndef ENABLE_QUOTE
 return;
index 878129b3a8088d2f763cd9df3974149b2f155821..acf1355f17e8ab818f30a34e8b0faafd1096e728 100644 (file)
@@ -37,7 +37,7 @@ namespace gnuworld
 namespace cf
 {
 
-void REHASHCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void REHASHCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
index fe10ac750bb50bf0dce94144e6e2893391d486b0..2d5d682aca93d691a40686b0d0c7d99307c8de4e 100644 (file)
@@ -39,7 +39,7 @@ namespace gnuworld
 namespace cf
 {
 
-void RELOADCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void RELOADCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
        
index 79ac49f1d99c21516f0adc355a76019c699364f1..273afbf537ea76e4bdb6d79561cc91a045a32a54 100644 (file)
@@ -38,7 +38,7 @@ namespace gnuworld
 namespace cf
 {
 
-void REQUESTOPCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void REQUESTOPCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
index a979d1fdf1d799e68b5d16b7b444016a70a169b4..3e6e80b772d19bc1e2ba974b0f36eb884b080d70 100755 (executable)
@@ -39,7 +39,7 @@ namespace gnuworld
 namespace cf
 {
 
-void SAYCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void SAYCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
index c3961ee47a0bc532065fb90d79bfe7cf74ea9ddf..27c4970dbf36c10d8de922cbb8ac189d89e6033f 100644 (file)
@@ -35,7 +35,7 @@
 #include "StringTokenizer.h"
 #include "sqlChannel.h"
 #include "sqlChanOp.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id$");
 
@@ -44,7 +44,7 @@ namespace gnuworld
 namespace cf
 {
 
-void SCORECommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void SCORECommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
index e4947eee265f2366e18b00250f19012c0de0fb6a..1a2ef80c32740ba69848ccce5be62f27b19850ed 100644 (file)
@@ -40,7 +40,7 @@ namespace gnuworld
 namespace cf
 {
 
-void SETCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void SETCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
index 55dd9122af6e5ce93c14ddf95d0e6dffa3963fde..965ec7bb06f84d73ad051318a49cfc9d0562e2dc 100644 (file)
@@ -29,7 +29,7 @@
 #include "chanfix.h"
 #include "responses.h"
 #include "StringTokenizer.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id$");
 
@@ -38,11 +38,11 @@ namespace gnuworld
 namespace cf
 {
 
-void SETGROUPCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void SETGROUPCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
-sqlUser* targetUser = bot->isAuthed(st[1]);
+sqlcfUser* targetUser = bot->isAuthed(st[1]);
 if (!targetUser) {
   bot->SendTo(theClient,
               bot->getResponse(theUser,
index 134f7d4c776425d426bee100c07a35bced35ed5c..79e4f9d44fd1780db0c2d194694196f604dd2f6d 100644 (file)
@@ -39,7 +39,7 @@ namespace gnuworld
 namespace cf
 {
 
-void SHUTDOWNCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void SHUTDOWNCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
        
index c52ac2143bc56bc4f892ac3cd16446b9aedbe111..5a32e060264c9e47422508936a56dfa8f22062f2 100644 (file)
@@ -31,7 +31,7 @@
 #include "responses.h"
 #include "StringTokenizer.h"
 #include "sqlChannel.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id: SIMULATECommand.cc 1523 2006-03-23 23:33:47Z r33d $");
 
@@ -40,7 +40,7 @@ namespace gnuworld
 namespace cf
 {
 
-void SIMULATECommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void SIMULATECommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
index cc5e8be7363759239cc394741e3d9027fda479a0..e344b094cd8dd00c6efa4091403dfef8dcf00a2d 100644 (file)
@@ -41,7 +41,7 @@ namespace gnuworld
 namespace cf
 {
 
-void STATUSCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void STATUSCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 
 bot->SendTo(theClient, "[evilnet development's GNUWorld %s]",
index 0afa179b5f61b021945d154af974a1276072655a..6c9f8633cc8ee57f6fc7caad8a4d7977051d3fba 100644 (file)
@@ -29,7 +29,7 @@
 #include "chanfix.h"
 #include "responses.h"
 #include "StringTokenizer.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id$");
 
@@ -38,11 +38,11 @@ namespace gnuworld
 namespace cf
 {
 
-void SUSPENDCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void SUSPENDCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
-sqlUser* targetUser = bot->isAuthed(st[1]);
+sqlcfUser* targetUser = bot->isAuthed(st[1]);
 if (!targetUser) {
   bot->SendTo(theClient,
               bot->getResponse(theUser,
@@ -60,7 +60,7 @@ if (theUser == targetUser) {
 }
 
 /* Can't suspend an owner unless you're an owner. */
-if (targetUser->getFlag(sqlUser::F_OWNER) && !theUser->getFlag(sqlUser::F_OWNER)) {
+if (targetUser->getFlag(sqlcfUser::F_OWNER) && !theUser->getFlag(sqlcfUser::F_OWNER)) {
   bot->SendTo(theClient,
              bot->getResponse(theUser,
                        language::cant_suspend_an_owner,
@@ -69,7 +69,7 @@ if (targetUser->getFlag(sqlUser::F_OWNER) && !theUser->getFlag(sqlUser::F_OWNER)
 }
 
 /* Can only suspend a user manager if you're an owner. */
-if (targetUser->getFlag(sqlUser::F_USERMANAGER) && !theUser->getFlag(sqlUser::F_OWNER)) {
+if (targetUser->getFlag(sqlcfUser::F_USERMANAGER) && !theUser->getFlag(sqlcfUser::F_OWNER)) {
   bot->SendTo(theClient,
              bot->getResponse(theUser,
                        language::cant_suspend_manager,
@@ -79,8 +79,8 @@ if (targetUser->getFlag(sqlUser::F_USERMANAGER) && !theUser->getFlag(sqlUser::F_
 
 
 /* A serveradmin can only suspend users in his/her own group. */
-if (theUser->getFlag(sqlUser::F_SERVERADMIN) &&
-    !theUser->getFlag(sqlUser::F_USERMANAGER)) {
+if (theUser->getFlag(sqlcfUser::F_SERVERADMIN) &&
+    !theUser->getFlag(sqlcfUser::F_USERMANAGER)) {
   if (targetUser->getGroup() != theUser->getGroup()) {
     bot->SendTo(theClient,
                bot->getResponse(theUser,
index 9010a3fef342d88f4cba17c61dbd94cf86f7e9e5..2e34a3bc38276069e82b1dfd93a274b52f0a2f1f 100644 (file)
@@ -32,7 +32,7 @@
 #include "responses.h"
 #include "StringTokenizer.h"
 #include "sqlChannel.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id: BLOCKCommand.cc 1553 2006-04-18 04:03:59Z sirvulcan $");
 
@@ -41,7 +41,7 @@ namespace gnuworld
 namespace cf
 {
 
-void TEMPBLOCKCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void TEMPBLOCKCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
index 37400ef46113329d7d4ffca332aaf304023d54eb..6ec30b1be5e5a6331f9bbac6654f5739ca6d832e 100644 (file)
@@ -30,7 +30,7 @@
 #include "responses.h"
 #include "StringTokenizer.h"
 #include "sqlChannel.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id$");
 
@@ -39,7 +39,7 @@ namespace gnuworld
 namespace cf
 {
 
-void UNALERTCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void UNALERTCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
index 5dc87c372d37f4ab1a74184ac2583c03fa8d7070..6ee148bfad72a6418c49c652eb18a818904a3de4 100644 (file)
@@ -30,7 +30,7 @@
 #include "responses.h"
 #include "StringTokenizer.h"
 #include "sqlChannel.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id$");
 
@@ -39,7 +39,7 @@ namespace gnuworld
 namespace cf
 {
 
-void UNBLOCKCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void UNBLOCKCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
index db86413e803e980938ab0c4e94ffb4699aea487c..f605428eb552c45e31818671a080cc08b90fa4d0 100644 (file)
@@ -29,7 +29,7 @@
 #include "chanfix.h"
 #include "responses.h"
 #include "StringTokenizer.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id$");
 
@@ -38,11 +38,11 @@ namespace gnuworld
 namespace cf
 {
 
-void UNSUSPENDCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void UNSUSPENDCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
-sqlUser* targetUser = bot->isAuthed(st[1]);
+sqlcfUser* targetUser = bot->isAuthed(st[1]);
 if (!targetUser) {
   bot->SendTo(theClient,
              bot->getResponse(theUser,
@@ -52,7 +52,7 @@ if (!targetUser) {
 }
 
 /* Can't unsuspend an owner unless you're an owner. */
-if (targetUser->getFlag(sqlUser::F_OWNER) && !theUser->getFlag(sqlUser::F_OWNER)) {
+if (targetUser->getFlag(sqlcfUser::F_OWNER) && !theUser->getFlag(sqlcfUser::F_OWNER)) {
   bot->SendTo(theClient,
              bot->getResponse(theUser,
                        language::cant_unsuspend_an_owner,
@@ -61,7 +61,7 @@ if (targetUser->getFlag(sqlUser::F_OWNER) && !theUser->getFlag(sqlUser::F_OWNER)
 }
 
 /* Can only unsuspend a user manager if you're an owner. */
-if (targetUser->getFlag(sqlUser::F_USERMANAGER) && !theUser->getFlag(sqlUser::F_OWNER)) {
+if (targetUser->getFlag(sqlcfUser::F_USERMANAGER) && !theUser->getFlag(sqlcfUser::F_OWNER)) {
   bot->SendTo(theClient,
              bot->getResponse(theUser,
                        language::cant_unsuspend_manager,
@@ -70,8 +70,8 @@ if (targetUser->getFlag(sqlUser::F_USERMANAGER) && !theUser->getFlag(sqlUser::F_
 }
 
 /* A serveradmin can only unsuspend users in his/her own group. */
-if (theUser->getFlag(sqlUser::F_SERVERADMIN) &&
-    !theUser->getFlag(sqlUser::F_USERMANAGER)) {
+if (theUser->getFlag(sqlcfUser::F_SERVERADMIN) &&
+    !theUser->getFlag(sqlcfUser::F_USERMANAGER)) {
   if (targetUser->getGroup() != theUser->getGroup()) {
     bot->SendTo(theClient,
                bot->getResponse(theUser,
index c332dbb2b482f8d1e31d84bc1510e079d52e01c5..62bcc32ce38ccc863d987acf38ee1a7c00b980cd 100644 (file)
@@ -30,7 +30,7 @@
 #include "responses.h"
 #include "StringTokenizer.h"
 #include "sqlChannel.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id: UNBLOCKCommand.cc 1553 2006-04-18 04:03:59Z sirvulcan $");
 
@@ -39,7 +39,7 @@ namespace gnuworld
 namespace cf
 {
 
-void UNTEMPBLOCKCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void UNTEMPBLOCKCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
index b9b152017d79dbfe2a78cbce744b0c48e6b73a35..b10ae78a17b9d4b6b7895c4d66678180725b282a 100644 (file)
@@ -33,7 +33,7 @@
 #include "responses.h"
 #include "StringTokenizer.h"
 #include "sqlChanOp.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id$");
 
@@ -42,7 +42,7 @@ namespace gnuworld
 namespace cf
 {
 
-void USERSCORESCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void USERSCORESCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
index ed41bcc66b598dac811e020043e2522ab8e4ce5d..02f95cb41a98200a9d2a2f4047901f759cb6adf9 100644 (file)
@@ -31,7 +31,7 @@
 
 #include       "chanfix.h"
 #include       "responses.h"
-#include       "sqlUser.h"
+#include       "sqlcfUser.h"
 
 RCSTAG("$Id$");
 
@@ -40,7 +40,7 @@ namespace gnuworld
 namespace cf
 {
 
-void USETCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void USETCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
@@ -48,13 +48,13 @@ std::string option;
 std::string value;
 
 if (st.size() == 4) {
-  sqlUser* targetUser = bot->isAuthed(st[1]);
+  sqlcfUser* targetUser = bot->isAuthed(st[1]);
   option = string_upper(st[2]);
   value = string_upper(st[3]);
-  sqlUser::flagType requiredFlags;
+  sqlcfUser::flagType requiredFlags;
 
   if (option == "NEEDOPER") {
-    requiredFlags = sqlUser::F_USERMANAGER;
+    requiredFlags = sqlcfUser::F_USERMANAGER;
     if (!theUser->getFlag(requiredFlags)) {
       bot->SendTo(theClient,
                  bot->getResponse(theUser,
index 499c299a6b28e6f30e464be5eef6ffeb84ff43a7..2ebd23ea7059f1ef8e2253edcfc0a6ffaf69ba2c 100644 (file)
@@ -29,7 +29,7 @@
 #include "chanfix.h"
 #include "responses.h"
 #include "StringTokenizer.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id$");
 
@@ -38,7 +38,7 @@ namespace gnuworld
 namespace cf
 {
 
-void WHOGROUPCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void WHOGROUPCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
@@ -86,8 +86,8 @@ if (st.size() == 1) {
 }
        
 /* A serveradmin can only WHOGROUP on his/her own group. */
-if (theUser->getFlag(sqlUser::F_SERVERADMIN) &&
-    !theUser->getFlag(sqlUser::F_USERMANAGER)) {
+if (theUser->getFlag(sqlcfUser::F_SERVERADMIN) &&
+    !theUser->getFlag(sqlcfUser::F_USERMANAGER)) {
   if (string_lower(st[1]) != theUser->getGroup()) {
     bot->SendTo(theClient,
                 bot->getResponse(theUser,
@@ -107,7 +107,7 @@ std::string groupUsers;
 unsigned int numUsersInGroup = 0;
 chanfix::usersIterator ptr = bot->usersMap_begin();
 while (ptr != bot->usersMap_end()) {
-  sqlUser* tmpUser = ptr->second;
+  sqlcfUser* tmpUser = ptr->second;
   if (tmpUser->getGroup() == string_lower(st[1])) {
     if (numUsersInGroup++ && !groupUsers.empty())
       groupUsers += " ";
index ba25fd6f5129b4116819eb4a96af0741efa7c7c7..9cf7a9af7bd9aa146db590f96f4ab1c910ce9c66 100644 (file)
@@ -30,7 +30,7 @@
 #include "chanfix.h"
 #include "responses.h"
 #include "StringTokenizer.h"
-#include "sqlUser.h"
+#include "sqlcfUser.h"
 
 RCSTAG("$Id$");
 
@@ -39,7 +39,7 @@ namespace gnuworld
 namespace cf
 {
 
-void WHOISCommand::Exec(iClient* theClient, sqlUser* theUser, const std::string& Message)
+void WHOISCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::string& Message)
 {
 StringTokenizer st(Message);
 
@@ -56,7 +56,7 @@ if (st[1] == "*") {
                               std::string("List of all users:")).c_str());
   chanfix::usersIterator ptr = bot->usersMap_begin();
   while (ptr != bot->usersMap_end()) {
-    sqlUser* tmpUser = ptr->second;
+    sqlcfUser* tmpUser = ptr->second;
     bot->SendTo(theClient,
                bot->getResponse(theUser,
                        language::user_flags_group,
@@ -75,7 +75,7 @@ if (st[1] == "*") {
   return;
 }
 
-sqlUser* theUser2 = bot->isAuthed(st[1]);
+sqlcfUser* theUser2 = bot->isAuthed(st[1]);
 
 const char* username = st[1].c_str();
 if (username[0] == '=') {
index a94166f6fc9938767042492d1c2120fd3b2f64c3..1345ecbc005e9c78085bdb7a0612669638ba56b1 100644 (file)
@@ -56,7 +56,7 @@
 #include       "responses.h"
 #include       "sqlChanOp.h"
 #include       "sqlChannel.h"
-#include       "sqlUser.h"
+#include       "sqlcfUser.h"
 
 #ifdef CHANFIX_HAVE_BOOST_THREAD
 #include       <boost/thread/thread.hpp>
@@ -108,7 +108,7 @@ chanServLinked = false;
 updateInProgress = false;
 
 std::string dbString = "host=" + sqlHost + " dbname=" + sqlDB
-  + " port=" + sqlPort + " user=" + sqlUsername + " password=" + sqlPass;
+  + " port=" + sqlPort + " user=" + sqlcfUsername + " password=" + sqlPass;
 
 theManager = sqlManager::getInstance(dbString);
 
@@ -120,32 +120,32 @@ debugLog.open(debugLogFile.c_str(), std::ios::out | std::ios::app);
 RegisterCommand(new ADDFLAGCommand(this, "ADDFLAG",
        "<username> <flag>",
        3,
-       sqlUser::F_USERMANAGER | sqlUser::F_SERVERADMIN
+       sqlcfUser::F_USERMANAGER | sqlcfUser::F_SERVERADMIN
        ));
 RegisterCommand(new ADDHOSTCommand(this, "ADDHOST",
        "<username> <nick!user@host>",
        3,
-       sqlUser::F_USERMANAGER | sqlUser::F_SERVERADMIN
+       sqlcfUser::F_USERMANAGER | sqlcfUser::F_SERVERADMIN
        ));
 RegisterCommand(new ADDNOTECommand(this, "ADDNOTE",
        "<#channel> <reason>",
        3,
-       sqlUser::F_COMMENT
+       sqlcfUser::F_COMMENT
        ));
 RegisterCommand(new ADDUSERCommand(this, "ADDUSER",
        "<username> [host]",
        2,
-       sqlUser::F_USERMANAGER | sqlUser::F_SERVERADMIN
+       sqlcfUser::F_USERMANAGER | sqlcfUser::F_SERVERADMIN
        ));
 RegisterCommand(new ALERTCommand(this, "ALERT",
        "<#channel> [reason]",
        2,
-       sqlUser::F_COMMENT
+       sqlcfUser::F_COMMENT
        ));
 RegisterCommand(new BLOCKCommand(this, "BLOCK",
        "<#channel> <reason>",
        3,
-       sqlUser::F_BLOCK
+       sqlcfUser::F_BLOCK
        ));
 RegisterCommand(new CANFIXCommand(this, "CANFIX",
        "<#channel>",
@@ -155,7 +155,7 @@ RegisterCommand(new CANFIXCommand(this, "CANFIX",
 RegisterCommand(new CHANFIXCommand(this, "CHANFIX",
        "<#channel> [override] [contact]",
        2,
-       sqlUser::F_CHANFIX
+       sqlcfUser::F_CHANFIX
        ));
 RegisterCommand(new CHECKCommand(this, "CHECK",
        "<#channel>",
@@ -166,28 +166,28 @@ RegisterCommand(new CHECKCommand(this, "CHECK",
 RegisterCommand(new DEBUGCommand(this, "DEBUG",
        "<ROTATE|UPDATE>",
        2,
-       sqlUser::F_OWNER
+       sqlcfUser::F_OWNER
        ));
 #endif /* CHANFIX_DEBUG */
 RegisterCommand(new DELFLAGCommand(this, "DELFLAG",
        "<username> <flag>",
        3,
-       sqlUser::F_USERMANAGER | sqlUser::F_SERVERADMIN
+       sqlcfUser::F_USERMANAGER | sqlcfUser::F_SERVERADMIN
        ));
 RegisterCommand(new DELHOSTCommand(this, "DELHOST",
        "<username> <nick!user@host>",
        3,
-       sqlUser::F_USERMANAGER | sqlUser::F_SERVERADMIN
+       sqlcfUser::F_USERMANAGER | sqlcfUser::F_SERVERADMIN
        ));
 RegisterCommand(new DELNOTECommand(this, "DELNOTE",
        "<#channel> <note_id>",
        3,
-       sqlUser::F_COMMENT
+       sqlcfUser::F_COMMENT
        ));
 RegisterCommand(new DELUSERCommand(this, "DELUSER",
        "<username>",
        2,
-       sqlUser::F_USERMANAGER | sqlUser::F_SERVERADMIN
+       sqlcfUser::F_USERMANAGER | sqlcfUser::F_SERVERADMIN
        ));
 RegisterCommand(new HELPCommand(this, "HELP",
        "[command]",
@@ -207,27 +207,27 @@ RegisterCommand(new INFOCommand(this, "INFO",
 RegisterCommand(new INVITECommand(this, "INVITE",
        "",
        1,
-       sqlUser::F_OWNER
+       sqlcfUser::F_OWNER
        ));
 RegisterCommand(new LASTCOMCommand(this, "LASTCOM",
        "[amount of commands] [days from]",
        1,
-       sqlUser::F_OWNER
+       sqlcfUser::F_OWNER
        ));
 RegisterCommand(new LISTBLOCKEDCommand(this, "LISTBLOCKED",
        "",
        1,
-       sqlUser::F_BLOCK
+       sqlcfUser::F_BLOCK
        ));
 RegisterCommand(new LISTHOSTSCommand(this, "LISTHOSTS",
        "[username]",
        1,
-       sqlUser::F_LOGGEDIN
+       sqlcfUser::F_LOGGEDIN
        ));
 RegisterCommand(new LISTTEMPBLOCKEDCommand(this, "LISTTEMPBLOCKED",
        "",
        1,
-       sqlUser::F_BLOCK
+       sqlcfUser::F_BLOCK
        ));
 RegisterCommand(new OPLISTCommand(this, "OPLIST",
        "<#channel> [-all] [-days]",
@@ -243,18 +243,18 @@ RegisterCommand(new OPNICKSCommand(this, "OPNICKS",
 RegisterCommand(new QUOTECommand(this, "QUOTE",
        "<text>",
        2,
-       sqlUser::F_OWNER
+       sqlcfUser::F_OWNER
        ));
 #endif /* ENABLE_QUOTE */
 RegisterCommand(new REHASHCommand(this, "REHASH",
        "",
        1,
-       sqlUser::F_OWNER
+       sqlcfUser::F_OWNER
        ));
 RegisterCommand(new RELOADCommand(this, "RELOAD",
        "[reason]",
        1,
-       sqlUser::F_OWNER
+       sqlcfUser::F_OWNER
        ));
 RegisterCommand(new REQUESTOPCommand(this, "REQUESTOP",
        isAllowingTopOpAlert() ? "<#channel> [contact]" : "<#channel>",
@@ -274,27 +274,27 @@ RegisterCommand(new SCORECommand(this, "CSCORE",
 RegisterCommand(new SAYCommand(this, "SAY",
        "<#channel> <text>",
        3,
-       sqlUser::F_OWNER
+       sqlcfUser::F_OWNER
        ));
 RegisterCommand(new SETCommand(this, "SET",
        "<option> <value>",
        3,
-       sqlUser::F_OWNER
+       sqlcfUser::F_OWNER
        ));
 RegisterCommand(new SETGROUPCommand(this, "SETGROUP",
        "<username> <group>",
        3,
-       sqlUser::F_USERMANAGER
+       sqlcfUser::F_USERMANAGER
        ));
 RegisterCommand(new SIMULATECommand(this, "SIMULATE",
        "<#channel> <auto/manual>",
        3,
-       sqlUser::F_CHANFIX
+       sqlcfUser::F_CHANFIX
        ));
 RegisterCommand(new SHUTDOWNCommand(this, "SHUTDOWN",
        "[reason]",
        1,
-       sqlUser::F_OWNER
+       sqlcfUser::F_OWNER
        ));
 RegisterCommand(new STATUSCommand(this, "STATUS",
        "",
@@ -304,52 +304,52 @@ RegisterCommand(new STATUSCommand(this, "STATUS",
 RegisterCommand(new SUSPENDCommand(this, "SUSPEND",
        "<username>",
        2,
-       sqlUser::F_USERMANAGER | sqlUser::F_SERVERADMIN
+       sqlcfUser::F_USERMANAGER | sqlcfUser::F_SERVERADMIN
        ));
 RegisterCommand(new TEMPBLOCKCommand(this, "TEMPBLOCK",
        "<#channel>",
        2,
-       sqlUser::F_BLOCK
+       sqlcfUser::F_BLOCK
        ));
 RegisterCommand(new UNALERTCommand(this, "UNALERT",
        "<#channel>",
        2,
-       sqlUser::F_COMMENT
+       sqlcfUser::F_COMMENT
        ));
 RegisterCommand(new UNBLOCKCommand(this, "UNBLOCK",
        "<#channel>",
        2,
-       sqlUser::F_BLOCK
+       sqlcfUser::F_BLOCK
        ));
 RegisterCommand(new UNSUSPENDCommand(this, "UNSUSPEND",
        "<username>",
        2,
-       sqlUser::F_USERMANAGER | sqlUser::F_SERVERADMIN
+       sqlcfUser::F_USERMANAGER | sqlcfUser::F_SERVERADMIN
        ));
 RegisterCommand(new UNTEMPBLOCKCommand(this, "UNTEMPBLOCK",
        "<#channel>",
        2,
-       sqlUser::F_BLOCK
+       sqlcfUser::F_BLOCK
        ));
 RegisterCommand(new USERSCORESCommand(this, "USERSCORES",
        "<account>",
        2,
-       sqlUser::F_LOGGEDIN
+       sqlcfUser::F_LOGGEDIN
        ));
 RegisterCommand(new USETCommand(this, "USET",
        "[username] <option> <value>",
        3,
-       sqlUser::F_LOGGEDIN
+       sqlcfUser::F_LOGGEDIN
        ));
 RegisterCommand(new WHOGROUPCommand(this, "WHOGROUP",
        "[group]",
        1,
-       sqlUser::F_USERMANAGER | sqlUser::F_SERVERADMIN
+       sqlcfUser::F_USERMANAGER | sqlcfUser::F_SERVERADMIN
        ));
 RegisterCommand(new WHOISCommand(this, "WHOIS",
        "<username|=nick|*> [-modif]",
        2,
-       sqlUser::F_LOGGEDIN
+       sqlcfUser::F_LOGGEDIN
        ));
 
 /* Set our current day. */
@@ -437,7 +437,7 @@ for (joinChansType::iterator ptr = chansToJoin.begin();
 sqlHost = chanfixConfig->Require("sqlHost")->second;
 sqlPort = chanfixConfig->Require("sqlPort")->second;
 sqlDB = chanfixConfig->Require("sqlDB")->second;
-sqlUsername = chanfixConfig->Require("sqlUser")->second;
+sqlcfUsername = chanfixConfig->Require("sqlcfUser")->second;
 sqlPass = chanfixConfig->Require("sqlPass")->second;
 
 elog   << "chanfix::readConfigFile> Configuration loaded!"
@@ -651,7 +651,7 @@ xClient::OnDisconnect() ;
 void chanfix::OnPrivateMessage( iClient* theClient,
        const std::string& Message, bool)
 {
-sqlUser* theUser = isAuthed(theClient->getAccount());
+sqlcfUser* theUser = isAuthed(theClient->getAccount());
 
 if (currentState == BURST) {
   if (theUser)
@@ -695,7 +695,7 @@ if (st.size() < commHandler->second->getNumParams()) {
 }
 
 /* If you change this code, remember to change it in HELPCommand.cc */
-sqlUser::flagType requiredFlags = commHandler->second->getRequiredFlags();
+sqlcfUser::flagType requiredFlags = commHandler->second->getRequiredFlags();
 if (requiredFlags) {
   if (!theUser) {
     SendTo(theClient,
@@ -721,7 +721,7 @@ if (requiredFlags) {
     return;
   }
 
-  if (requiredFlags != sqlUser::F_LOGGEDIN &&
+  if (requiredFlags != sqlcfUser::F_LOGGEDIN &&
       !theUser->getFlag(requiredFlags)) {
     if (getFlagChar(requiredFlags) != ' ')
       SendTo(theClient,
@@ -1166,7 +1166,7 @@ return true;
 
 void chanfix::SendTo(iClient* theClient, const std::string& theMessage)
 {
-sqlUser* theUser = isAuthed(theClient->getAccount());
+sqlcfUser* theUser = isAuthed(theClient->getAccount());
 
 if (theUser && !theUser->getUseNotice())
   Message(theClient, theMessage);
@@ -1189,7 +1189,7 @@ char buffer[512] = { 0 };
 char *b = buffer ;
 const char *m = 0 ;
 
-sqlUser* theUser = isAuthed(theClient->getAccount());
+sqlcfUser* theUser = isAuthed(theClient->getAccount());
 
 for (m = theMessage.c_str(); *m != 0; m++) {
   if (*m == '\n' || *m == '\r') {
@@ -1239,7 +1239,7 @@ va_start( list, Msg ) ;
 vsprintf( buffer, Msg, list ) ;
 va_end( list ) ;
 
-sqlUser* theUser = isAuthed(theClient->getAccount());
+sqlcfUser* theUser = isAuthed(theClient->getAccount());
 
 if (theUser && !theUser->getUseNotice())
   Message(theClient, "%s", buffer);
@@ -1388,7 +1388,7 @@ if (cacheCon->ExecTuplesOk(theQuery.str().c_str())) {
   usersMap.clear();
 
   for (int i = 0; i < cacheCon->Tuples(); ++i) {
-    sqlUser *newUser = new sqlUser(theManager);
+    sqlcfUser *newUser = new sqlcfUser(theManager);
     assert(newUser != 0);
 
     newUser->setAllMembers(cacheCon, i);
@@ -1578,7 +1578,7 @@ size_t chanfix::countMyOps(Channel* theChan)
 return countMyOps(theChan->getName());
 }
 
-const std::string chanfix::getHostList( sqlUser* User)
+const std::string chanfix::getHostList( sqlcfUser* User)
 {
 /* Get a connection instance to our backend */
 PgDatabase* cacheCon = theManager->getConnection();
@@ -1986,7 +1986,7 @@ void chanfix::removechan(sqlChannel* sqlChan)
   return;
 }
 
-bool chanfix::simFix(sqlChannel* sqlChan, bool autofix, time_t c_Time, iClient* theClient, sqlUser* theUser)
+bool chanfix::simFix(sqlChannel* sqlChan, bool autofix, time_t c_Time, iClient* theClient, sqlcfUser* theUser)
 {
 if (sqlChan->getSimStart() == 0) sqlChan->setSimStart(c_Time);
 sqlChan->setLastSimAttempt(c_Time);
@@ -2118,13 +2118,18 @@ if (numClientsToOp + currentOps >= netChan->size() ||
 return false;
 }
 
-bool chanfix::simulateFix(sqlChannel* sqlChan, bool autofix, iClient* theClient, sqlUser* theUser)
+bool chanfix::simulateFix(sqlChannel* sqlChan, bool autofix, iClient* theClient, sqlcfUser* theUser)
 {
   bool isFixed = false;
   time_t t = getNextFix();
   time_t end_fix = t + 86400; /* 1 Day */
   time_t next_fix = t + PROCESS_QUEUE_TIME;
 
+  sqlChan->setSimStart(0);
+  sqlChan->setLastSimAttempt(0);
+  sqlChan->setAmountSimOpped(0);
+  sqlChan->setSimModesRemoved(false);
+
   /* Modes are always removed straight when a CHANFIX command is issued
      for a channel (manual fix). */
   if (autofix == false)
@@ -2786,10 +2791,10 @@ ptm = gmtime ( &rawtime );
 return ptm->tm_hour;
 }
 
-sqlUser* chanfix::isAuthed(const std::string Name)
+sqlcfUser* chanfix::isAuthed(const std::string Name)
 {
 //Name = escapeSQLChars(Name);
-sqlUser* tempUser = usersMap[Name];
+sqlcfUser* tempUser = usersMap[Name];
 if (!tempUser)
   usersMap.erase(usersMap.find(Name));
 return tempUser;
@@ -3202,51 +3207,51 @@ for (xNetwork::channelIterator ptr = Network->channels_begin();
 return;
 } //giveAllOpsPoints
 
-char chanfix::getFlagChar(const sqlUser::flagType& whichFlag)
+char chanfix::getFlagChar(const sqlcfUser::flagType& whichFlag)
 {
- if (whichFlag == sqlUser::F_SERVERADMIN)
+ if (whichFlag == sqlcfUser::F_SERVERADMIN)
    return 'a';
- else if (whichFlag == sqlUser::F_BLOCK)
+ else if (whichFlag == sqlcfUser::F_BLOCK)
    return 'b';
- else if (whichFlag == sqlUser::F_COMMENT)
+ else if (whichFlag == sqlcfUser::F_COMMENT)
    return 'c';
- else if (whichFlag == sqlUser::F_CHANFIX)
+ else if (whichFlag == sqlcfUser::F_CHANFIX)
    return 'f';
- else if (whichFlag == sqlUser::F_OWNER)
+ else if (whichFlag == sqlcfUser::F_OWNER)
    return 'o';
- else if (whichFlag == sqlUser::F_USERMANAGER)
+ else if (whichFlag == sqlcfUser::F_USERMANAGER)
    return 'u';
  else
    return ' ';
 }
 
-const std::string chanfix::getFlagsString(const sqlUser::flagType& whichFlags)
+const std::string chanfix::getFlagsString(const sqlcfUser::flagType& whichFlags)
 {
  std::string flagstr;
- if (whichFlags & sqlUser::F_SERVERADMIN)
+ if (whichFlags & sqlcfUser::F_SERVERADMIN)
    flagstr += "a";
- if (whichFlags & sqlUser::F_BLOCK)
+ if (whichFlags & sqlcfUser::F_BLOCK)
    flagstr += "b";
- if (whichFlags & sqlUser::F_COMMENT)
+ if (whichFlags & sqlcfUser::F_COMMENT)
    flagstr += "c";
- if (whichFlags & sqlUser::F_CHANFIX)
+ if (whichFlags & sqlcfUser::F_CHANFIX)
    flagstr += "f";
- if (whichFlags & sqlUser::F_OWNER)
+ if (whichFlags & sqlcfUser::F_OWNER)
    flagstr += "o";
- if (whichFlags & sqlUser::F_USERMANAGER)
+ if (whichFlags & sqlcfUser::F_USERMANAGER)
    flagstr += "u";
 return flagstr;
 }
 
-sqlUser::flagType chanfix::getFlagType(const char whichChar)
+sqlcfUser::flagType chanfix::getFlagType(const char whichChar)
 {
 switch (whichChar) {
-  case 'a': return sqlUser::F_SERVERADMIN;
-  case 'b': return sqlUser::F_BLOCK;
-  case 'c': return sqlUser::F_COMMENT;
-  case 'f': return sqlUser::F_CHANFIX;
-  case 'o': return sqlUser::F_OWNER;
-  case 'u': return sqlUser::F_USERMANAGER;
+  case 'a': return sqlcfUser::F_SERVERADMIN;
+  case 'b': return sqlcfUser::F_BLOCK;
+  case 'c': return sqlcfUser::F_COMMENT;
+  case 'f': return sqlcfUser::F_CHANFIX;
+  case 'o': return sqlcfUser::F_OWNER;
+  case 'u': return sqlcfUser::F_USERMANAGER;
 }
 return 0;
 }
@@ -3279,7 +3284,7 @@ else
   return "";
 }
 
-const std::string chanfix::getHelpMessage(sqlUser* theUser, std::string topic)
+const std::string chanfix::getHelpMessage(sqlcfUser* theUser, std::string topic)
 {
 int lang_id = 1;
 
@@ -3325,7 +3330,7 @@ theManager->removeConnection(cacheCon);
 return;
 }
 
-const std::string chanfix::getResponse( sqlUser* theUser,
+const std::string chanfix::getResponse( sqlcfUser* theUser,
        int response_id, std::string msg )
 {
 
@@ -3440,8 +3445,8 @@ if (cacheCon->Status() == CONNECTION_BAD) { //Check if the connection has died
   MsgChanLog("Attempting to reconnect, Attempt %d out of %d\n",
             connectCount+1,connectRetry+1);
   std::string Query = "host=" + sqlHost + " dbname=" + sqlDB + " port=" + sqlPort;
-  if (strcasecmp(sqlUser,"''"))
-    Query += (" user=" + sqlUser);
+  if (strcasecmp(sqlcfUser,"''"))
+    Query += (" user=" + sqlcfUser);
   if (strcasecmp(sqlPass,"''"))
     Query += (" password=" + sqlPass);
   theManager = new (std::nothrow) cmDatabase(Query.c_str());
@@ -3496,7 +3501,7 @@ for(serversIterator ptr = serversMap.begin();ptr != serversMap.end();++ptr)
 
 void Command::Usage( iClient* theClient )
 {
-sqlUser* theUser = bot->isAuthed(theClient->getAccount());
+sqlcfUser* theUser = bot->isAuthed(theClient->getAccount());
 bot->SendTo(theClient,
             bot->getResponse(theUser,
                              language::syntax,
index 4a5aef5ce8cc3217ae7e9f452d5c48f05033b864..00ab8562721d99501b4fb059b0ae939967610170 100644 (file)
@@ -27,7 +27,7 @@ sqlPort = 5432
 # Name of database
 sqlDB   = chanfix
 # If you don't need user/pass just put "" for option(s) below
-sqlUser = evilnet
+sqlcfUser = evilnet
 sqlPass = ""
 
 # ---------------------------------------------------------------------
index 9b806498cc7c5d8d9e77136a9d9b8df89553c2e8..9521e4bc1b26657f54358a87d062d78b4e03bdcc 100644 (file)
--- a/chanfix.h
+++ b/chanfix.h
@@ -47,7 +47,7 @@ extern short currentDay;
 
 #include       "sqlChanOp.h"
 #include       "sqlManager.h"
-#include       "sqlUser.h"
+#include       "sqlcfUser.h"
 
 namespace gnuworld
 {
@@ -200,7 +200,7 @@ public:
        size_t countMyOps(const std::string&);
        size_t countMyOps(Channel*);
 
-       sqlUser* isAuthed(const std::string);
+       sqlcfUser* isAuthed(const std::string);
 
        void precacheChanOps();
        void precacheChannels();
@@ -237,8 +237,8 @@ public:
        bool chanfix::findop(sqlChanOp*, sqlChannel*);
        void chanfix::removechan(sqlChannel*);
 
-       bool simFix(sqlChannel*, bool, time_t, iClient*, sqlUser*);
-       bool simulateFix(sqlChannel*, bool, iClient*, sqlUser*);
+       bool simFix(sqlChannel*, bool, time_t, iClient*, sqlcfUser*);
+       bool simulateFix(sqlChannel*, bool, iClient*, sqlcfUser*);
 
        bool shouldCJoin(sqlChannel*, bool);
 
@@ -287,9 +287,9 @@ public:
        bool removeFromAutoQ(Channel*);
        bool removeFromManQ(Channel*);
 
-       char getFlagChar(const sqlUser::flagType&);
-       const std::string getFlagsString(const sqlUser::flagType&);
-       sqlUser::flagType getFlagType(const char);
+       char getFlagChar(const sqlcfUser::flagType&);
+       const std::string getFlagsString(const sqlcfUser::flagType&);
+       sqlcfUser::flagType getFlagType(const char);
 
        const std::string getEventName(const int);
 
@@ -297,7 +297,7 @@ public:
 
        const std::string tsToDateTime(time_t, bool);
 
-       const std::string getHostList( sqlUser* );
+       const std::string getHostList( sqlcfUser* );
        
        const std::string getChanNickName(const std::string&, const std::string&);
 
@@ -381,7 +381,7 @@ public:
        /**
         * The db clients map
         */
-       typedef std::map <std::string, sqlUser*, noCaseCompare> usersMapType;
+       typedef std::map <std::string, sqlcfUser*, noCaseCompare> usersMapType;
 
        /**
         * Holds the authenticated user list
@@ -416,7 +416,7 @@ public:
        helpTableType   helpTable;
 
        void loadHelpTable();
-       const std::string getHelpMessage(sqlUser*, std::string);
+       const std::string getHelpMessage(sqlcfUser*, std::string);
 
        typedef std::map < std::string, std::pair <int, std::string> > languageTableType;
        languageTableType       languageTable;
@@ -429,7 +429,7 @@ public:
 
        void loadTranslationTable();
 
-       const std::string getResponse(sqlUser*, int, std::string = std::string());
+       const std::string getResponse(sqlcfUser*, int, std::string = std::string());
 
        /**
         * Configuration variables
@@ -466,7 +466,7 @@ public:
        std::string     debugLogFile;
        std::string     sqlHost;
        std::string     sqlPort;
-       std::string     sqlUsername;
+       std::string     sqlcfUsername;
        std::string     sqlPass;
        std::string     sqlDB;
 
index 6fa89d6b6991715178616f016d05ec7c43670412..2c980bc879cb65d531555d11905aa1784479f0fd 100644 (file)
@@ -27,7 +27,7 @@ namespace gnuworld {
 namespace cf {
 
 class chanfix;
-class sqlUser;
+class sqlcfUser;
 
 class Command {
 public:
@@ -38,7 +38,7 @@ public:
 
        virtual ~Command() { }
        
-       virtual void Exec(iClient*, sqlUser*, const std::string&) = 0;
+       virtual void Exec(iClient*, sqlcfUser*, const std::string&) = 0;
        
        void setServer(xServer *_server)
                { server = _server; }
@@ -81,7 +81,7 @@ class commandName##Command : public Command \
       unsigned short int _requiredFlags) : \
        Command(_bot, _commandName, _help, _numParams, _requiredFlags) {} \
     virtual ~commandName##Command() {} \
-    virtual void Exec(iClient*, sqlUser*, const std::string&); \
+    virtual void Exec(iClient*, sqlcfUser*, const std::string&); \
 };
 
 /* Normal user commands */
index 0102ed9315e7c332440497f4ff00547dfaa7a95f..49cbf6ee81c3003254072474be530320974f6082 100644 (file)
@@ -33,7 +33,7 @@ namespace gnuworld
 namespace cf
 {
 
-class sqlUser;
+class sqlcfUser;
 class sqlManager;
 
 class sqlChannel