]> jfr.im git - irc/UndernetIRC/gnuworld.git/commitdiff
chanfix: Deactivating CONTACT feature in CHANFIX and REQUESTOP commands.
authorHidden <redacted>
Mon, 16 May 2022 04:07:57 +0000 (00:07 -0400)
committerHidden <redacted>
Mon, 16 May 2022 04:44:00 +0000 (00:44 -0400)
Making CONTACT the default behaviour instead

bin/openchanfix.example.conf
mod.openchanfix/CHANFIXCommand.cc
mod.openchanfix/REQUESTOPCommand.cc
mod.openchanfix/chanfix.cc
mod.openchanfix/chanfix.example.conf.in
mod.openchanfix/chanfix.h
mod.openchanfix/doc/chanfix.help.sql

index 053dc92bc14600f1cf92195f12fec0546d5d9dee..1183c1eb05b4a9c891dbb7a703788b1eaf2fd253 100644 (file)
@@ -84,7 +84,9 @@ allowTopOpFix = false
 # Should the top op fixes be able to alert the top 10 ops who are not in
 # the channel at the time of the fix automatically? If no/false then the
 # database help entry for REQUESTOP will need to be updated.
-allowTopOpAlert = true
+# 2022-05-15: Setting no longer active. Even if this setting is set to false,
+#   top ops will be notified by default.
+#allowTopOpAlert = true
 
 # How much percentage within the top score should the top ops score be
 # before they are allowed to perform fixes. Dont include a %.
index 7238c1dbbf1d3da7d5044ff36e972cbb6fbb3dc4..cf6b56d8a7d235a897f38279b1f1f906249f90b7 100644 (file)
@@ -39,7 +39,7 @@ void CHANFIXCommand::Exec(iClient* theClient, sqlcfUser* theUser, const std::str
 StringTokenizer st(Message);
 
 bool override = false;
-bool alert = false;
+bool alert = true;
 
 if (st.size() > 2) {
   unsigned int pos = 2;
@@ -56,9 +56,6 @@ if (st.size() > 2) {
     if (!strcasecmp(st[pos],"!"))
       override = true;
 
-    if (!strcasecmp(st[pos],"CONTACT"))
-      alert = true;
-
     pos++;
   }
 }
index ef1d4de066cc070590ce07f02b63cc1a51730ecb..9084a046f23000a5e1c2587e939ce657292997cd 100644 (file)
@@ -47,7 +47,7 @@ StringTokenizer st(Message);
 
 bool isRequesterScoreHighEnough = false;
 int pScore, requesterScore = 0;
-bool alert = false;
+bool alert = true;
 bool inChan = false;
 sqlChanOp* curOp = 0;
 
index caf2d6106d19b2e9624fbae2cd6c41e191690b98..7eb91f834ab557c6a593eaa45ea7a7be3fcce7a0 100644 (file)
@@ -151,7 +151,7 @@ RegisterCommand(new CANFIXCommand(this, "CANFIX",
        0
        ));
 RegisterCommand(new CHANFIXCommand(this, "CHANFIX",
-       "<#channel> [override] [contact]",
+       "<#channel> [override]",
        2,
        0 /* Set to 0 to allow all opers to access it, otherwise this should be sqlcfUser::F_CHANFIX */
        ));
@@ -250,7 +250,7 @@ RegisterCommand(new RELOADCommand(this, "RELOAD",
        sqlcfUser::F_OWNER
        ));
 RegisterCommand(new REQUESTOPCommand(this, "REQUESTOP",
-       isAllowingTopOpAlert() ? "<#channel> [contact]" : "<#channel>",
+       "<#channel>",
        2,
        0
        ));
@@ -398,7 +398,6 @@ joinChannels = atob(chanfixConfig->Require("joinChannels")->second) ;
 stopAutoFixOnOp = atob(chanfixConfig->Require("stopAutoFixOnOp")->second) ;
 stopChanFixOnOp = atob(chanfixConfig->Require("stopChanFixOnOp")->second) ;
 allowTopOpFix = atob(chanfixConfig->Require("allowTopOpFix")->second) ;
-allowTopOpAlert = atob(chanfixConfig->Require("allowTopOpAlert")->second) ;
 topOpPercent = atoi((chanfixConfig->Require("topOpPercent")->second).c_str()) ;
 minFixScore = atoi((chanfixConfig->Require("minFixScore")->second).c_str()) ;
 minCanFixScore = atoi((chanfixConfig->Require("minCanFixScore")->second).c_str()) ;
index 45d5eb203e3d0b7378373343383036cd5432cb5f..31aadc10cc14add09acc5a920bbc13ee8baec525 100644 (file)
@@ -84,7 +84,9 @@ allowTopOpFix = false
 # Should the top op fixes be able to alert the top 10 ops who are not in
 # the channel at the time of the fix automatically? If no/false then the
 # database help entry for REQUESTOP will need to be updated.
-allowTopOpAlert = true
+# 2022-05-15: Setting no longer active. Even if this setting is set to false,
+#   top ops will be notified by default.
+#allowTopOpAlert = true
 
 # How much percentage within the top score should the top ops score be
 # before they are allowed to perform fixes. Dont include a %.
index 252e89c33949f2e0aec08692f8f8bbc225a1c199..c3d793cacf06e14afe8eb41088f30c911d63a74a 100644 (file)
@@ -454,7 +454,6 @@ public:
        bool            stopAutoFixOnOp;
        bool            stopChanFixOnOp;
        bool            allowTopOpFix;
-       bool            allowTopOpAlert;
        int             topOpPercent;
        int             minFixScore;
        int             minCanFixScore;
@@ -541,7 +540,6 @@ public:
        bool isChanServLinked() { return chanServLinked; }
        bool isUpdateRunning() { return updateInProgress; }
        bool isAllowingTopFix() { return allowTopOpFix; }
-       bool isAllowingTopOpAlert() { return allowTopOpAlert; }
        unsigned int getTopOpPercent() { return topOpPercent; }
        unsigned int getMinFixScore() { return minFixScore; }
        unsigned int getMinCanFixScore() { return minCanFixScore; }
index 14ab16c64b2efc1e569f277d2de7ee84505eb952..3f8a7d6c6373fad7c0e91c1781cb2dda82e282e7 100644 (file)
@@ -14,7 +14,7 @@ BLOCK 1       Blocks a channel from being fixed, both automatically and manually.\nThe
 CANFIX 1       Lists the ops that can fix the specified channel without requiring oper assistance.
 CHECK  1       Shows the number of ops and total clients in the specified channel.
 CSCORE 1       Shows the same as SCORE, but in a compact output. See /msg C HELP SCORE.
-CHANFIX        1       Performs a manual fix on the specified channel. Append OVERRIDE, YES, or an exclamation mark (!) to force a manual fix. Append CONTACT if you wish that the top 10 ops for the channel be noticed about the fix before the fix happens.
+CHANFIX        1       Performs a manual fix on the specified channel. Append OVERRIDE, YES, or an exclamation mark (!) to force a manual fix.
 DELFLAG        1       Removes the specified flag from a user. See /msg C HELP ADDFLAG.
 DELHOST        1       Deletes the specified hostmask from a user's list of hostmasks.
 DELNOTE        1       Deletes a note matching the specified id from the specified channel. You can only delete the notes you have added.
@@ -31,7 +31,7 @@ OPLIST        1       Shows the top 10 op accounts and their scores for the specified channel
 OPNICKS        1       Shows the nicknames currently opped on the specified channel.
 REHASH 1       Reloads the translations, configuration, or help values based on the specified target.
 RELOAD 1       Completely reloads chanfix.\nNOTE: This will subject chanfix to a reconnection which will also include a large netburst that takes time to process, so use with caution.
-REQUESTOP      1       Performs a fix on the specified channel. Append CONTACT if you wish that the top 10 ops for the channel be noticed about the fix before the fix happens.
+REQUESTOP      1       Performs a fix on the specified channel.
 SCORE  1       Without extra arguments, shows the top scores of <channel>.\nOtherwise, it shows the score of either an <account> or a currently online client <=nick> for <channel>.
 SET    1       Sets various configuration options to the specified values.\nBoolean settings: ENABLE_AUTOFIX, ENABLE_CHANFIX, ENABLE_CHANNEL_BLOCKING.\nInteger settings: NUM_SERVERS.
 SIMULATE       1       Performs a simulated fix on the specified channel. Append AUTO or MANUAL to choose what type of fix to simulate upon the channel.