add iniswap toggle command
This commit is contained in:
parent
89c9692924
commit
461c4f9d6e
@ -1537,6 +1537,15 @@ class AOClient : public QObject {
|
|||||||
*/
|
*/
|
||||||
void cmdForceImmediate(int argc, QStringList argv);
|
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}},
|
{"unshake", {ACLFlags.value("MUTE"), 1, &AOClient::cmdUnShake}},
|
||||||
{"forceimmediate", {ACLFlags.value("CM"), 1, &AOClient::cmdForceImmediate}},
|
{"forceimmediate", {ACLFlags.value("CM"), 1, &AOClient::cmdForceImmediate}},
|
||||||
{"force_noint_pres", {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}},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1529,6 +1529,14 @@ void AOClient::cmdForceImmediate(int argc, QStringList argv)
|
|||||||
sendServerMessage("Forced immediate text processing in this area is now " + state);
|
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 AOClient::buildAreaList(int area_idx)
|
||||||
{
|
{
|
||||||
QStringList entries;
|
QStringList entries;
|
||||||
|
Loading…
Reference in New Issue
Block a user