qrbuf.QRfloor = new_floor;
CtdlPutRoom(&qrbuf);
- begin_critical_section(S_CONFIG);
-
- // If baseroom/aideroom name changes, update config
- if (!strncasecmp(old_name, CtdlGetConfigStr("c_baseroom"), ROOMNAMELEN)) {
- CtdlSetConfigStr("c_baseroom", new_name);
- }
- if (!strncasecmp(old_name, CtdlGetConfigStr("c_aideroom"), ROOMNAMELEN)) {
- CtdlSetConfigStr("c_aideroom", new_name);
- }
-
- end_critical_section(S_CONFIG);
// If the room name changed, then there are now two room
// records, so we have to delete the old one.
end_critical_section(S_ROOMS);
+ // If baseroom/aideroom name changes, update config
+ begin_critical_section(S_CONFIG);
+ if (!strncasecmp(old_name, CtdlGetConfigStr("c_baseroom"), ROOMNAMELEN)) {
+ CtdlSetConfigStr("c_baseroom", new_name);
+ }
+ if (!strncasecmp(old_name, CtdlGetConfigStr("c_aideroom"), ROOMNAMELEN)) {
+ CtdlSetConfigStr("c_aideroom", new_name);
+ }
+ end_critical_section(S_CONFIG);
+
// Adjust the floor reference counts if necessary
if (new_floor != old_floor) {
lgetfloor(&flbuf, old_floor);