]> jfr.im git - irc/evilnet/mod.chanfix.git/commitdiff
made my earlier commit configurable
authorsirvulcan <redacted>
Sat, 1 Apr 2006 22:53:54 +0000 (22:53 +0000)
committersirvulcan <redacted>
Sat, 1 Apr 2006 22:53:54 +0000 (22:53 +0000)
chanfix.cc
chanfix.example.conf.in
chanfix.h

index 2baa56466ff3276cc363da10452e9b1f7498c0f2..56958073559df3dcbffbc41060f141bb0271e316 100644 (file)
@@ -351,6 +351,8 @@ joinChanModes = chanfixConfig->Require("joinChanModes")->second ;
 enableAutoFix = atob(chanfixConfig->Require("enableAutoFix")->second) ;
 enableChanFix = atob(chanfixConfig->Require("enableChanFix")->second) ;
 enableChannelBlocking = atob(chanfixConfig->Require("enableChannelBlocking")->second) ;
+stopAutoFixOnOp = atob(chanfixConfig->Require("stopAutoFixOnOp")->second);
+stopManualFixOnOp =  atob(chanfixConfig->Require("stopManualFixOnOp")->second);
 version = atoi((chanfixConfig->Require("version")->second).c_str()) ;
 useBurstToFix = atob(chanfixConfig->Require("useBurstToFix")->second) ;
 numServers = atoi((chanfixConfig->Require("numServers")->second).c_str()) ;
@@ -811,10 +813,14 @@ for (xServer::opVectorType::const_iterator ptr = theTargets.begin();
     // If the channel is being fixed and the op is done by a user,
     // cancel the fix, as there is an awake op
     if (theUser) {
-      if (isBeingAutoFixed(theChan))
-       removeFromAutoQ(theChan);
-      if (isBeingChanFixed(theChan))
-       removeFromManQ(theChan);
+      if (stopAutoFixOnOp) {
+        if (isBeingAutoFixed(theChan))
+         removeFromAutoQ(theChan);
+      }
+      if (stopManualFixOnOp) {
+        if (isBeingChanFixed(theChan))
+         removeFromManQ(theChan);
+      }
     }
   } else {
     // Someone is deopped
index b39087f0a20e363f9a4453b41166788dca4af615..f193467f9ba5440c7cc54600cbe3e88075323dc1 100644 (file)
@@ -61,6 +61,14 @@ enableChanFix = true
 # Can channels be blocked by admins?
 enableChannelBlocking = true
 
+# Should manual fixes stop if an opped client by chanfix ops another
+# client
+stopManualFixOnOp = false
+
+# Should auto fixes stop if an opped client by chanfix ops another
+# client
+stopAutoFixOnOp = true
+
 # ---------------------------------------------------------------------
 # Network settings
 
index 98ee395300340daafa1c7edd1940b9baec018ce0..5e49af1d00d6f56724f4e4cdac1b4d854056b491 100644 (file)
--- a/chanfix.h
+++ b/chanfix.h
@@ -406,6 +406,8 @@ public:
        bool            enableAutoFix;
        bool            enableChanFix;
        bool            enableChannelBlocking;
+       bool            stopManualFixOnOp;
+       bool            stopAutoFixOnOp;
        unsigned int    version;
        bool            useBurstToFix;
        unsigned int    numServers;