Sort out new commands from master, delete commands.cpp
🦀 🦀
This commit is contained in:
parent
577e2b5095
commit
ea50100acf
@ -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 \
|
||||
|
@ -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.
|
||||
*
|
||||
|
1726
src/commands.cpp
1726
src/commands.cpp
File diff suppressed because it is too large
Load Diff
@ -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.");
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user