At least make the intro message work
This commit is contained in:
parent
dc90ee6d9a
commit
15d4deebd3
@ -1303,6 +1303,34 @@ class AOClient : public QObject {
|
|||||||
* @iscommand
|
* @iscommand
|
||||||
*/
|
*/
|
||||||
void cmdNoteCardClear(int argc, QStringList argv);
|
void cmdNoteCardClear(int argc, QStringList argv);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief [Insert description here]
|
||||||
|
*
|
||||||
|
* @details [Insert explanation here]
|
||||||
|
*/
|
||||||
|
void cmdExamine(int argc, QStringList argv);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief [Insert description here]
|
||||||
|
*
|
||||||
|
* @details [Insert explanation here]
|
||||||
|
*/
|
||||||
|
void cmdTestify(int argc, QStringList argv);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief [Insert description here]
|
||||||
|
*
|
||||||
|
* @details [Insert explanation here]
|
||||||
|
*/
|
||||||
|
void cmdUpdateStatement(int argc, QStringList argv);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief [Insert description here]
|
||||||
|
*
|
||||||
|
* @details [Insert explanation here]
|
||||||
|
*/
|
||||||
|
void cmdDeleteStatement(int argc, QStringList argv);
|
||||||
|
|
||||||
// Messaging/Client
|
// Messaging/Client
|
||||||
|
|
||||||
@ -1622,6 +1650,7 @@ class AOClient : public QObject {
|
|||||||
{"judgelog", {ACLFlags.value("CM"), 0, &AOClient::cmdJudgeLog}},
|
{"judgelog", {ACLFlags.value("CM"), 0, &AOClient::cmdJudgeLog}},
|
||||||
{"allow_blankposting", {ACLFlags.value("MODCHAT"), 0, &AOClient::cmdAllow_Blankposting}},
|
{"allow_blankposting", {ACLFlags.value("MODCHAT"), 0, &AOClient::cmdAllow_Blankposting}},
|
||||||
{"baninfo", {ACLFlags.value("BAN"), 1, &AOClient::cmdBanInfo}},
|
{"baninfo", {ACLFlags.value("BAN"), 1, &AOClient::cmdBanInfo}},
|
||||||
|
{"examine", {ACLFlags.value("CM"), 0, &AOClient::cmdExamine}},
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1356,6 +1356,20 @@ void AOClient::cmdBanInfo(int argc, QStringList argv)
|
|||||||
sendServerMessage(ban_info.join("\n"));
|
sendServerMessage(ban_info.join("\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AOClient::cmdExamine(int argc, QStringList argv)
|
||||||
|
{
|
||||||
|
AreaData* area = server->areas[current_area];
|
||||||
|
if (area->test_rec == AreaData::TestimonyRecording::RECORDING) {
|
||||||
|
sendServerMessage("Examination already in progress.");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
clearTestimony();
|
||||||
|
area->statement = 0;
|
||||||
|
area->test_rec = AreaData::TestimonyRecording::RECORDING;
|
||||||
|
sendServerMessage("Started testimony recording.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QStringList AOClient::buildAreaList(int area_idx)
|
QStringList AOClient::buildAreaList(int area_idx)
|
||||||
{
|
{
|
||||||
QStringList entries;
|
QStringList entries;
|
||||||
|
@ -630,6 +630,11 @@ AOPacket AOClient::validateIcPacket(AOPacket packet)
|
|||||||
|
|
||||||
//Testimony playback
|
//Testimony playback
|
||||||
if (area->test_rec == AreaData::TestimonyRecording::RECORDING || area->test_rec == AreaData::TestimonyRecording::ADD) {
|
if (area->test_rec == AreaData::TestimonyRecording::RECORDING || area->test_rec == AreaData::TestimonyRecording::ADD) {
|
||||||
|
if (area->statement == 0) {
|
||||||
|
args[4] = "~~--== " + args[4] + " ==--";
|
||||||
|
args[14] = "5";
|
||||||
|
server->broadcast(AOPacket("RT",{"testimony1"}), current_area);
|
||||||
|
}
|
||||||
addStatement(args);
|
addStatement(args);
|
||||||
}
|
}
|
||||||
else if (area->test_rec == AreaData::TestimonyRecording::UPDATE) {
|
else if (area->test_rec == AreaData::TestimonyRecording::UPDATE) {
|
||||||
|
@ -23,10 +23,12 @@ void AOClient::addStatement(QStringList packet)
|
|||||||
{
|
{
|
||||||
AreaData* area = server->areas[current_area];
|
AreaData* area = server->areas[current_area];
|
||||||
int c_statement = area->statement;
|
int c_statement = area->statement;
|
||||||
packet[13] = 1;
|
packet[14] = 1;
|
||||||
if (area->test_rec == AreaData::TestimonyRecording::RECORDING) {
|
if (area->test_rec == AreaData::TestimonyRecording::RECORDING) {
|
||||||
if (area->testimony.isEmpty() && c_statement <= 50) { //Make this configurable once Mangos ConfigManager changes get merged
|
if (c_statement <= 50) { //Make this configurable once Mangos ConfigManager changes get merged
|
||||||
area->testimony.append(packet);
|
area->testimony.append(packet);
|
||||||
|
area->statement = c_statement + 1;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sendServerMessage("Unable to add more statements. The maximum amount of statements has been reached.");
|
sendServerMessage("Unable to add more statements. The maximum amount of statements has been reached.");
|
||||||
|
Loading…
Reference in New Issue
Block a user