Sort out new commands from master, delete commands.cpp

🦀 🦀
This commit is contained in:
MangosArentLiterature 2021-04-15 18:13:15 -05:00
parent 577e2b5095
commit ea50100acf
6 changed files with 42 additions and 1746 deletions

View File

@ -30,7 +30,6 @@ SOURCES += src/advertiser.cpp \
src/aoclient.cpp \
src/aopacket.cpp \
src/area_data.cpp \
src/commands.cpp \
src/commands/area.cpp \
src/commands/authentication.cpp \
src/commands/casing.cpp \

View File

@ -1125,6 +1125,24 @@ class AOClient : public QObject {
*/
void cmdReload(int argc, QStringList argv);
/**
* @brief Toggles immediate text processing in the current area.
*
* @details No arguments.
*
* @iscommand
*/
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);
///@}
/**
@ -1570,24 +1588,6 @@ class AOClient : public QObject {
void cmdCurrentMusic(int argc, QStringList argv);
/**
* @brief Toggles immediate text processing in the current area.
*
* @details No arguments.
*
* @iscommand
*/
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);
/**
* @brief Toggles whether this client is considered AFK.
*

File diff suppressed because it is too large Load Diff

View File

@ -283,3 +283,9 @@ void AOClient::cmdJudgeLog(int argc, QStringList argv)
sendServerMessage(filteredmessage);
}
}
void AOClient::cmdAfk(int argc, QStringList argv)
{
is_afk = true;
sendServerMessage("You are now AFK.");
}

View File

@ -53,6 +53,8 @@ QStringList AOClient::buildAreaList(int area_idx)
char_entry.insert(0, "[CM] ");
if (authenticated)
char_entry += " (" + client->getIpid() + "): " + client->ooc_name;
if (client->is_afk)
char_entry += " [AFK]";
entries.append(char_entry);
}
}

View File

@ -328,7 +328,7 @@ void AOClient::cmdUnBlockWtce(int argc, QStringList argv)
target->is_wtce_blocked = false;
}
void AOClient::cmdAllow_Blankposting(int argc, QStringList argv)
void AOClient::cmdAllowBlankposting(int argc, QStringList argv)
{
QString sender_name = ooc_name;
AreaData* area = server->areas[current_area];
@ -387,3 +387,18 @@ void AOClient::cmdReload(int argc, QStringList argv)
sendServerMessage("Reloaded configurations");
}
void AOClient::cmdForceImmediate(int argc, QStringList argv)
{
AreaData* area = server->areas[current_area];
area->force_immediate = !area->force_immediate;
QString state = area->force_immediate ? "on." : "off.";
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);
}