diff --git a/include/aoclient.h b/include/aoclient.h index e438a28..a33deba 100644 --- a/include/aoclient.h +++ b/include/aoclient.h @@ -1537,6 +1537,15 @@ class AOClient : public QObject { */ void cmdForceImmediate(int argc, QStringList argv); + /** + * @brief Toggles whether iniswaps are allowed in the current area. + * + * @details No arguments. + * + * @iscommand + */ + void cmdAllowIniswap(int argc, QStringList argv); + ///@} /** @@ -1777,6 +1786,8 @@ class AOClient : public QObject { {"unshake", {ACLFlags.value("MUTE"), 1, &AOClient::cmdUnShake}}, {"forceimmediate", {ACLFlags.value("CM"), 1, &AOClient::cmdForceImmediate}}, {"force_noint_pres", {ACLFlags.value("CM"), 1, &AOClient::cmdForceImmediate}}, + {"allowiniswap", {ACLFlags.value("CM"), 1, &AOClient::cmdAllowIniswap}}, + {"allow_iniswap", {ACLFlags.value("CM"), 1, &AOClient::cmdAllowIniswap}}, }; /** diff --git a/src/commands.cpp b/src/commands.cpp index d7473ea..bf3e5ff 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -1529,6 +1529,14 @@ void AOClient::cmdForceImmediate(int argc, QStringList argv) sendServerMessage("Forced immediate text processing in this area is now " + state); } +void AOClient::cmdAllowIniswap(int argc, QStringList argv) +{ + AreaData* area = server->areas[current_area]; + area->iniswap_allowed = !area->iniswap_allowed; + QString state = area->iniswap_allowed ? "allowed." : "disallowed."; + sendServerMessage("Iniswapping in this area is now " + state); +} + QStringList AOClient::buildAreaList(int area_idx) { QStringList entries;