0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-12 04:51:08 +01:00

construct: Slave implies read-only.

This commit is contained in:
Jason Volk 2020-07-27 23:17:03 -07:00
parent f2c182b403
commit c5d60c1af6

View file

@ -482,14 +482,19 @@ applyargs()
if(defaults) if(defaults)
ircd::defaults.set("true"); ircd::defaults.set("true");
if(read_only)
ircd::read_only.set("true");
if(slave) if(slave)
{
ircd::db::open_slave.set("true"); ircd::db::open_slave.set("true");
read_only = true; // slave implies read_only
}
// read_only implies write_avoid. if(read_only)
if(write_avoid || read_only) {
ircd::read_only.set("true");
write_avoid = true; // read_only implies write_avoid.
}
if(write_avoid)
ircd::write_avoid.set("true"); ircd::write_avoid.set("true");
if(debugmode) if(debugmode)