commit - 62a07596d6a3a8da206bde8d34edc8b02781d33d
commit + 808c291c76b7ecb4ae13b6ee12e8afe658b627c1
blob - 57e65892054b9bd20c1d2cc309dd9ccaca1c1a41
blob + 018855d5e1f4490f92291069b635f2afa0cf9c34
--- doc/sample-ngircd.conf.tmpl
+++ doc/sample-ngircd.conf.tmpl
# they are not(!) channel-operators?
;OperCanUseMode = no
+ # Should IRC Operators get AutoOp (+o) in persistent (+P) channels?
+ ;OperChanPAutoOp = yes
+
# Mask IRC Operator mode requests as if they were coming from the
# server? (This is a compatibility hack for ircd-irc2 servers)
;OperServerMode = no
blob - aff11a67bf86ec6c79d0daae9cfadeff345662f2
blob + c03cf740b4f67cae39c38e304a38ea5cbc828309
--- man/ngircd.conf.5.tmpl
+++ man/ngircd.conf.5.tmpl
\fBOperCanUseMode\fR (boolean)
Should IRC Operators be allowed to use the MODE command even if they are
not(!) channel-operators? Default: no.
+.TP
+\fBOperChanPAutoOp\fR (boolean)
+Should IRC Operators get AutoOp (+o) in persistent (+P) channels?
+Default: yes.
.TP
\fBOperServerMode\fR (boolean)
If \fBOperCanUseMode\fR is enabled, this may lead the compatibility problems
blob - 0052de8f91b505a639401253f79f8a6fbc9cf4bd
blob + 4ac37ad4033331e11692ee0aee6b87e96b6846ee
--- src/ngircd/conf.c
+++ src/ngircd/conf.c
printf(" MorePrivacy = %s\n", yesno_to_str(Conf_MorePrivacy));
printf(" NoticeAuth = %s\n", yesno_to_str(Conf_NoticeAuth));
printf(" OperCanUseMode = %s\n", yesno_to_str(Conf_OperCanMode));
+ printf(" OperChanPAutoOp = %s\n", yesno_to_str(Conf_OperChanPAutoOp));
printf(" OperServerMode = %s\n", yesno_to_str(Conf_OperServerMode));
#ifdef PAM
printf(" PAM = %s\n", yesno_to_str(Conf_PAM));
Conf_MorePrivacy = false;
Conf_NoticeAuth = false;
Conf_OperCanMode = false;
+ Conf_OperChanPAutoOp = true;
Conf_OperServerMode = false;
#ifdef PAM
Conf_PAM = true;
|| strcasecmp(Var, "ConnectIPv4") == 0
|| strcasecmp(Var, "ConnectIPv6") == 0
|| strcasecmp(Var, "OperCanUseMode") == 0
+ || strcasecmp(Var, "OperChanPAutoOp") == 0
|| strcasecmp(Var, "OperServerMode") == 0
|| strcasecmp(Var, "PredefChannelsOnly") == 0
|| strcasecmp(Var, "SyslogFacility") == 0
Conf_OperCanMode = Check_ArgIsTrue(Arg);
return;
}
+ if (strcasecmp(Var, "OperChanPAutoOp") == 0) {
+ Conf_OperChanPAutoOp = Check_ArgIsTrue(Arg);
+ return;
+ }
if (strcasecmp(Var, "OperServerMode") == 0) {
Conf_OperServerMode = Check_ArgIsTrue(Arg);
return;
blob - 7a4e38aa05b56a626a4aed84055a0e7d28fc081a
blob + 90d74d2096e42d2dd8f28537db28f307e700e5c2
--- src/ngircd/conf.h
+++ src/ngircd/conf.h
/** Flag indicating if IRC operators are allowed to always use MODE (true) */
GLOBAL bool Conf_OperCanMode;
+/** Flag indicating if IRC operators get AutoOp in persistent (+P) channels */
+GLOBAL bool Conf_OperChanPAutoOp;
+
/**
* If true, mask channel MODE commands of IRC operators to the server.
* Background: ircd2 will ignore channel MODE commands if an IRC operator
blob - 72fbdc242f6069cc4758dbda43cb666d2426feca
blob + 4a157d67e5fca76d8461f421644da3d00e7b7dd0
--- src/ngircd/irc-channel.c
+++ src/ngircd/irc-channel.c
}
}
- /* If channel persistent and client is ircop: make client chanop */
- if (strchr(Channel_Modes(chan), 'P') && strchr(Client_Modes(target), 'o'))
+ /* If the channel is persistent (+P) and client is an IRC op:
+ * make client chanop, if not disabled in configuration. */
+ if (strchr(Channel_Modes(chan), 'P') && Conf_OperChanPAutoOp
+ && strchr(Client_Modes(target), 'o'))
Channel_UserModeAdd(chan, target, 'o');
} /* join_set_channelmodes */