Skip to content

Commit

Permalink
chanfix: Deactivating CONTACT feature in CHANFIX and REQUESTOP commands.
Browse files Browse the repository at this point in the history
Making CONTACT the default behaviour instead
  • Loading branch information
hiddn committed May 16, 2022
1 parent 40d2a0e commit 28dcbbf
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 14 deletions.
4 changes: 3 additions & 1 deletion bin/openchanfix.example.conf
Expand Up @@ -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 %.
Expand Down
5 changes: 1 addition & 4 deletions mod.openchanfix/CHANFIXCommand.cc
Expand Up @@ -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;
Expand All @@ -56,9 +56,6 @@ if (st.size() > 2) {
if (!strcasecmp(st[pos],"!"))
override = true;

if (!strcasecmp(st[pos],"CONTACT"))
alert = true;

pos++;
}
}
Expand Down
2 changes: 1 addition & 1 deletion mod.openchanfix/REQUESTOPCommand.cc
Expand Up @@ -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;

Expand Down
5 changes: 2 additions & 3 deletions mod.openchanfix/chanfix.cc
Expand Up @@ -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 */
));
Expand Down Expand Up @@ -250,7 +250,7 @@ RegisterCommand(new RELOADCommand(this, "RELOAD",
sqlcfUser::F_OWNER
));
RegisterCommand(new REQUESTOPCommand(this, "REQUESTOP",
isAllowingTopOpAlert() ? "<#channel> [contact]" : "<#channel>",
"<#channel>",
2,
0
));
Expand Down Expand Up @@ -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()) ;
Expand Down
4 changes: 3 additions & 1 deletion mod.openchanfix/chanfix.example.conf.in
Expand Up @@ -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 %.
Expand Down
2 changes: 0 additions & 2 deletions mod.openchanfix/chanfix.h
Expand Up @@ -454,7 +454,6 @@ class chanfix : public xClient {
bool stopAutoFixOnOp;
bool stopChanFixOnOp;
bool allowTopOpFix;
bool allowTopOpAlert;
int topOpPercent;
int minFixScore;
int minCanFixScore;
Expand Down Expand Up @@ -541,7 +540,6 @@ class chanfix : public xClient {
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; }
Expand Down
4 changes: 2 additions & 2 deletions mod.openchanfix/doc/chanfix.help.sql
Expand Up @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit 28dcbbf

Please sign in to comment.