mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-07-07 18:23:14 +02:00
- Improved detection of bad set::modes-on-oper and oper::modes, now rejecting things like
'o', 'z', and more. - Fix from above fixes an /OPER announce problem reported by Bock (#0003135).
This commit is contained in:
@@ -1411,3 +1411,6 @@
|
||||
- Setting set::pingpong-warning didn't work, reported by vonitsanet, patch supplied by
|
||||
avb (#0003131).
|
||||
- Don't show silence list to others
|
||||
- Improved detection of bad set::modes-on-oper and oper::modes, now rejecting things like
|
||||
'o', 'z', and more.
|
||||
- Fix from above fixes an /OPER announce problem reported by Bock (#0003135).
|
||||
|
||||
+16
-12
@@ -3326,12 +3326,14 @@ int _test_oper(ConfigFile *conf, ConfigEntry *ce)
|
||||
/* oper::modes */
|
||||
else if (!strcmp(cep->ce_varname, "modes"))
|
||||
{
|
||||
if (strchr(cep->ce_vardata, 'z'))
|
||||
{
|
||||
config_error("%s:%i: oper::modes may not have +z",
|
||||
cep->ce_fileptr->cf_filename, cep->ce_varlinenum);
|
||||
errors++;
|
||||
}
|
||||
char *p;
|
||||
for (p = cep->ce_vardata; *p; p++)
|
||||
if (strchr("oOaANCrzS", *p))
|
||||
{
|
||||
config_error("%s:%i: oper::modes may not include mode '%c'",
|
||||
cep->ce_fileptr->cf_filename, cep->ce_varlinenum, *p);
|
||||
errors++;
|
||||
}
|
||||
if (has_modes)
|
||||
{
|
||||
config_warn_duplicate(cep->ce_fileptr->cf_filename,
|
||||
@@ -7162,14 +7164,16 @@ int _test_set(ConfigFile *conf, ConfigEntry *ce)
|
||||
|
||||
}
|
||||
else if (!strcmp(cep->ce_varname, "modes-on-oper")) {
|
||||
char *p;
|
||||
CheckNull(cep);
|
||||
CheckDuplicate(cep, modes_on_oper, "modes-on-oper");
|
||||
if (strchr(cep->ce_vardata, 'z'))
|
||||
{
|
||||
config_error("%s:%i: set::modes-on-oper may not have +z",
|
||||
cep->ce_fileptr->cf_filename, cep->ce_varlinenum);
|
||||
errors++;
|
||||
}
|
||||
for (p = cep->ce_vardata; *p; p++)
|
||||
if (strchr("oOaANCrzS", *p))
|
||||
{
|
||||
config_error("%s:%i: set::modes-on-oper may not include mode '%c'",
|
||||
cep->ce_fileptr->cf_filename, cep->ce_varlinenum, *p);
|
||||
errors++;
|
||||
}
|
||||
templong = (long) set_usermode(cep->ce_vardata);
|
||||
}
|
||||
else if (!strcmp(cep->ce_varname, "snomask-on-oper")) {
|
||||
|
||||
Reference in New Issue
Block a user