Add /testimony
This commit is contained in:
parent
73cd8f1eb9
commit
5eabcc191e
@ -1558,6 +1558,15 @@ class AOClient : public QObject {
|
|||||||
*/
|
*/
|
||||||
void cmdAddStatement(int argc, QStringList argv);
|
void cmdAddStatement(int argc, QStringList argv);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sends a list of the testimony to OOC of the requesting client
|
||||||
|
*
|
||||||
|
* @details Retrieves all stored IC-Messages of the area and dumps them into OOC with some formatting.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
void cmdTestimony(int argc, QStringList argv);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Saves a testimony recording to the servers storage.
|
* @brief Saves a testimony recording to the servers storage.
|
||||||
*
|
*
|
||||||
@ -1869,6 +1878,7 @@ class AOClient : public QObject {
|
|||||||
{"ungimp", {ACLFlags.value("MUTE"), 1, &AOClient::cmdUnGimp}},
|
{"ungimp", {ACLFlags.value("MUTE"), 1, &AOClient::cmdUnGimp}},
|
||||||
{"baninfo", {ACLFlags.value("BAN"), 1, &AOClient::cmdBanInfo}},
|
{"baninfo", {ACLFlags.value("BAN"), 1, &AOClient::cmdBanInfo}},
|
||||||
{"testify", {ACLFlags.value("CM"), 0, &AOClient::cmdTestify}},
|
{"testify", {ACLFlags.value("CM"), 0, &AOClient::cmdTestify}},
|
||||||
|
{"testimony", {ACLFlags.value("NONE"), 0, &AOClient::cmdTestimony}},
|
||||||
{"examine", {ACLFlags.value("CM"), 0, &AOClient::cmdExamine}},
|
{"examine", {ACLFlags.value("CM"), 0, &AOClient::cmdExamine}},
|
||||||
{"pause", {ACLFlags.value("CM"), 0, &AOClient::cmdPauseTestimony}},
|
{"pause", {ACLFlags.value("CM"), 0, &AOClient::cmdPauseTestimony}},
|
||||||
{"delete", {ACLFlags.value("CM"), 0, &AOClient::cmdDeleteStatement}},
|
{"delete", {ACLFlags.value("CM"), 0, &AOClient::cmdDeleteStatement}},
|
||||||
|
@ -130,6 +130,24 @@ void AOClient::cmdExamine(int argc, QStringList argv)
|
|||||||
sendServerMessage("Unable to start replay without prior examination.");
|
sendServerMessage("Unable to start replay without prior examination.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AOClient::cmdTestimony(int argc, QStringList argv)
|
||||||
|
{
|
||||||
|
AreaData* area = server->areas[current_area];
|
||||||
|
if (area->testimony.size() -1 < 1) {
|
||||||
|
sendServerMessage("Unable to display empty testimony.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString ooc_message;
|
||||||
|
for (int i = 1; i <= area->testimony.size() -1; i++)
|
||||||
|
{
|
||||||
|
QStringList packet = area->testimony.at(i);
|
||||||
|
QString ic_message = packet[4];
|
||||||
|
ooc_message.append( "[" + QString::number(i) + "]" + ic_message + "\n");
|
||||||
|
}
|
||||||
|
sendServerMessage(ooc_message);
|
||||||
|
}
|
||||||
|
|
||||||
void AOClient::cmdDeleteStatement(int argc, QStringList argv)
|
void AOClient::cmdDeleteStatement(int argc, QStringList argv)
|
||||||
{
|
{
|
||||||
AreaData* area = server->areas[current_area];
|
AreaData* area = server->areas[current_area];
|
||||||
|
Loading…
Reference in New Issue
Block a user