Browse Source

First pass on removing Readable_String and Reference_String

master
Jessica James 3 years ago
parent
commit
709c5e2989
  1. 2
      src/Bot/include/IRC_Command.h
  2. 7
      src/Bot/src/IRC_Command.cpp
  3. 16
      src/Bot/src/Main.cpp
  4. 2
      src/Jupiter
  5. 6
      src/Plugins/ChannelRelay/ChannelRelay.cpp
  6. 3
      src/Plugins/ChannelRelay/ChannelRelay.h
  7. 3
      src/Plugins/CoreCommands/CoreCommands.cpp
  8. 2
      src/Plugins/ExtraCommands/ExtraCommands.cpp
  9. 4
      src/Plugins/FunCommands/FunCommands.cpp
  10. 6
      src/Plugins/PluginManager/PluginManager.cpp
  11. 4
      src/Plugins/RenX/RenX.Announcements/RenX_Announcements.cpp
  12. 2
      src/Plugins/RenX/RenX.CommandLogging/RenX_CommandLogging.cpp
  13. 173
      src/Plugins/RenX/RenX.Commands/RenX_Commands.cpp
  14. 8
      src/Plugins/RenX/RenX.Commands/RenX_Commands.h
  15. 4
      src/Plugins/RenX/RenX.Core/RenX_Plugin.cpp
  16. 4
      src/Plugins/RenX/RenX.Core/RenX_Plugin.h
  17. 43
      src/Plugins/RenX/RenX.Core/RenX_Server.cpp
  18. 2
      src/Plugins/RenX/RenX.Core/RenX_Server.h
  19. 374
      src/Plugins/RenX/RenX.Core/RenX_Tags.cpp
  20. 689
      src/Plugins/RenX/RenX.Core/RenX_Tags.h
  21. 8
      src/Plugins/RenX/RenX.ExtraLogging/RenX_ExtraLogging.cpp
  22. 6
      src/Plugins/RenX/RenX.ExtraLogging/RenX_ExtraLogging.h
  23. 2
      src/Plugins/RenX/RenX.Greetings/RenX_Greetings.cpp
  24. 3
      src/Plugins/RenX/RenX.HybridUUID/RenX_HybridUUID.cpp
  25. 108
      src/Plugins/RenX/RenX.Ladder.Web/RenX_Ladder_Web.cpp
  26. 14
      src/Plugins/RenX/RenX.Ladder.Web/RenX_Ladder_Web.h
  27. 562
      src/Plugins/RenX/RenX.Logging/RenX_Logging.cpp
  28. 210
      src/Plugins/RenX/RenX.Logging/RenX_Logging.h
  29. 18
      src/Plugins/RenX/RenX.Medals/RenX_Medals.cpp
  30. 4
      src/Plugins/RenX/RenX.Medals/RenX_Medals.h
  31. 48
      src/Plugins/RenX/RenX.ServerList/RenX_ServerList.cpp
  32. 22
      src/Plugins/RenX/RenX.ServerList/RenX_ServerList.h

2
src/Bot/include/IRC_Command.h

@ -161,7 +161,7 @@ private:
std::vector<IRCCommand::TypeAccessPair> m_types; /** Access levels for channel types */
struct ChannelAccessPair {
Jupiter::StringS channel;
std::string channel;
int access;
};
std::vector<IRCCommand::ChannelAccessPair> m_channels; /** Access levels for specific channels */

7
src/Bot/src/IRC_Command.cpp

@ -16,6 +16,7 @@
* Written by Jessica James <jessica.aj@outlook.com>
*/
#include "jessilib/unicode.hpp"
#include "IRC_Command.h"
std::vector<IRCCommand*> g_IRCMasterCommandList;
@ -72,7 +73,7 @@ int IRCCommand::getAccessLevel(int type) {
int IRCCommand::getAccessLevel(const Jupiter::ReadableString &channel) {
for (const auto& pair : m_channels) {
if (pair.channel.equalsi(channel)) {
if (jessilib::equalsi(pair.channel, channel)) {
return pair.access;
}
}
@ -82,7 +83,7 @@ int IRCCommand::getAccessLevel(const Jupiter::ReadableString &channel) {
int IRCCommand::getAccessLevel(Jupiter::IRC::Client::Channel *channel) {
for (const auto& pair : m_channels) {
if (pair.channel.equalsi(channel->getName())) {
if (jessilib::equalsi(pair.channel, channel->getName())) {
return pair.access;
}
}
@ -105,7 +106,7 @@ void IRCCommand::setAccessLevel(int type, int accessLevel) {
}
void IRCCommand::setAccessLevel(const Jupiter::ReadableString &channel, int accessLevel) {
m_channels.push_back({ channel, accessLevel });
m_channels.push_back({ static_cast<std::string>(channel), accessLevel });
}
void IRCCommand::create() {

16
src/Bot/src/Main.cpp

@ -23,6 +23,7 @@
#include <exception>
#include <thread>
#include <mutex>
#include "jessilib/unicode.hpp"
#include "Jupiter/Functions.h"
#include "Jupiter/INIConfig.h"
#include "Jupiter/Socket.h"
@ -183,17 +184,18 @@ int main(int argc, const char **args) {
const char *configFileName = "Config.ini";
for (int i = 1; i < argc; i++) {
if ("-help"_jrs.equalsi(args[i])) {
std::string_view arg_view = args[i];
if (jessilib::equalsi("-help"_jrs, arg_view)) {
puts("Help coming soon, to a theatre near you!");
return 0;
}
else if ("-config"_jrs.equalsi(args[i]) && ++i < argc)
else if (jessilib::equalsi("-config"_jrs, arg_view) && ++i < argc)
configFileName = args[i];
else if ("-pluginsdir"_jrs.equalsi(args[i]) && ++i < argc)
plugins_directory = args[i];
else if ("-configsdir"_jrs.equalsi(args[i]) && ++i < argc)
configs_directory = args[i];
else if ("-configFormat"_jrs.equalsi(args[i]) && ++i < argc)
else if (jessilib::equalsi("-pluginsdir"_jrs, arg_view) && ++i < argc)
plugins_directory = arg_view;
else if (jessilib::equalsi("-configsdir"_jrs, arg_view) && ++i < argc)
configs_directory = arg_view;
else if (jessilib::equalsi("-configFormat"_jrs, arg_view) && ++i < argc)
puts("Feature not yet supported!");
else
printf("Warning: Unknown command line argument \"%s\" specified. Ignoring...", args[i]);

2
src/Jupiter

@ -1 +1 @@
Subproject commit 8bd27485a9bca535a598447aa550d862ba3a8b42
Subproject commit dbb4d0d147503f3bacdff87a7dd71d8a12665fab

6
src/Plugins/ChannelRelay/ChannelRelay.cpp

@ -35,7 +35,7 @@ bool ChannelRelayPlugin::initialize() {
}
for (const auto& type : split_types) {
ChannelRelayPlugin::types.concat(Jupiter::asInt(type));
m_types.push_back(Jupiter::asInt(type));
}
return true;
@ -44,7 +44,7 @@ bool ChannelRelayPlugin::initialize() {
int ChannelRelayPlugin::OnRehash() {
Jupiter::Plugin::OnRehash();
ChannelRelayPlugin::types.erase();
m_types.clear();
return this->initialize() ? 0 : -1;
}
@ -52,7 +52,7 @@ void ChannelRelayPlugin::OnChat(Jupiter::IRC::Client *server, std::string_view c
Jupiter::IRC::Client::Channel *chan = server->getChannel(channel);
if (chan != nullptr) {
int type = chan->getType();
if (ChannelRelayPlugin::types.find(type) != std::string_view::npos) {
if (std::find(m_types.begin(), m_types.end(), type) != m_types.end()) {
size_t serverCount = serverManager->size();
char prefix = chan->getUserPrefix(nick);
std::string user_string;

3
src/Plugins/ChannelRelay/ChannelRelay.h

@ -29,8 +29,9 @@ public: // Jupiter::Plugin
int OnRehash() override;
virtual bool initialize() override;
private:
Jupiter::String_Strict<int> types;
std::vector<int> m_types;
};
#endif // _CHANNELRELAY_H_HEADER

3
src/Plugins/CoreCommands/CoreCommands.cpp

@ -23,6 +23,7 @@
#include "IRC_Bot.h"
using namespace Jupiter::literals;
using namespace std::literals;
// Help Console Command
@ -120,7 +121,7 @@ VersionGenericCommand::VersionGenericCommand() {
}
Jupiter::GenericCommand::ResponseLine *VersionGenericCommand::trigger(const Jupiter::ReadableString &parameters) {
Jupiter::GenericCommand::ResponseLine *ret = new Jupiter::GenericCommand::ResponseLine("Version: "_jrs + Jupiter::ReferenceString(Jupiter::version), GenericCommand::DisplayType::PublicSuccess);
Jupiter::GenericCommand::ResponseLine *ret = new Jupiter::GenericCommand::ResponseLine("Version: "s + Jupiter::ReferenceString(Jupiter::version), GenericCommand::DisplayType::PublicSuccess);
ret->next = new Jupiter::GenericCommand::ResponseLine(Jupiter::ReferenceString(Jupiter::copyright), GenericCommand::DisplayType::PublicSuccess);
return ret;
}

2
src/Plugins/ExtraCommands/ExtraCommands.cpp

@ -46,7 +46,7 @@ Jupiter::GenericCommand::ResponseLine *SelectGenericCommand::trigger(const Jupit
IRCCommand::selected_server = serverManager->getServer(parameters);
if (IRCCommand::selected_server == nullptr)
return new Jupiter::GenericCommand::ResponseLine("Error: IRC server \""_jrs + parameters + "\" not found. No IRC server is currently selected."_jrs, GenericCommand::DisplayType::PublicError);
return new Jupiter::GenericCommand::ResponseLine("Error: IRC server \""s + parameters + "\" not found. No IRC server is currently selected."_jrs, GenericCommand::DisplayType::PublicError);
if (IRCCommand::active_server == nullptr)
IRCCommand::active_server = IRCCommand::selected_server;

4
src/Plugins/FunCommands/FunCommands.cpp

@ -190,9 +190,9 @@ const Jupiter::ReadableString &ResolveGenericCommand::getHelp(const Jupiter::Rea
static STRING_LITERAL_AS_NAMED_REFERENCE(hostHelp, "Resolves a hostname to an IP address. Syntax: resolve hostname <address>");
static STRING_LITERAL_AS_NAMED_REFERENCE(ipHelp, "Reverse-resolves an IP address to a hostname. Syntax: resolve ip <address>");
if (parameters.equalsi("hostname"_jrs) || parameters.equalsi("host"_jrs))
if (jessilib::equalsi(parameters, "hostname"_jrs) || jessilib::equalsi(parameters, "host"_jrs))
return hostHelp;
if (parameters.equalsi("ip"_jrs))
if (jessilib::equalsi(parameters, "ip"_jrs))
return ipHelp;
return defaultHelp;

6
src/Plugins/PluginManager/PluginManager.cpp

@ -118,15 +118,15 @@ const Jupiter::ReadableString &PluginGenericCommand::getHelp(const Jupiter::Read
static STRING_LITERAL_AS_NAMED_REFERENCE(listHelp, "Lists all of the plugins currently loaded. Syntax: plugin [list]");
static STRING_LITERAL_AS_NAMED_REFERENCE(defaultHelp, "Manages plugins. Syntax: plugin {[list], <load> <plugin>, <unload> <plugin>, <reload> [plugin]}");
if (parameters.equalsi(STRING_LITERAL_AS_REFERENCE("load"))) {
if (jessilib::equalsi(parameters, STRING_LITERAL_AS_REFERENCE("load"))) {
return loadHelp;
}
if (parameters.equalsi(STRING_LITERAL_AS_REFERENCE("unload"))) {
if (jessilib::equalsi(parameters, STRING_LITERAL_AS_REFERENCE("unload"))) {
return unloadHelp;
}
if (parameters.equalsi(STRING_LITERAL_AS_REFERENCE("list"))) {
if (jessilib::equalsi(parameters, STRING_LITERAL_AS_REFERENCE("list"))) {
return listHelp;
}

4
src/Plugins/RenX/RenX.Announcements/RenX_Announcements.cpp

@ -46,10 +46,10 @@ void RenX_AnnouncementsPlugin::announce(unsigned int, void *)
while (trand == RenX_AnnouncementsPlugin::lastLine);
RenX_AnnouncementsPlugin::lastLine = trand;
}
Jupiter::StringS announcement = RenX_AnnouncementsPlugin::announcementsFile.getLine(RenX_AnnouncementsPlugin::lastLine);
std::string announcement = RenX_AnnouncementsPlugin::announcementsFile.getLine(RenX_AnnouncementsPlugin::lastLine);
RenX::sanitizeTags(announcement);
Jupiter::String msg;
std::string msg;
RenX::Core *core = RenX::getCore();
RenX::Server *server;
for (unsigned int i = 0; i != RenX::getCore()->getServerCount(); i++)

2
src/Plugins/RenX/RenX.CommandLogging/RenX_CommandLogging.cpp

@ -67,7 +67,7 @@ void RenX_CommandLoggingPlugin::RenX_OnCommandTriggered(RenX::Server& server, co
return;
}
WriteToLog(server, player, trigger + " " + parameters);
WriteToLog(server, player, static_cast<std::string>(trigger) + " " + parameters);
}
std::ostream& operator<<(std::ostream& in_stream, const Jupiter::ReadableString& in_string) {

173
src/Plugins/RenX/RenX.Commands/RenX_Commands.cpp

@ -82,7 +82,7 @@ bool RenX_CommandsPlugin::initialize() {
m_playerInfoFormat = this->config.get("PlayerInfoFormat"_jrs, IRCCOLOR "03[Player Info]" IRCCOLOR "{TCOLOR} Name: " IRCBOLD "{RNAME}" IRCBOLD " - ID: {ID} - Team: " IRCBOLD "{TEAML}" IRCBOLD " - Vehicle Kills: {VEHICLEKILLS} - Building Kills {BUILDINGKILLS} - Kills {KILLS} - Deaths: {DEATHS} - KDR: {KDR} - Access: {ACCESS}"_jrs);
m_adminPlayerInfoFormat = this->config.get("AdminPlayerInfoFormat"_jrs, Jupiter::StringS::Format("%.*s - IP: " IRCBOLD "{IP}" IRCBOLD " - HWID: " IRCBOLD "{HWID}" IRCBOLD " - RDNS: " IRCBOLD "{RDNS}" IRCBOLD " - Steam ID: " IRCBOLD "{STEAM}", m_playerInfoFormat.size(),
m_playerInfoFormat.data()));
m_buildingInfoFormat = this->config.get("BuildingInfoFormat"_jrs, ""_jrs IRCCOLOR + RenX::tags->buildingTeamColorTag + RenX::tags->buildingNameTag + IRCCOLOR " - " IRCCOLOR "07"_jrs + RenX::tags->buildingHealthPercentageTag + "%"_jrs);
m_buildingInfoFormat = this->config.get("BuildingInfoFormat"_jrs, ""s IRCCOLOR + RenX::tags->buildingTeamColorTag + RenX::tags->buildingNameTag + IRCCOLOR " - " IRCCOLOR "07"_jrs + RenX::tags->buildingHealthPercentageTag + "%"_jrs);
m_staffTitle = this->config.get("StaffTitle"_jrs, "Moderator"_jrs);
RenX::sanitizeTags(m_playerInfoFormat);
@ -730,7 +730,7 @@ void PlayerInfoIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableStrin
Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
if (chan != nullptr) {
int type = chan->getType();
Jupiter::StringL msg;
std::string msg;
RenX::Server *server;
const Jupiter::ReadableString &player_info_format = source->getAccessLevel(channel, nick) > 1 ? pluginInstance.getAdminPlayerInfoFormat() : pluginInstance.getPlayerInfoFormat();
size_t index = 0;
@ -792,13 +792,14 @@ void BuildingInfoIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableStr
int type = chan->getType();
bool seenStrip;
std::forward_list<Jupiter::String *> gStrings;
std::forward_list<Jupiter::String *> nStrings;
std::forward_list<Jupiter::String *> oStrings;
std::forward_list<Jupiter::String *> cStrings;
Jupiter::String *str = nullptr;
bool foundServer{};
std::forward_list<std::string> gStrings;
std::forward_list<std::string> nStrings;
std::forward_list<std::string> oStrings;
std::forward_list<std::string> cStrings;
for (const auto& server : RenX::getCore()->getServers()) {
if (server->isLogChanType(type)) {
foundServer = true;
seenStrip = false;
for (const auto& building : server->buildings){
if (building->name.find("Rx_Building_Air"_jrs) == 0) {
@ -808,8 +809,8 @@ void BuildingInfoIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableStr
seenStrip = true;
}
str = new Jupiter::String(pluginInstance.getBuildingInfoFormat());
RenX::processTags(*str, server, nullptr, nullptr, building.get());
std::string str(pluginInstance.getBuildingInfoFormat());
RenX::processTags(str, server, nullptr, nullptr, building.get());
if (building->capturable)
cStrings.push_front(str);
@ -822,33 +823,27 @@ void BuildingInfoIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableStr
}
while (gStrings.empty() == false) {
str = gStrings.front();
gStrings.pop_front();
source->sendMessage(channel, *str);
delete str;
source->sendMessage(channel, gStrings.front());
}
while (nStrings.empty() == false) {
str = nStrings.front();
nStrings.pop_front();
source->sendMessage(channel, *str);
delete str;
source->sendMessage(channel, nStrings.front());
}
while (oStrings.empty() == false) {
str = oStrings.front();
oStrings.pop_front();
source->sendMessage(channel, *str);
delete str;
source->sendMessage(channel, oStrings.front());
}
while (cStrings.empty() == false) {
str = cStrings.front();
cStrings.pop_front();
source->sendMessage(channel, *str);
delete str;
source->sendMessage(channel, cStrings.front());
}
}
}
if (str == nullptr)
if (!foundServer) {
source->sendMessage(channel, "Error: Channel not attached to any connected Renegade X servers."_jrs);
}
}
const Jupiter::ReadableString &BuildingInfoIRCCommand::getHelp(const Jupiter::ReadableString &) {
@ -880,7 +875,7 @@ void MutatorsIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString
{
list = STRING_LITERAL_AS_REFERENCE(IRCCOLOR "03[Mutators]" IRCNORMAL);
for (const auto& mutator : server->mutators) {
list += " "_jrs + mutator;
list += " "s + mutator;
}
if (server->mutators.empty()) {
@ -925,10 +920,10 @@ void RotationIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString
list = STRING_LITERAL_AS_REFERENCE(IRCCOLOR "03[Rotation]" IRCNORMAL);
for (const auto& map : server->maps) {
if (jessilib::equalsi(server->getMap().name, map.name)) {
list += STRING_LITERAL_AS_REFERENCE(" " IRCBOLD "[") + map.name + STRING_LITERAL_AS_REFERENCE("]" IRCBOLD);
list += std::string(" " IRCBOLD "[") + map.name + STRING_LITERAL_AS_REFERENCE("]" IRCBOLD);
}
else {
list += " "_jrs + map.name;
list += " "s + map.name;
}
}
@ -968,7 +963,7 @@ void MapIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &chan
if (server->isLogChanType(type)) {
match = true;
const RenX::Map &map = server->getMap();
source->sendMessage(channel, "Current Map: "_jrs + map.name + "; GUID: "_jrs + RenX::formatGUID(map));
source->sendMessage(channel, "Current Map: "s + map.name + "; GUID: "_jrs + RenX::formatGUID(map));
}
}
if (match == false) {
@ -1011,7 +1006,7 @@ void GameInfoIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString
const RenX::Map &map = server->getMap();
std::chrono::seconds time = std::chrono::duration_cast<std::chrono::seconds>(server->getGameTime());
source->sendMessage(channel, Jupiter::StringS::Format(IRCCOLOR "03[GameInfo] " IRCCOLOR "%.*s", server->getGameVersion().size(), server->getGameVersion().data()));
source->sendMessage(channel, IRCCOLOR "03[GameInfo] " IRCCOLOR "10Map" IRCCOLOR ": "_jrs + map.name + "; " IRCCOLOR "10GUID" IRCCOLOR ": "_jrs + RenX::formatGUID(map));
source->sendMessage(channel, IRCCOLOR "03[GameInfo] " IRCCOLOR "10Map" IRCCOLOR ": "s + map.name + "; " IRCCOLOR "10GUID" IRCCOLOR ": "_jrs + RenX::formatGUID(map));
source->sendMessage(channel, Jupiter::StringS::Format(IRCCOLOR "03[GameInfo] " IRCCOLOR "10Elapsed time" IRCCOLOR ": %.2lld:%.2lld:%.2lld", time.count() / 3600, (time.count() % 3600) / 60, time.count() % 60));
source->sendMessage(channel, Jupiter::StringS::Format(IRCCOLOR "03[GameInfo] " IRCCOLOR "There are " IRCCOLOR "10%d" IRCCOLOR " players online.", server->players.size()));
}
@ -1212,44 +1207,45 @@ void ModsIRCCommand::create()
this->addTrigger(STRING_LITERAL_AS_REFERENCE("mods"));
}
void ModsIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.equalsi("show")) ShowModsIRCCommand_instance.trigger(source, channel, nick, parameters);
else
{
void ModsIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters) {
if (jessilib::equalsi(parameters, "show"sv)) {
ShowModsIRCCommand_instance.trigger(source, channel, nick, parameters);
}
else {
Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
if (chan != nullptr)
{
if (chan != nullptr) {
int type = chan->getType();
Jupiter::StringL msg;
const Jupiter::ReadableString &staff_word = pluginInstance.getStaffTitle();
for (unsigned int i = 0; i != RenX::getCore()->getServerCount(); i++)
{
for (unsigned int i = 0; i != RenX::getCore()->getServerCount(); i++) {
RenX::Server *server = RenX::getCore()->getServer(i);
if (server->isLogChanType(type))
{
if (server->isLogChanType(type)) {
msg = "";
if (server->players.size() != 0)
{
for (auto node = server->players.begin(); node != server->players.end(); ++node)
{
if (node->isBot == false && (!node->adminType.empty() || (node->access != 0 && (!node->gamePrefix.empty() || !node->formatNamePrefix.empty()))))
{
if (!msg.empty())
if (server->players.size() != 0) {
for (auto node = server->players.begin(); node != server->players.end(); ++node) {
if (node->isBot == false && (!node->adminType.empty() || (node->access != 0 && (!node->gamePrefix.empty() || !node->formatNamePrefix.empty())))) {
if (!msg.empty()) {
msg += ", ";
else msg += staff_word + "s in-game: "_jrs;
}
else {
msg += staff_word;
msg += "s in-game: "_jrs;
}
msg += node->gamePrefix;
msg += node->name;
}
}
}
if (msg.empty())
msg = "No "_jrs + staff_word + "s are in-game."_jrs;
if (msg.empty()) {
msg = "No "s + staff_word + "s are in-game."_jrs;
}
source->sendMessage(channel, msg);
}
}
if (msg.empty())
source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Channel not attached to any connected Renegade X servers."));
if (msg.empty()) {
source->sendMessage(channel,
STRING_LITERAL_AS_REFERENCE("Error: Channel not attached to any connected Renegade X servers."));
}
}
}
}
@ -1308,7 +1304,9 @@ void RulesIRCCommand::create()
void RulesIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.equalsi("show")) ShowRulesIRCCommand_instance.trigger(source, channel, nick, parameters);
if (jessilib::equalsi(parameters, "show"sv)) {
ShowRulesIRCCommand_instance.trigger(source, channel, nick, parameters);
}
else
{
Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
@ -1406,16 +1404,16 @@ void GameOverIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString
if (server->isLogChanType(type))
{
match = true;
if (parameters.equalsi("empty"_jrs))
if (jessilib::equalsi(parameters, "empty"_jrs))
server->gameoverWhenEmpty();
else if (parameters.equalsi("if empty"_jrs))
else if (jessilib::equalsi(parameters, "if empty"_jrs))
{
if (server->players.size() == server->getBotCount())
server->gameover();
}
else if (parameters.equalsi("now"_jrs))
else if (jessilib::equalsi(parameters, "now"_jrs))
server->gameover();
else if (parameters.equalsi("stop"_jrs) || parameters.equalsi("cancel"_jrs))
else if (jessilib::equalsi(parameters, "stop"_jrs) || jessilib::equalsi(parameters, "cancel"_jrs))
{
if (server->gameoverStop())
server->sendMessage("Notice: The scheduled gameover has been cancelled."_jrs);
@ -1664,7 +1662,7 @@ void DisarmIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &c
if (player != nullptr)
{
if (server->disarm(*player))
source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("All deployables (c4, beacons, etc) belonging to ") + RenX::getFormattedPlayerName(*player) + STRING_LITERAL_AS_REFERENCE(IRCCOLOR " have been disarmed."));
source->sendMessage(channel, std::string("All deployables (c4, beacons, etc) belonging to ") + RenX::getFormattedPlayerName(*player) + STRING_LITERAL_AS_REFERENCE(IRCCOLOR " have been disarmed."));
else
source->sendMessage(channel, "Error: Server does not support disarms."_jrs);
}
@ -1715,7 +1713,7 @@ void DisarmC4IRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString
if (player != nullptr)
{
if (server->disarmC4(*player))
source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("All C4 belonging to ") + RenX::getFormattedPlayerName(*player) + STRING_LITERAL_AS_REFERENCE(IRCCOLOR " have been disarmed."));
source->sendMessage(channel, std::string("All C4 belonging to ") + RenX::getFormattedPlayerName(*player) + STRING_LITERAL_AS_REFERENCE(IRCCOLOR " have been disarmed."));
else
source->sendMessage(channel, "Error: Server does not support disarms."_jrs);
}
@ -1768,7 +1766,7 @@ void DisarmBeaconIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableStr
if (player != nullptr)
{
if (server->disarmBeacon(*player))
source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("All beacons belonging to ") + RenX::getFormattedPlayerName(*player) + STRING_LITERAL_AS_REFERENCE(IRCCOLOR " have been disarmed."));
source->sendMessage(channel, std::string("All beacons belonging to ") + RenX::getFormattedPlayerName(*player) + STRING_LITERAL_AS_REFERENCE(IRCCOLOR " have been disarmed."));
else
source->sendMessage(channel, "Error: Server does not support disarms."_jrs);
}
@ -2447,7 +2445,7 @@ const Jupiter::ReadableString &AddBanIRCCommand::getHelp(const Jupiter::Readable
{
static STRING_LITERAL_AS_NAMED_REFERENCE(defaultHelp, "Adds a ban entry to the ban list. Use \"help addban keys\" for a list of input keys. Syntax: AddBan <Key> <Value> [<Key> <Value> ...]");
static STRING_LITERAL_AS_NAMED_REFERENCE(keyHelp, "Valueless keys (flags): Game, Chat, Bot, Vote, Mine, Ladder, Alert; Value-paired keys: Name, IP, Steam, RDNS, Duration, Reason (MUST BE LAST)");
if (!parameters.empty() && parameters.equalsi("keys"_jrs))
if (!parameters.empty() && jessilib::equalsi(parameters, "keys"_jrs))
return keyHelp;
return defaultHelp;
}
@ -2752,7 +2750,7 @@ void AddExemptionIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableStr
uint32_t ip = 0U;
uint8_t prefix_length = 32U;
uint64_t steamid = 0U;
Jupiter::String setter = nick + "@IRC"_jrs;
std::string setter = static_cast<std::string>(nick) + "@IRC"_jrs;
std::chrono::seconds duration = std::chrono::seconds::zero();
uint8_t flags = 0;
@ -2849,7 +2847,7 @@ const Jupiter::ReadableString &AddExemptionIRCCommand::getHelp(const Jupiter::Re
{
static STRING_LITERAL_AS_NAMED_REFERENCE(defaultHelp, "Adds an exemption entry to the exemption list. Use \"help addexemption keys\" for a list of input keys. Syntax: AddExemption <Key> <Value> [<Key> <Value> ...]");
static STRING_LITERAL_AS_NAMED_REFERENCE(keyHelp, "Valueless keys (flags): Ban, Kick; Value-paired keys: IP, Steam, Duration");
if (!parameters.empty() && parameters.equalsi("keys"_jrs))
if (!parameters.empty() && jessilib::equalsi(parameters, "keys"_jrs))
return keyHelp;
return defaultHelp;
}
@ -3021,7 +3019,8 @@ void PhaseBotsIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString
server->sendMessage(STRING_LITERAL_AS_REFERENCE("Bot phasing has been disabled."));
}
}
else if (parameters.equalsi("true") || parameters.equalsi("on") || parameters.equalsi("start") || parameters.equalsi("1")) {
else if (jessilib::equalsi(parameters, "true"sv) || jessilib::equalsi(parameters, "on"sv)
|| jessilib::equalsi(parameters, "start"sv) || jessilib::equalsi(parameters, "1"sv)) {
togglePhasing(server, true);
server->sendMessage(STRING_LITERAL_AS_REFERENCE("Bot phasing has been enabled."));
}
@ -3342,15 +3341,15 @@ void CancelVoteIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableStrin
if (parameters.empty()) {
cancel_all = true;
} else {
if (parameters.equalsi("all") || parameters.equalsi("a")) {
if (jessilib::equalsi(parameters, "all"sv) || jessilib::equalsi(parameters, "a"sv)) {
cancel_all = true;
} else if (parameters.equalsi("public") || parameters.equalsi("p")) {
} else if (jessilib::equalsi(parameters, "public"sv) || jessilib::equalsi(parameters, "p"sv)) {
target = RenX::TeamType::None;
} else if (parameters.equalsi("gdi") || parameters.equalsi("g")) {
} else if (jessilib::equalsi(parameters, "gdi"sv) || jessilib::equalsi(parameters, "g"sv)) {
target = RenX::TeamType::GDI;
} else if (parameters.equalsi("blackhand") || parameters.equalsi("bh") || parameters.equalsi("b")) {
} else if (jessilib::equalsi(parameters, "blackhand"sv) || jessilib::equalsi(parameters, "bh"sv) || jessilib::equalsi(parameters, "b"sv)) {
target = RenX::TeamType::GDI;
} else if (parameters.equalsi("nod") || parameters.equalsi("n")) {
} else if (jessilib::equalsi(parameters, "nod"sv) || jessilib::equalsi(parameters, "n"sv)) {
target = RenX::TeamType::Nod;
} else {
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Invalid Team. Allowed values are all/a, public/p, gdi/g, nod/n, blackhand/bh/b."));
@ -3469,7 +3468,7 @@ void ModsGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *, const Ju
for (auto node = source->players.begin(); node != source->players.end(); ++node) {
if (node->isBot == false && (!node->adminType.empty() || (node->access != 0 && (!node->gamePrefix.empty() || !node->formatNamePrefix.empty())))) {
if (msg.empty())
msg = staff_word + "s in-game: "_jrs;
msg = static_cast<std::string>(staff_word) + "s in-game: "_jrs;
else
msg += ", ";
@ -3478,7 +3477,7 @@ void ModsGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *, const Ju
}
}
if (msg.empty()) {
msg += "No "_jrs + staff_word + "s are in-game"_jrs;
msg += "No "s + staff_word + "s are in-game"_jrs;
RenX::GameCommand *cmd = source->getCommand(STRING_LITERAL_AS_REFERENCE("modrequest"));
if (cmd != nullptr)
msg.aformat("; please use \"%.*s%.*s\" if you require assistance.", source->getCommandPrefix().size(), source->getCommandPrefix().data(), cmd->getTrigger().size(), cmd->getTrigger().data());
@ -3638,7 +3637,7 @@ void PAdminMessageGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *p
message += split_parameters.second;
source->sendAdminMessage(*target, message);
source->sendMessage(*player, "Message sent to "_jrs + target->name);
source->sendMessage(*player, "Message sent to "s + target->name);
}
}
else {
@ -3667,7 +3666,7 @@ void KillGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, co
source->sendMessage(*player, "Error: Player not found."_jrs);
}
else if (target->access >= player->access) {
source->sendMessage(*player, "Error: You can not kill higher level "_jrs + pluginInstance.getStaffTitle() + "s."_jrs);
source->sendMessage(*player, "Error: You can not kill higher level "s + pluginInstance.getStaffTitle() + "s."_jrs);
}
else {
source->kill(*target);
@ -3698,7 +3697,7 @@ void DisarmGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player,
if (target == nullptr)
source->sendMessage(*player, "Error: Player not found."_jrs);
else if (target->access >= player->access)
source->sendMessage(*player, "Error: You can not disarm higher level "_jrs + pluginInstance.getStaffTitle() + "s."_jrs);
source->sendMessage(*player, "Error: You can not disarm higher level "s + pluginInstance.getStaffTitle() + "s."_jrs);
else if (source->disarm(*target) == false)
source->sendMessage(*player, "Error: Server does not support disarms."_jrs);
else
@ -3728,7 +3727,7 @@ void DisarmC4GameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player
if (target == nullptr)
source->sendMessage(*player, "Error: Player not found."_jrs);
else if (target->access >= player->access)
source->sendMessage(*player, "Error: You can not disarm higher level "_jrs + pluginInstance.getStaffTitle() + "s."_jrs);
source->sendMessage(*player, "Error: You can not disarm higher level "s + pluginInstance.getStaffTitle() + "s."_jrs);
else if (source->disarmC4(*target) == false)
source->sendMessage(*player, "Error: Server does not support disarms."_jrs);
else
@ -3760,7 +3759,7 @@ void DisarmBeaconGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *pl
if (target == nullptr)
source->sendMessage(*player, "Error: Player not found."_jrs);
else if (target->access >= player->access)
source->sendMessage(*player, "Error: You can not disarm higher level "_jrs + pluginInstance.getStaffTitle() + "s."_jrs);
source->sendMessage(*player, "Error: You can not disarm higher level "s + pluginInstance.getStaffTitle() + "s."_jrs);
else if (source->disarmBeacon(*target) == false)
source->sendMessage(*player, "Error: Server does not support disarms."_jrs);
else
@ -3791,7 +3790,7 @@ void MineBanGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player,
if (target == nullptr)
source->sendMessage(*player, "Error: Player not found."_jrs);
else if (target->access >= player->access)
source->sendMessage(*player, "Error: You can not mine-ban higher level "_jrs + pluginInstance.getStaffTitle() + "s."_jrs);
source->sendMessage(*player, "Error: You can not mine-ban higher level "s + pluginInstance.getStaffTitle() + "s."_jrs);
else
{
source->mineBan(*target);
@ -3834,7 +3833,7 @@ void KickGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, co
source->sendMessage(*player, "Error: You cannot kick yourself."_jrs);
}
else if (target->access >= player->access) {
source->sendMessage(*player, "Error: You can not kick higher level "_jrs + pluginInstance.getStaffTitle() + "s."_jrs);
source->sendMessage(*player, "Error: You can not kick higher level "s + pluginInstance.getStaffTitle() + "s."_jrs);
}
else
{
@ -3873,7 +3872,7 @@ void MuteGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, co
else if (player == target)
source->sendMessage(*player, "Error: You cannot mute yourself."_jrs);
else if (target->access >= player->access)
source->sendMessage(*player, "Error: You can not mute higher level "_jrs + pluginInstance.getStaffTitle() + "s."_jrs);
source->sendMessage(*player, "Error: You can not mute higher level "s + pluginInstance.getStaffTitle() + "s."_jrs);
else
{
source->mute(*target);
@ -3931,7 +3930,7 @@ void TempBanGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player,
else if (player == target)
source->sendMessage(*player, "Error: You can't ban yourself."_jrs);
else if (target->access >= player->access)
source->sendMessage(*player, "Error: You can't ban higher level "_jrs + pluginInstance.getStaffTitle() + "s."_jrs);
source->sendMessage(*player, "Error: You can't ban higher level "s + pluginInstance.getStaffTitle() + "s."_jrs);
else
{
source->banPlayer(*target, player->name, reason, duration);
@ -3989,7 +3988,7 @@ void TempChatBanGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *pla
else if (player == target)
source->sendMessage(*player, "Error: You can not ban yourself."_jrs);
else if (target->access >= player->access)
source->sendMessage(*player, "Error: You can not ban higher level "_jrs + pluginInstance.getStaffTitle() + "s."_jrs);
source->sendMessage(*player, "Error: You can not ban higher level "s + pluginInstance.getStaffTitle() + "s."_jrs);
else {
source->mute(*target);
RenX::banDatabase->add(source, *target, player->name, reason, duration, RenX::BanDatabase::Entry::FLAG_TYPE_CHAT);
@ -4032,7 +4031,7 @@ void KickBanGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player,
source->sendMessage(*player, "Error: You can not ban yourself."_jrs);
}
else if (target->access >= player->access) {
source->sendMessage(*player, "Error: You can not ban higher level "_jrs + pluginInstance.getStaffTitle() + "s."_jrs);
source->sendMessage(*player, "Error: You can not ban higher level "s + pluginInstance.getStaffTitle() + "s."_jrs);
}
else {
source->banPlayer(*target, player->name, reason);
@ -4143,8 +4142,8 @@ void PhaseBotsGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *playe
source->sendMessage(*player, STRING_LITERAL_AS_REFERENCE("Bot phasing has been enabled."));
else source->sendMessage(*player, STRING_LITERAL_AS_REFERENCE("Bot phasing has been disabled."));
}
else if (parameters.equalsi("true") || parameters.equalsi("on") || parameters.equalsi("start") || parameters.equalsi("1"))
{
else if (jessilib::equalsi(parameters, "true"sv) || jessilib::equalsi(parameters, "on"sv)
|| jessilib::equalsi(parameters, "start"sv) || jessilib::equalsi(parameters, "1"sv)) {
togglePhasing(source, true);
source->sendMessage(*player, STRING_LITERAL_AS_REFERENCE("Bot phasing has been enabled."));
}
@ -4247,15 +4246,15 @@ void CancelVoteGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *play
cancel_all = true;
}
else {
if (parameters.equalsi("all") || parameters.equalsi("a")) {
if (jessilib::equalsi(parameters, "all"sv) || jessilib::equalsi(parameters, "a"sv)) {
cancel_all = true;
} else if (parameters.equalsi("public") || parameters.equalsi("p")) {
} else if (jessilib::equalsi(parameters, "public"sv) || jessilib::equalsi(parameters, "p"sv)) {
target = RenX::TeamType::None;
} else if (parameters.equalsi("gdi") || parameters.equalsi("g")) {
} else if (jessilib::equalsi(parameters, "gdi"sv) || jessilib::equalsi(parameters, "g"sv)) {
target = RenX::TeamType::GDI;
} else if (parameters.equalsi("blackhand") || parameters.equalsi("bh") || parameters.equalsi("b")) {
} else if (jessilib::equalsi(parameters, "blackhand"sv) || jessilib::equalsi(parameters, "bh"sv) || jessilib::equalsi(parameters, "b"sv)) {
target = RenX::TeamType::GDI;
} else if (parameters.equalsi("nod") || parameters.equalsi("n")) {
} else if (jessilib::equalsi(parameters, "nod"sv) || jessilib::equalsi(parameters, "n"sv)) {
target = RenX::TeamType::Nod;
} else {
source->sendMessage(*player, STRING_LITERAL_AS_REFERENCE("Error: Invalid Team. Allowed values are all/a, public/p, gdi/g, nod/n, blackhand/bh/b."));

8
src/Plugins/RenX/RenX.Commands/RenX_Commands.h

@ -47,10 +47,10 @@ public:
private:
std::chrono::seconds m_defaultTempBanTime;
std::chrono::seconds m_maxTempBanTime;
Jupiter::StringS m_playerInfoFormat;
Jupiter::StringS m_adminPlayerInfoFormat;
Jupiter::StringS m_buildingInfoFormat;
Jupiter::StringS m_staffTitle;
std::string m_playerInfoFormat;
std::string m_adminPlayerInfoFormat;
std::string m_buildingInfoFormat;
std::string m_staffTitle;
};
GENERIC_CONSOLE_COMMAND(RawRCONConsoleCommand)

4
src/Plugins/RenX/RenX.Core/RenX_Plugin.cpp

@ -33,11 +33,11 @@ RenX::Plugin::~Plugin() {
}
}
void RenX::Plugin::RenX_SanitizeTags(Jupiter::StringType &) {
void RenX::Plugin::RenX_SanitizeTags(std::string&) {
return;
}
void RenX::Plugin::RenX_ProcessTags(Jupiter::StringType &, const Server *, const PlayerInfo *, const PlayerInfo *, const BuildingInfo *) {
void RenX::Plugin::RenX_ProcessTags(std::string&, const Server *, const PlayerInfo *, const PlayerInfo *, const BuildingInfo *) {
return;
}

4
src/Plugins/RenX/RenX.Core/RenX_Plugin.h

@ -42,8 +42,8 @@ namespace RenX
{
public:
/** Tag-related events */
virtual void RenX_SanitizeTags(Jupiter::StringType &fmt);
virtual void RenX_ProcessTags(Jupiter::StringType &msg, const Server *server, const PlayerInfo *player, const PlayerInfo *victim, const BuildingInfo *building);
virtual void RenX_SanitizeTags(std::string& fmt);
virtual void RenX_ProcessTags(std::string& msg, const Server *server, const PlayerInfo *player, const PlayerInfo *victim, const BuildingInfo *building);
/** Non-RCON RenX logs */
virtual void RenX_OnPlayerCreate(Server &server, const PlayerInfo &player);

43
src/Plugins/RenX/RenX.Core/RenX_Server.cpp

@ -166,7 +166,7 @@ int RenX::Server::think() {
int RenX::Server::OnRehash() {
std::string oldHostname = m_hostname;
std::string oldClientHostname = m_clientHostname;
Jupiter::StringS oldPass = m_pass;
std::string oldPass = m_pass;
unsigned short oldPort = m_port;
int oldSteamFormat = m_steamFormat;
m_commands.clear();
@ -177,10 +177,10 @@ int RenX::Server::OnRehash() {
m_pass = oldPass;
m_port = oldPort;
}
else if (Jupiter::ReferenceString(oldHostname.c_str()).equalsi(m_hostname) == false
else if (!jessilib::equalsi(oldHostname, m_hostname)
|| oldPort != m_port
|| Jupiter::ReferenceString(oldClientHostname.c_str()).equalsi(m_clientHostname) == false
|| oldPass.equalsi(m_pass) == false) {
|| !jessilib::equalsi(oldClientHostname, m_clientHostname)
|| !jessilib::equalsi(oldPass, m_pass)) {
reconnect(RenX::DisconnectReason::Rehash);
}
@ -260,7 +260,7 @@ bool RenX::Server::isPure() const {
}
int RenX::Server::send(const Jupiter::ReadableString &command) {
return sendSocket("c"_jrs + RenX::escapifyRCON(command) + '\n');
return sendSocket("c"s + RenX::escapifyRCON(command) + '\n');
}
int RenX::Server::sendSocket(const Jupiter::ReadableString &text) {
@ -283,23 +283,23 @@ int RenX::Server::sendMessage(std::string_view message) {
return result;
}
return sendSocket("chostsay "_jrs + msg + '\n');
return sendSocket("chostsay "s + msg + '\n');
}
int RenX::Server::sendMessage(const RenX::PlayerInfo &player, std::string_view message) {
return sendSocket("chostprivatesay pid"_jrs + Jupiter::StringS::Format("%d ", player.id) + RenX::escapifyRCON(message) + '\n');
return sendSocket("chostprivatesay pid"s + Jupiter::StringS::Format("%d ", player.id) + RenX::escapifyRCON(message) + '\n');
}
int RenX::Server::sendAdminMessage(const Jupiter::ReadableString &message) {
return sendSocket("camsg "_jrs + RenX::escapifyRCON(message) + '\n');
return sendSocket("camsg "s + RenX::escapifyRCON(message) + '\n');
}
int RenX::Server::sendAdminMessage(const RenX::PlayerInfo &player, std::string_view message) {
return sendSocket("cpamsg pid"_jrs + Jupiter::StringS::Format("%d ", player.id) + RenX::escapifyRCON(message) + '\n');
return sendSocket("cpamsg pid"s + Jupiter::StringS::Format("%d ", player.id) + RenX::escapifyRCON(message) + '\n');
}
int RenX::Server::sendWarnMessage(const RenX::PlayerInfo &player, std::string_view message) {
return sendSocket("cwarn pid"_jrs + Jupiter::StringS::Format("%d ", player.id) + RenX::escapifyRCON(message) + '\n');
return sendSocket("cwarn pid"s + Jupiter::StringS::Format("%d ", player.id) + RenX::escapifyRCON(message) + '\n');
}
int RenX::Server::sendData(const Jupiter::ReadableString &data) {
@ -927,13 +927,14 @@ bool RenX::Server::smodePlayer(const RenX::PlayerInfo &player) {
}
const Jupiter::ReadableString &RenX::Server::getPrefix() const {
static Jupiter::String parsed; // TODO: What the hell?
static std::string parsed; // TODO: What the hell?
RenX::processTags(parsed = m_IRCPrefix, this);
return parsed;
}
void RenX::Server::setPrefix(std::string_view prefix) {
Jupiter::StringS tagged_prefix = Jupiter::ReferenceString{ prefix };
// TODO: pass in std::string here instead
std::string tagged_prefix = static_cast<std::string>(prefix);
RenX::sanitizeTags(tagged_prefix);
m_IRCPrefix = tagged_prefix;
}
@ -1356,7 +1357,7 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line) {
};
auto tokens_as_command_table = [&tokens, this]() {
std::unordered_map<Jupiter::StringS, Jupiter::StringS, Jupiter::default_hash_function> table;
std::unordered_map<std::string_view, std::string_view, Jupiter::default_hash_function> table;
size_t total_tokens = std::min(tokens.size(), m_commandListFormat.size());
for (size_t index = 0; index != total_tokens; ++index) {
table[m_commandListFormat[index]] = tokens[index];
@ -1654,7 +1655,7 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line) {
steamid = Jupiter::from_string<uint64_t>(steamToken);
team = RenX::getTeam(teamToken);
if (adminToken.equalsi("None"_jrs))
if (jessilib::equalsi(adminToken, "None"_jrs))
getPlayerOrAdd(getToken(5), id, team, isBot, steamid, getToken(1), ""_jrs);
else
getPlayerOrAdd(getToken(5), id, team, isBot, steamid, getToken(1), ""_jrs)->adminType = adminToken;
@ -1674,7 +1675,7 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line) {
*/
auto table = tokens_as_command_table();
auto table_get = [&table](const Jupiter::ReadableString& in_key) -> Jupiter::StringS* {
auto table_get = [&table](const Jupiter::ReadableString& in_key) -> std::string_view* {
auto value = table.find(in_key);
if (value != table.end()) {
return &value->second;
@ -1843,7 +1844,7 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line) {
*/
auto table = tokens_as_command_table();
auto table_get = [&table](const Jupiter::ReadableString& in_key) -> Jupiter::StringS* {
auto table_get = [&table](const Jupiter::ReadableString& in_key) -> std::string_view* {
auto value = table.find(in_key);
if (value != table.end()) {
return &value->second;
@ -1961,7 +1962,7 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line) {
*/
auto table = tokens_as_command_table();
auto table_get = [&table](const Jupiter::ReadableString& in_key) -> Jupiter::StringS* {
auto table_get = [&table](const Jupiter::ReadableString& in_key) -> std::string_view* {
auto value = table.find(in_key);
if (value != table.end()) {
return &value->second;
@ -2071,13 +2072,13 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line) {
m_competitive = Jupiter::from_string<bool>(getToken(23));
const Jupiter::ReadableString &match_state_token = getToken(25);
if (match_state_token.equalsi("PendingMatch"_jrs))
if (jessilib::equalsi(match_state_token, "PendingMatch"_jrs))
m_match_state = 0;
else if (match_state_token.equalsi("MatchInProgress"_jrs))
else if (jessilib::equalsi(match_state_token, "MatchInProgress"_jrs))
m_match_state = 1;
else if (match_state_token.equalsi("RoundOver"_jrs) || match_state_token.equalsi("MatchOver"_jrs))
else if (jessilib::equalsi(match_state_token, "RoundOver"_jrs) || jessilib::equalsi(match_state_token, "MatchOver"_jrs))
m_match_state = 2;
else if (match_state_token.equalsi("TravelTheWorld"_jrs))
else if (jessilib::equalsi(match_state_token, "TravelTheWorld"_jrs))
m_match_state = 3;
else // Unknown state -- assume it's in progress
m_match_state = 1;

2
src/Plugins/RenX/RenX.Core/RenX_Server.h

@ -1143,7 +1143,7 @@ namespace RenX
std::chrono::milliseconds m_pingTimeoutThreshold;
std::string m_clientHostname;
std::string m_hostname;
Jupiter::StringS m_pass;
std::string m_pass;
std::string m_configSection;
Jupiter::StringS m_rules;
Jupiter::StringS m_ban_from_str;

374
src/Plugins/RenX/RenX.Core/RenX_Tags.cpp

@ -31,9 +31,9 @@ using namespace Jupiter::literals;
struct TagsImp : RenX::Tags
{
bool initialize();
void processTags(Jupiter::StringType &msg, const RenX::Server *server, const RenX::PlayerInfo *player, const RenX::PlayerInfo *victim, const RenX::BuildingInfo *building);
void processTags(Jupiter::StringType &msg, const RenX::LadderDatabase::Entry &entry);
void sanitizeTags(Jupiter::StringType &fmt);
void processTags(std::string& msg, const RenX::Server *server, const RenX::PlayerInfo *player, const RenX::PlayerInfo *victim, const RenX::BuildingInfo *building);
void processTags(std::string& msg, const RenX::LadderDatabase::Entry &entry);
void sanitizeTags(std::string& fmt);
const Jupiter::ReadableString &getUniqueInternalTag();
private:
Jupiter::StringS uniqueTag;
@ -443,7 +443,7 @@ double get_ratio(double num, double denom)
return num / denom;
}
void TagsImp::processTags(Jupiter::StringType &msg, const RenX::Server *server, const RenX::PlayerInfo *player, const RenX::PlayerInfo *victim, const RenX::BuildingInfo *building)
void TagsImp::processTags(std::string& msg, const RenX::Server *server, const RenX::PlayerInfo *player, const RenX::PlayerInfo *victim, const RenX::BuildingInfo *building)
{
size_t index;
PROCESS_TAG(this->INTERNAL_DATE_TAG, std::string_view(getTimeFormat(this->dateFmt.c_str())));
@ -586,7 +586,7 @@ void TagsImp::processTags(Jupiter::StringType &msg, const RenX::Server *server,
}
}
void TagsImp::processTags(Jupiter::StringType &msg, const RenX::LadderDatabase::Entry &entry)
void TagsImp::processTags(std::string& msg, const RenX::LadderDatabase::Entry &entry)
{
size_t index;
uint32_t total_tied_games = entry.total_wins - entry.total_gdi_wins - entry.total_nod_wins;
@ -681,191 +681,191 @@ void TagsImp::processTags(Jupiter::StringType &msg, const RenX::LadderDatabase::
PROCESS_TAG(this->INTERNAL_VICTIM_PROXY_DISARMS_TAG, Jupiter::StringS::Format("%u", entry.top_proxy_disarms));
}
void TagsImp::sanitizeTags(Jupiter::StringType &fmt)
void TagsImp::sanitizeTags(std::string& fmt)
{
/** Global tags */
fmt.replace(this->dateTag, this->INTERNAL_DATE_TAG);
fmt.replace(this->timeTag, this->INTERNAL_TIME_TAG);
RenX::replace_tag(fmt, this->dateTag, this->INTERNAL_DATE_TAG);
RenX::replace_tag(fmt, this->timeTag, this->INTERNAL_TIME_TAG);
/** Server tags */
fmt.replace(this->rconVersionTag, this->INTERNAL_RCON_VERSION_TAG);
fmt.replace(this->gameVersionTag, this->INTERNAL_GAME_VERSION_TAG);
fmt.replace(this->rulesTag, this->INTERNAL_RULES_TAG);
fmt.replace(this->userTag, this->INTERNAL_USER_TAG);
fmt.replace(this->serverNameTag, this->INTERNAL_SERVER_NAME_TAG);
fmt.replace(this->mapTag, this->INTERNAL_MAP_TAG);
fmt.replace(this->mapGUIDTag, this->INTERNAL_MAP_GUID_TAG);
fmt.replace(this->serverHostnameTag, this->INTERNAL_SERVER_HOSTNAME_TAG);
fmt.replace(this->serverPortTag, this->INTERNAL_SERVER_PORT_TAG);
fmt.replace(this->socketHostnameTag, this->INTERNAL_SOCKET_HOSTNAME_TAG);
fmt.replace(this->socketPortTag, this->INTERNAL_SOCKET_PORT_TAG);
fmt.replace(this->serverPrefixTag, this->INTERNAL_SERVER_PREFIX_TAG);
RenX::replace_tag(fmt, this->rconVersionTag, this->INTERNAL_RCON_VERSION_TAG);
RenX::replace_tag(fmt, this->gameVersionTag, this->INTERNAL_GAME_VERSION_TAG);
RenX::replace_tag(fmt, this->rulesTag, this->INTERNAL_RULES_TAG);
RenX::replace_tag(fmt, this->userTag, this->INTERNAL_USER_TAG);
RenX::replace_tag(fmt, this->serverNameTag, this->INTERNAL_SERVER_NAME_TAG);
RenX::replace_tag(fmt, this->mapTag, this->INTERNAL_MAP_TAG);
RenX::replace_tag(fmt, this->mapGUIDTag, this->INTERNAL_MAP_GUID_TAG);
RenX::replace_tag(fmt, this->serverHostnameTag, this->INTERNAL_SERVER_HOSTNAME_TAG);
RenX::replace_tag(fmt, this->serverPortTag, this->INTERNAL_SERVER_PORT_TAG);
RenX::replace_tag(fmt, this->socketHostnameTag, this->INTERNAL_SOCKET_HOSTNAME_TAG);
RenX::replace_tag(fmt, this->socketPortTag, this->INTERNAL_SOCKET_PORT_TAG);
RenX::replace_tag(fmt, this->serverPrefixTag, this->INTERNAL_SERVER_PREFIX_TAG);
/** Player tags */
fmt.replace(this->nameTag, this->INTERNAL_NAME_TAG);
fmt.replace(this->rawNameTag, this->INTERNAL_RAW_NAME_TAG);
fmt.replace(this->ipTag, this->INTERNAL_IP_TAG);
fmt.replace(this->hwidTag, this->INTERNAL_HWID_TAG);
fmt.replace(this->rdnsTag, this->INTERNAL_RDNS_TAG);
fmt.replace(this->steamTag, this->INTERNAL_STEAM_TAG);
fmt.replace(this->uuidTag, this->INTERNAL_UUID_TAG);
fmt.replace(this->idTag, this->INTERNAL_ID_TAG);
fmt.replace(this->characterTag, this->INTERNAL_CHARACTER_TAG);
fmt.replace(this->vehicleTag, this->INTERNAL_VEHICLE_TAG);
fmt.replace(this->adminTag, this->INTERNAL_ADMIN_TAG);
fmt.replace(this->prefixTag, this->INTERNAL_PREFIX_TAG);
fmt.replace(this->gamePrefixTag, this->INTERNAL_GAME_PREFIX_TAG);
fmt.replace(this->teamColorTag, this->INTERNAL_TEAM_COLOR_TAG);
fmt.replace(this->teamShortTag, this->INTERNAL_TEAM_SHORT_TAG);
fmt.replace(this->teamLongTag, this->INTERNAL_TEAM_LONG_TAG);
fmt.replace(this->pingTag, this->INTERNAL_PING_TAG);
fmt.replace(this->scoreTag, this->INTERNAL_SCORE_TAG);
fmt.replace(this->scorePerMinuteTag, this->INTERNAL_SCORE_PER_MINUTE_TAG);
fmt.replace(this->creditsTag, this->INTERNAL_CREDITS_TAG);
fmt.replace(this->killsTag, this->INTERNAL_KILLS_TAG);
fmt.replace(this->deathsTag, this->INTERNAL_DEATHS_TAG);
fmt.replace(this->kdrTag, this->INTERNAL_KDR_TAG);
fmt.replace(this->suicidesTag, this->INTERNAL_SUICIDES_TAG);
fmt.replace(this->headshotsTag, this->INTERNAL_HEADSHOTS_TAG);
fmt.replace(this->headshotKillRatioTag, this->INTERNAL_HEADSHOT_KILL_RATIO_TAG);
fmt.replace(this->vehicleKillsTag, this->INTERNAL_VEHICLE_KILLS_TAG);
fmt.replace(this->buildingKillsTag, this->INTERNAL_BUILDING_KILLS_TAG);
fmt.replace(this->defenceKillsTag, this->INTERNAL_DEFENCE_KILLS_TAG);
fmt.replace(this->gameTimeTag, this->INTERNAL_GAME_TIME_TAG);
fmt.replace(this->gamesTag, this->INTERNAL_GAMES_TAG);
fmt.replace(this->GDIGamesTag, this->INTERNAL_GDI_GAMES_TAG);
fmt.replace(this->NodGamesTag, this->INTERNAL_NOD_GAMES_TAG);
fmt.replace(this->winsTag, this->INTERNAL_WINS_TAG);
fmt.replace(this->GDIWinsTag, this->INTERNAL_GDI_WINS_TAG);
fmt.replace(this->NodWinsTag, this->INTERNAL_NOD_WINS_TAG);
fmt.replace(this->tiesTag, this->INTERNAL_TIES_TAG);
fmt.replace(this->lossesTag, this->INTERNAL_LOSSES_TAG);
fmt.replace(this->GDILossesTag, this->INTERNAL_GDI_LOSSES_TAG);
fmt.replace(this->NodLossesTag, this->INTERNAL_NOD_LOSSES_TAG);
fmt.replace(this->winLossRatioTag, this->INTERNAL_WIN_LOSS_RATIO_TAG);
fmt.replace(this->GDIWinLossRatioTag, this->INTERNAL_GDI_WIN_LOSS_RATIO_TAG);
fmt.replace(this->NodWinLossRatioTag, this->INTERNAL_NOD_WIN_LOSS_RATIO_TAG);
fmt.replace(this->beaconPlacementsTag, this->INTERNAL_BEACON_PLACEMENTS_TAG);
fmt.replace(this->beaconDisarmsTag, this->INTERNAL_BEACON_DISARMS_TAG);
fmt.replace(this->proxyPlacementsTag, this->INTERNAL_PROXY_PLACEMENTS_TAG);
fmt.replace(this->proxyDisarmsTag, this->INTERNAL_PROXY_DISARMS_TAG);
fmt.replace(this->capturesTag, this->INTERNAL_CAPTURES_TAG);
fmt.replace(this->stealsTag, this->INTERNAL_STEALS_TAG);
fmt.replace(this->stolenTag, this->INTERNAL_STOLEN_TAG);
fmt.replace(this->accessTag, this->INTERNAL_ACCESS_TAG);
RenX::replace_tag(fmt, this->nameTag, this->INTERNAL_NAME_TAG);
RenX::replace_tag(fmt, this->rawNameTag, this->INTERNAL_RAW_NAME_TAG);
RenX::replace_tag(fmt, this->ipTag, this->INTERNAL_IP_TAG);
RenX::replace_tag(fmt, this->hwidTag, this->INTERNAL_HWID_TAG);
RenX::replace_tag(fmt, this->rdnsTag, this->INTERNAL_RDNS_TAG);
RenX::replace_tag(fmt, this->steamTag, this->INTERNAL_STEAM_TAG);
RenX::replace_tag(fmt, this->uuidTag, this->INTERNAL_UUID_TAG);
RenX::replace_tag(fmt, this->idTag, this->INTERNAL_ID_TAG);
RenX::replace_tag(fmt, this->characterTag, this->INTERNAL_CHARACTER_TAG);
RenX::replace_tag(fmt, this->vehicleTag, this->INTERNAL_VEHICLE_TAG);
RenX::replace_tag(fmt, this->adminTag, this->INTERNAL_ADMIN_TAG);
RenX::replace_tag(fmt, this->prefixTag, this->INTERNAL_PREFIX_TAG);
RenX::replace_tag(fmt, this->gamePrefixTag, this->INTERNAL_GAME_PREFIX_TAG);
RenX::replace_tag(fmt, this->teamColorTag, this->INTERNAL_TEAM_COLOR_TAG);
RenX::replace_tag(fmt, this->teamShortTag, this->INTERNAL_TEAM_SHORT_TAG);
RenX::replace_tag(fmt, this->teamLongTag, this->INTERNAL_TEAM_LONG_TAG);
RenX::replace_tag(fmt, this->pingTag, this->INTERNAL_PING_TAG);
RenX::replace_tag(fmt, this->scoreTag, this->INTERNAL_SCORE_TAG);
RenX::replace_tag(fmt, this->scorePerMinuteTag, this->INTERNAL_SCORE_PER_MINUTE_TAG);
RenX::replace_tag(fmt, this->creditsTag, this->INTERNAL_CREDITS_TAG);
RenX::replace_tag(fmt, this->killsTag, this->INTERNAL_KILLS_TAG);
RenX::replace_tag(fmt, this->deathsTag, this->INTERNAL_DEATHS_TAG);
RenX::replace_tag(fmt, this->kdrTag, this->INTERNAL_KDR_TAG);
RenX::replace_tag(fmt, this->suicidesTag, this->INTERNAL_SUICIDES_TAG);
RenX::replace_tag(fmt, this->headshotsTag, this->INTERNAL_HEADSHOTS_TAG);
RenX::replace_tag(fmt, this->headshotKillRatioTag, this->INTERNAL_HEADSHOT_KILL_RATIO_TAG);
RenX::replace_tag(fmt, this->vehicleKillsTag, this->INTERNAL_VEHICLE_KILLS_TAG);
RenX::replace_tag(fmt, this->buildingKillsTag, this->INTERNAL_BUILDING_KILLS_TAG);
RenX::replace_tag(fmt, this->defenceKillsTag, this->INTERNAL_DEFENCE_KILLS_TAG);
RenX::replace_tag(fmt, this->gameTimeTag, this->INTERNAL_GAME_TIME_TAG);
RenX::replace_tag(fmt, this->gamesTag, this->INTERNAL_GAMES_TAG);
RenX::replace_tag(fmt, this->GDIGamesTag, this->INTERNAL_GDI_GAMES_TAG);
RenX::replace_tag(fmt, this->NodGamesTag, this->INTERNAL_NOD_GAMES_TAG);
RenX::replace_tag(fmt, this->winsTag, this->INTERNAL_WINS_TAG);
RenX::replace_tag(fmt, this->GDIWinsTag, this->INTERNAL_GDI_WINS_TAG);
RenX::replace_tag(fmt, this->NodWinsTag, this->INTERNAL_NOD_WINS_TAG);
RenX::replace_tag(fmt, this->tiesTag, this->INTERNAL_TIES_TAG);
RenX::replace_tag(fmt, this->lossesTag, this->INTERNAL_LOSSES_TAG);
RenX::replace_tag(fmt, this->GDILossesTag, this->INTERNAL_GDI_LOSSES_TAG);
RenX::replace_tag(fmt, this->NodLossesTag, this->INTERNAL_NOD_LOSSES_TAG);
RenX::replace_tag(fmt, this->winLossRatioTag, this->INTERNAL_WIN_LOSS_RATIO_TAG);
RenX::replace_tag(fmt, this->GDIWinLossRatioTag, this->INTERNAL_GDI_WIN_LOSS_RATIO_TAG);
RenX::replace_tag(fmt, this->NodWinLossRatioTag, this->INTERNAL_NOD_WIN_LOSS_RATIO_TAG);
RenX::replace_tag(fmt, this->beaconPlacementsTag, this->INTERNAL_BEACON_PLACEMENTS_TAG);
RenX::replace_tag(fmt, this->beaconDisarmsTag, this->INTERNAL_BEACON_DISARMS_TAG);
RenX::replace_tag(fmt, this->proxyPlacementsTag, this->INTERNAL_PROXY_PLACEMENTS_TAG);
RenX::replace_tag(fmt, this->proxyDisarmsTag, this->INTERNAL_PROXY_DISARMS_TAG);
RenX::replace_tag(fmt, this->capturesTag, this->INTERNAL_CAPTURES_TAG);
RenX::replace_tag(fmt, this->stealsTag, this->INTERNAL_STEALS_TAG);
RenX::replace_tag(fmt, this->stolenTag, this->INTERNAL_STOLEN_TAG);
RenX::replace_tag(fmt, this->accessTag, this->INTERNAL_ACCESS_TAG);
/** Victim tags */
fmt.replace(this->victimNameTag, this->INTERNAL_VICTIM_NAME_TAG);
fmt.replace(this->victimRawNameTag, this->INTERNAL_VICTIM_RAW_NAME_TAG);
fmt.replace(this->victimIPTag, this->INTERNAL_VICTIM_IP_TAG);
fmt.replace(this->victimHWIDTag, this->INTERNAL_VICTIM_HWID_TAG);
fmt.replace(this->victimRDNSTag, this->INTERNAL_VICTIM_RDNS_TAG);
fmt.replace(this->victimSteamTag, this->INTERNAL_VICTIM_STEAM_TAG);
fmt.replace(this->victimUUIDTag, this->INTERNAL_VICTIM_UUID_TAG);
fmt.replace(this->victimIDTag, this->INTERNAL_VICTIM_ID_TAG);
fmt.replace(this->victimCharacterTag, this->INTERNAL_VICTIM_CHARACTER_TAG);
fmt.replace(this->victimVehicleTag, this->INTERNAL_VICTIM_VEHICLE_TAG);
fmt.replace(this->victimAdminTag, this->INTERNAL_VICTIM_ADMIN_TAG);
fmt.replace(this->victimPrefixTag, this->INTERNAL_VICTIM_PREFIX_TAG);
fmt.replace(this->victimGamePrefixTag, this->INTERNAL_VICTIM_GAME_PREFIX_TAG);
fmt.replace(this->victimTeamColorTag, this->INTERNAL_VICTIM_TEAM_COLOR_TAG);
fmt.replace(this->victimTeamShortTag, this->INTERNAL_VICTIM_TEAM_SHORT_TAG);
fmt.replace(this->victimTeamLongTag, this->INTERNAL_VICTIM_TEAM_LONG_TAG);
fmt.replace(this->victimPingTag, this->INTERNAL_VICTIM_PING_TAG);
fmt.replace(this->victimScoreTag, this->INTERNAL_VICTIM_SCORE_TAG);
fmt.replace(this->victimScorePerMinuteTag, this->INTERNAL_VICTIM_SCORE_PER_MINUTE_TAG);
fmt.replace(this->victimCreditsTag, this->INTERNAL_VICTIM_CREDITS_TAG);
fmt.replace(this->victimKillsTag, this->INTERNAL_VICTIM_KILLS_TAG);
fmt.replace(this->victimDeathsTag, this->INTERNAL_VICTIM_DEATHS_TAG);
fmt.replace(this->victimKDRTag, this->INTERNAL_VICTIM_KDR_TAG);
fmt.replace(this->victimSuicidesTag, this->INTERNAL_VICTIM_SUICIDES_TAG);
fmt.replace(this->victimHeadshotsTag, this->INTERNAL_VICTIM_HEADSHOTS_TAG);
fmt.replace(this->victimHeadshotKillRatioTag, this->INTERNAL_VICTIM_HEADSHOT_KILL_RATIO_TAG);
fmt.replace(this->victimVehicleKillsTag, this->INTERNAL_VICTIM_VEHICLE_KILLS_TAG);
fmt.replace(this->victimBuildingKillsTag, this->INTERNAL_VICTIM_BUILDING_KILLS_TAG);
fmt.replace(this->victimDefenceKillsTag, this->INTERNAL_VICTIM_DEFENCE_KILLS_TAG);
fmt.replace(this->victimGameTimeTag, this->INTERNAL_VICTIM_GAME_TIME_TAG);
fmt.replace(this->victimGamesTag, this->INTERNAL_VICTIM_GAMES_TAG);
fmt.replace(this->victimGDIGamesTag, this->INTERNAL_VICTIM_GDI_GAMES_TAG);
fmt.replace(this->victimNodGamesTag, this->INTERNAL_VICTIM_NOD_GAMES_TAG);
fmt.replace(this->victimWinsTag, this->INTERNAL_VICTIM_WINS_TAG);
fmt.replace(this->victimGDIWinsTag, this->INTERNAL_VICTIM_GDI_WINS_TAG);
fmt.replace(this->victimNodWinsTag, this->INTERNAL_VICTIM_NOD_WINS_TAG);
fmt.replace(this->victimTiesTag, this->INTERNAL_VICTIM_TIES_TAG);
fmt.replace(this->victimLossesTag, this->INTERNAL_VICTIM_LOSSES_TAG);
fmt.replace(this->victimGDILossesTag, this->INTERNAL_VICTIM_GDI_LOSSES_TAG);
fmt.replace(this->victimNodLossesTag, this->INTERNAL_VICTIM_NOD_LOSSES_TAG);
fmt.replace(this->victimWinLossRatioTag, this->INTERNAL_VICTIM_WIN_LOSS_RATIO_TAG);
fmt.replace(this->victimGDIWinLossRatioTag, this->INTERNAL_VICTIM_GDI_WIN_LOSS_RATIO_TAG);
fmt.replace(this->victimNodWinLossRatioTag, this->INTERNAL_VICTIM_NOD_WIN_LOSS_RATIO_TAG);
fmt.replace(this->victimBeaconPlacementsTag, this->INTERNAL_VICTIM_BEACON_PLACEMENTS_TAG);
fmt.replace(this->victimBeaconDisarmsTag, this->INTERNAL_VICTIM_BEACON_DISARMS_TAG);
fmt.replace(this->victimProxyPlacementsTag, this->INTERNAL_VICTIM_PROXY_PLACEMENTS_TAG);
fmt.replace(this->victimProxyDisarmsTag, this->INTERNAL_VICTIM_PROXY_DISARMS_TAG);
fmt.replace(this->victimCapturesTag, this->INTERNAL_VICTIM_CAPTURES_TAG);
fmt.replace(this->victimStealsTag, this->INTERNAL_VICTIM_STEALS_TAG);
fmt.replace(this->victimStolenTag, this->INTERNAL_VICTIM_STOLEN_TAG);
fmt.replace(this->victimAccessTag, this->INTERNAL_VICTIM_ACCESS_TAG);
RenX::replace_tag(fmt, this->victimNameTag, this->INTERNAL_VICTIM_NAME_TAG);
RenX::replace_tag(fmt, this->victimRawNameTag, this->INTERNAL_VICTIM_RAW_NAME_TAG);
RenX::replace_tag(fmt, this->victimIPTag, this->INTERNAL_VICTIM_IP_TAG);
RenX::replace_tag(fmt, this->victimHWIDTag, this->INTERNAL_VICTIM_HWID_TAG);
RenX::replace_tag(fmt, this->victimRDNSTag, this->INTERNAL_VICTIM_RDNS_TAG);
RenX::replace_tag(fmt, this->victimSteamTag, this->INTERNAL_VICTIM_STEAM_TAG);
RenX::replace_tag(fmt, this->victimUUIDTag, this->INTERNAL_VICTIM_UUID_TAG);
RenX::replace_tag(fmt, this->victimIDTag, this->INTERNAL_VICTIM_ID_TAG);
RenX::replace_tag(fmt, this->victimCharacterTag, this->INTERNAL_VICTIM_CHARACTER_TAG);
RenX::replace_tag(fmt, this->victimVehicleTag, this->INTERNAL_VICTIM_VEHICLE_TAG);
RenX::replace_tag(fmt, this->victimAdminTag, this->INTERNAL_VICTIM_ADMIN_TAG);
RenX::replace_tag(fmt, this->victimPrefixTag, this->INTERNAL_VICTIM_PREFIX_TAG);
RenX::replace_tag(fmt, this->victimGamePrefixTag, this->INTERNAL_VICTIM_GAME_PREFIX_TAG);
RenX::replace_tag(fmt, this->victimTeamColorTag, this->INTERNAL_VICTIM_TEAM_COLOR_TAG);
RenX::replace_tag(fmt, this->victimTeamShortTag, this->INTERNAL_VICTIM_TEAM_SHORT_TAG);
RenX::replace_tag(fmt, this->victimTeamLongTag, this->INTERNAL_VICTIM_TEAM_LONG_TAG);
RenX::replace_tag(fmt, this->victimPingTag, this->INTERNAL_VICTIM_PING_TAG);
RenX::replace_tag(fmt, this->victimScoreTag, this->INTERNAL_VICTIM_SCORE_TAG);
RenX::replace_tag(fmt, this->victimScorePerMinuteTag, this->INTERNAL_VICTIM_SCORE_PER_MINUTE_TAG);
RenX::replace_tag(fmt, this->victimCreditsTag, this->INTERNAL_VICTIM_CREDITS_TAG);
RenX::replace_tag(fmt, this->victimKillsTag, this->INTERNAL_VICTIM_KILLS_TAG);
RenX::replace_tag(fmt, this->victimDeathsTag, this->INTERNAL_VICTIM_DEATHS_TAG);
RenX::replace_tag(fmt, this->victimKDRTag, this->INTERNAL_VICTIM_KDR_TAG);
RenX::replace_tag(fmt, this->victimSuicidesTag, this->INTERNAL_VICTIM_SUICIDES_TAG);
RenX::replace_tag(fmt, this->victimHeadshotsTag, this->INTERNAL_VICTIM_HEADSHOTS_TAG);
RenX::replace_tag(fmt, this->victimHeadshotKillRatioTag, this->INTERNAL_VICTIM_HEADSHOT_KILL_RATIO_TAG);
RenX::replace_tag(fmt, this->victimVehicleKillsTag, this->INTERNAL_VICTIM_VEHICLE_KILLS_TAG);
RenX::replace_tag(fmt, this->victimBuildingKillsTag, this->INTERNAL_VICTIM_BUILDING_KILLS_TAG);
RenX::replace_tag(fmt, this->victimDefenceKillsTag, this->INTERNAL_VICTIM_DEFENCE_KILLS_TAG);
RenX::replace_tag(fmt, this->victimGameTimeTag, this->INTERNAL_VICTIM_GAME_TIME_TAG);
RenX::replace_tag(fmt, this->victimGamesTag, this->INTERNAL_VICTIM_GAMES_TAG);
RenX::replace_tag(fmt, this->victimGDIGamesTag, this->INTERNAL_VICTIM_GDI_GAMES_TAG);
RenX::replace_tag(fmt, this->victimNodGamesTag, this->INTERNAL_VICTIM_NOD_GAMES_TAG);
RenX::replace_tag(fmt, this->victimWinsTag, this->INTERNAL_VICTIM_WINS_TAG);
RenX::replace_tag(fmt, this->victimGDIWinsTag, this->INTERNAL_VICTIM_GDI_WINS_TAG);
RenX::replace_tag(fmt, this->victimNodWinsTag, this->INTERNAL_VICTIM_NOD_WINS_TAG);
RenX::replace_tag(fmt, this->victimTiesTag, this->INTERNAL_VICTIM_TIES_TAG);
RenX::replace_tag(fmt, this->victimLossesTag, this->INTERNAL_VICTIM_LOSSES_TAG);
RenX::replace_tag(fmt, this->victimGDILossesTag, this->INTERNAL_VICTIM_GDI_LOSSES_TAG);
RenX::replace_tag(fmt, this->victimNodLossesTag, this->INTERNAL_VICTIM_NOD_LOSSES_TAG);
RenX::replace_tag(fmt, this->victimWinLossRatioTag, this->INTERNAL_VICTIM_WIN_LOSS_RATIO_TAG);
RenX::replace_tag(fmt, this->victimGDIWinLossRatioTag, this->INTERNAL_VICTIM_GDI_WIN_LOSS_RATIO_TAG);
RenX::replace_tag(fmt, this->victimNodWinLossRatioTag, this->INTERNAL_VICTIM_NOD_WIN_LOSS_RATIO_TAG);
RenX::replace_tag(fmt, this->victimBeaconPlacementsTag, this->INTERNAL_VICTIM_BEACON_PLACEMENTS_TAG);
RenX::replace_tag(fmt, this->victimBeaconDisarmsTag, this->INTERNAL_VICTIM_BEACON_DISARMS_TAG);
RenX::replace_tag(fmt, this->victimProxyPlacementsTag, this->INTERNAL_VICTIM_PROXY_PLACEMENTS_TAG);
RenX::replace_tag(fmt, this->victimProxyDisarmsTag, this->INTERNAL_VICTIM_PROXY_DISARMS_TAG);
RenX::replace_tag(fmt, this->victimCapturesTag, this->INTERNAL_VICTIM_CAPTURES_TAG);
RenX::replace_tag(fmt, this->victimStealsTag, this->INTERNAL_VICTIM_STEALS_TAG);
RenX::replace_tag(fmt, this->victimStolenTag, this->INTERNAL_VICTIM_STOLEN_TAG);
RenX::replace_tag(fmt, this->victimAccessTag, this->INTERNAL_VICTIM_ACCESS_TAG);
/** Building tags */
fmt.replace(this->buildingNameTag, this->INTERNAL_BUILDING_NAME_TAG);
fmt.replace(this->buildingRawNameTag, this->INTERNAL_BUILDING_RAW_NAME_TAG);
fmt.replace(this->buildingHealthTag, this->INTERNAL_BUILDING_HEALTH_TAG);
fmt.replace(this->buildingMaxHealthTag, this->INTERNAL_BUILDING_MAX_HEALTH_TAG);
fmt.replace(this->buildingHealthPercentageTag, this->INTERNAL_BUILDING_HEALTH_PERCENTAGE_TAG);
fmt.replace(this->buildingArmorTag, this->INTERNAL_BUILDING_ARMOR_TAG);
fmt.replace(this->buildingMaxArmorTag, this->INTERNAL_BUILDING_MAX_ARMOR_TAG);
fmt.replace(this->buildingArmorPercentageTag, this->INTERNAL_BUILDING_ARMOR_PERCENTAGE_TAG);
fmt.replace(this->buildingDurabilityTag, this->INTERNAL_BUILDING_DURABILITY_TAG);
fmt.replace(this->buildingMaxDurabilityTag, this->INTERNAL_BUILDING_MAX_DURABILITY_TAG);
fmt.replace(this->buildingDurabilityPercentageTag, this->INTERNAL_BUILDING_DURABILITY_PERCENTAGE_TAG);
fmt.replace(this->buildingTeamColorTag, this->INTERNAL_BUILDING_TEAM_COLOR_TAG);
fmt.replace(this->buildingTeamShortTag, this->INTERNAL_BUILDING_TEAM_SHORT_TAG);
fmt.replace(this->buildingTeamLongTag, this->INTERNAL_BUILDING_TEAM_LONG_TAG);
RenX::replace_tag(fmt, this->buildingNameTag, this->INTERNAL_BUILDING_NAME_TAG);
RenX::replace_tag(fmt, this->buildingRawNameTag, this->INTERNAL_BUILDING_RAW_NAME_TAG);
RenX::replace_tag(fmt, this->buildingHealthTag, this->INTERNAL_BUILDING_HEALTH_TAG);
RenX::replace_tag(fmt, this->buildingMaxHealthTag, this->INTERNAL_BUILDING_MAX_HEALTH_TAG);
RenX::replace_tag(fmt, this->buildingHealthPercentageTag, this->INTERNAL_BUILDING_HEALTH_PERCENTAGE_TAG);
RenX::replace_tag(fmt, this->buildingArmorTag, this->INTERNAL_BUILDING_ARMOR_TAG);
RenX::replace_tag(fmt, this->buildingMaxArmorTag, this->INTERNAL_BUILDING_MAX_ARMOR_TAG);
RenX::replace_tag(fmt, this->buildingArmorPercentageTag, this->INTERNAL_BUILDING_ARMOR_PERCENTAGE_TAG);
RenX::replace_tag(fmt, this->buildingDurabilityTag, this->INTERNAL_BUILDING_DURABILITY_TAG);
RenX::replace_tag(fmt, this->buildingMaxDurabilityTag, this->INTERNAL_BUILDING_MAX_DURABILITY_TAG);
RenX::replace_tag(fmt, this->buildingDurabilityPercentageTag, this->INTERNAL_BUILDING_DURABILITY_PERCENTAGE_TAG);
RenX::replace_tag(fmt, this->buildingTeamColorTag, this->INTERNAL_BUILDING_TEAM_COLOR_TAG);
RenX::replace_tag(fmt, this->buildingTeamShortTag, this->INTERNAL_BUILDING_TEAM_SHORT_TAG);
RenX::replace_tag(fmt, this->buildingTeamLongTag, this->INTERNAL_BUILDING_TEAM_LONG_TAG);
/** Ladder tags */
fmt.replace(this->rankTag, this->INTERNAL_RANK_TAG);
fmt.replace(this->lastGameTag, this->INTERNAL_LAST_GAME_TAG);
fmt.replace(this->GDIScoreTag, this->INTERNAL_GDI_SCORE_TAG);
fmt.replace(this->GDISPMTag, this->INTERNAL_GDI_SPM_TAG);
fmt.replace(this->GDIGameTimeTag, this->INTERNAL_GDI_GAME_TIME_TAG);
fmt.replace(this->GDITiesTag, this->INTERNAL_GDI_TIES_TAG);
fmt.replace(this->GDIBeaconPlacementsTag, this->INTERNAL_GDI_BEACON_PLACEMENTS_TAG);
fmt.replace(this->GDIBeaconDisarmsTag, this->INTERNAL_GDI_BEACON_DISARMS_TAG);
fmt.replace(this->GDIProxyPlacementsTag, this->INTERNAL_GDI_PROXY_PLACEMENTS_TAG);
fmt.replace(this->GDIProxyDisarmsTag, this->INTERNAL_GDI_PROXY_DISARMS_TAG);
fmt.replace(this->GDIKillsTag, this->INTERNAL_GDI_KILLS_TAG);
fmt.replace(this->GDIDeathsTag, this->INTERNAL_GDI_DEATHS_TAG);
fmt.replace(this->GDIVehicleKillsTag, this->INTERNAL_GDI_VEHICLE_KILLS_TAG);
fmt.replace(this->GDIDefenceKillsTag, this->INTERNAL_GDI_DEFENCE_KILLS_TAG);
fmt.replace(this->GDIBuildingKillsTag, this->INTERNAL_GDI_BUILDING_KILLS_TAG);
fmt.replace(this->GDIKDRTag, this->INTERNAL_GDI_KDR_TAG);
fmt.replace(this->GDIHeadshotsTag, this->INTERNAL_GDI_HEADSHOTS_TAG);
fmt.replace(this->GDIHeadshotKillRatioTag, this->INTERNAL_GDI_HEADSHOT_KILL_RATIO_TAG);
fmt.replace(this->NodScoreTag, this->INTERNAL_NOD_SCORE_TAG);
fmt.replace(this->NodSPMTag, this->INTERNAL_NOD_SPM_TAG);
fmt.replace(this->NodGameTimeTag, this->INTERNAL_NOD_GAME_TIME_TAG);
fmt.replace(this->NodTiesTag, this->INTERNAL_NOD_TIES_TAG);
fmt.replace(this->NodBeaconPlacementsTag, this->INTERNAL_NOD_BEACON_PLACEMENTS_TAG);
fmt.replace(this->NodBeaconDisarmsTag, this->INTERNAL_NOD_BEACON_DISARMS_TAG);
fmt.replace(this->NodProxyPlacementsTag, this->INTERNAL_NOD_PROXY_PLACEMENTS_TAG);
fmt.replace(this->NodProxyDisarmsTag, this->INTERNAL_NOD_PROXY_DISARMS_TAG);
fmt.replace(this->NodKillsTag, this->INTERNAL_NOD_KILLS_TAG);
fmt.replace(this->NodDeathsTag, this->INTERNAL_NOD_DEATHS_TAG);
fmt.replace(this->NodVehicleKillsTag, this->INTERNAL_NOD_VEHICLE_KILLS_TAG);
fmt.replace(this->NodDefenceKillsTag, this->INTERNAL_NOD_DEFENCE_KILLS_TAG);
fmt.replace(this->NodBuildingKillsTag, this->INTERNAL_NOD_BUILDING_KILLS_TAG);
fmt.replace(this->NodKDRTag, this->INTERNAL_NOD_KDR_TAG);
fmt.replace(this->NodHeadshotsTag, this->INTERNAL_NOD_HEADSHOTS_TAG);
fmt.replace(this->NodHeadshotKillRatioTag, this->INTERNAL_NOD_HEADSHOT_KILL_RATIO_TAG);
RenX::replace_tag(fmt, this->rankTag, this->INTERNAL_RANK_TAG);
RenX::replace_tag(fmt, this->lastGameTag, this->INTERNAL_LAST_GAME_TAG);
RenX::replace_tag(fmt, this->GDIScoreTag, this->INTERNAL_GDI_SCORE_TAG);
RenX::replace_tag(fmt, this->GDISPMTag, this->INTERNAL_GDI_SPM_TAG);
RenX::replace_tag(fmt, this->GDIGameTimeTag, this->INTERNAL_GDI_GAME_TIME_TAG);
RenX::replace_tag(fmt, this->GDITiesTag, this->INTERNAL_GDI_TIES_TAG);
RenX::replace_tag(fmt, this->GDIBeaconPlacementsTag, this->INTERNAL_GDI_BEACON_PLACEMENTS_TAG);
RenX::replace_tag(fmt, this->GDIBeaconDisarmsTag, this->INTERNAL_GDI_BEACON_DISARMS_TAG);
RenX::replace_tag(fmt, this->GDIProxyPlacementsTag, this->INTERNAL_GDI_PROXY_PLACEMENTS_TAG);
RenX::replace_tag(fmt, this->GDIProxyDisarmsTag, this->INTERNAL_GDI_PROXY_DISARMS_TAG);
RenX::replace_tag(fmt, this->GDIKillsTag, this->INTERNAL_GDI_KILLS_TAG);
RenX::replace_tag(fmt, this->GDIDeathsTag, this->INTERNAL_GDI_DEATHS_TAG);
RenX::replace_tag(fmt, this->GDIVehicleKillsTag, this->INTERNAL_GDI_VEHICLE_KILLS_TAG);
RenX::replace_tag(fmt, this->GDIDefenceKillsTag, this->INTERNAL_GDI_DEFENCE_KILLS_TAG);
RenX::replace_tag(fmt, this->GDIBuildingKillsTag, this->INTERNAL_GDI_BUILDING_KILLS_TAG);
RenX::replace_tag(fmt, this->GDIKDRTag, this->INTERNAL_GDI_KDR_TAG);
RenX::replace_tag(fmt, this->GDIHeadshotsTag, this->INTERNAL_GDI_HEADSHOTS_TAG);
RenX::replace_tag(fmt, this->GDIHeadshotKillRatioTag, this->INTERNAL_GDI_HEADSHOT_KILL_RATIO_TAG);
RenX::replace_tag(fmt, this->NodScoreTag, this->INTERNAL_NOD_SCORE_TAG);
RenX::replace_tag(fmt, this->NodSPMTag, this->INTERNAL_NOD_SPM_TAG);
RenX::replace_tag(fmt, this->NodGameTimeTag, this->INTERNAL_NOD_GAME_TIME_TAG);
RenX::replace_tag(fmt, this->NodTiesTag, this->INTERNAL_NOD_TIES_TAG);
RenX::replace_tag(fmt, this->NodBeaconPlacementsTag, this->INTERNAL_NOD_BEACON_PLACEMENTS_TAG);
RenX::replace_tag(fmt, this->NodBeaconDisarmsTag, this->INTERNAL_NOD_BEACON_DISARMS_TAG);
RenX::replace_tag(fmt, this->NodProxyPlacementsTag, this->INTERNAL_NOD_PROXY_PLACEMENTS_TAG);
RenX::replace_tag(fmt, this->NodProxyDisarmsTag, this->INTERNAL_NOD_PROXY_DISARMS_TAG);
RenX::replace_tag(fmt, this->NodKillsTag, this->INTERNAL_NOD_KILLS_TAG);
RenX::replace_tag(fmt, this->NodDeathsTag, this->INTERNAL_NOD_DEATHS_TAG);
RenX::replace_tag(fmt, this->NodVehicleKillsTag, this->INTERNAL_NOD_VEHICLE_KILLS_TAG);
RenX::replace_tag(fmt, this->NodDefenceKillsTag, this->INTERNAL_NOD_DEFENCE_KILLS_TAG);
RenX::replace_tag(fmt, this->NodBuildingKillsTag, this->INTERNAL_NOD_BUILDING_KILLS_TAG);
RenX::replace_tag(fmt, this->NodKDRTag, this->INTERNAL_NOD_KDR_TAG);
RenX::replace_tag(fmt, this->NodHeadshotsTag, this->INTERNAL_NOD_HEADSHOTS_TAG);
RenX::replace_tag(fmt, this->NodHeadshotKillRatioTag, this->INTERNAL_NOD_HEADSHOT_KILL_RATIO_TAG);
/** Other tags */
fmt.replace(this->weaponTag, this->INTERNAL_WEAPON_TAG);
fmt.replace(this->objectTag, this->INTERNAL_OBJECT_TAG);
fmt.replace(this->messageTag, this->INTERNAL_MESSAGE_TAG);
fmt.replace(this->newNameTag, this->INTERNAL_NEW_NAME_TAG);
fmt.replace(this->winScoreTag, this->INTERNAL_WIN_SCORE_TAG);
fmt.replace(this->loseScoreTag, this->INTERNAL_LOSE_SCORE_TAG);
RenX::replace_tag(fmt, this->weaponTag, this->INTERNAL_WEAPON_TAG);
RenX::replace_tag(fmt, this->objectTag, this->INTERNAL_OBJECT_TAG);
RenX::replace_tag(fmt, this->messageTag, this->INTERNAL_MESSAGE_TAG);
RenX::replace_tag(fmt, this->newNameTag, this->INTERNAL_NEW_NAME_TAG);
RenX::replace_tag(fmt, this->winScoreTag, this->INTERNAL_WIN_SCORE_TAG);
RenX::replace_tag(fmt, this->loseScoreTag, this->INTERNAL_LOSE_SCORE_TAG);
for (const auto& plugin : RenX::getCore()->getPlugins()) {
plugin->RenX_SanitizeTags(fmt);
@ -879,24 +879,38 @@ const Jupiter::ReadableString &TagsImp::getUniqueInternalTag()
return this->uniqueTag;
}
/** Foward functions */
void RenX::replace_tag(std::string& fmt, std::string_view tag, std::string_view internal_tag) {
// Search for tag
size_t tag_pos = fmt.find(tag);
if (tag_pos == std::string::npos) {
return;
}
// Replace the tag
fmt.replace(tag_pos, tag.size(), internal_tag);
// Recurse for any further instances; less efficient than old replace() but should be rare anyways
replace_tag(fmt, tag, internal_tag);
}
/** Forward functions */
const Jupiter::ReadableString &RenX::getUniqueInternalTag()
{
return _tags.getUniqueInternalTag();
}
void RenX::processTags(Jupiter::StringType &msg, const RenX::Server *server, const RenX::PlayerInfo *player, const RenX::PlayerInfo *victim, const RenX::BuildingInfo *building)
void RenX::processTags(std::string& msg, const RenX::Server *server, const RenX::PlayerInfo *player, const RenX::PlayerInfo *victim, const RenX::BuildingInfo *building)
{
_tags.processTags(msg, server, player, victim, building);
}
void RenX::processTags(Jupiter::StringType &msg, const RenX::LadderDatabase::Entry &entry)
void RenX::processTags(std::string& msg, const RenX::LadderDatabase::Entry &entry)
{
_tags.processTags(msg, entry);
}
void RenX::sanitizeTags(Jupiter::StringType &fmt)
void RenX::sanitizeTags(std::string& fmt)
{
_tags.sanitizeTags(fmt);
}

689
src/Plugins/RenX/RenX.Core/RenX_Tags.h

@ -41,9 +41,10 @@ namespace RenX
class Server;
struct BuildingInfo;
RENX_API void processTags(Jupiter::StringType &msg, const RenX::Server *server = nullptr, const RenX::PlayerInfo *player = nullptr, const RenX::PlayerInfo *victim = nullptr, const RenX::BuildingInfo *building = nullptr);
RENX_API void processTags(Jupiter::StringType &msg, const RenX::LadderDatabase::Entry &entry);
RENX_API void sanitizeTags(Jupiter::StringType &fmt);
RENX_API void processTags(std::string& msg, const RenX::Server *server = nullptr, const RenX::PlayerInfo *player = nullptr, const RenX::PlayerInfo *victim = nullptr, const RenX::BuildingInfo *building = nullptr);
RENX_API void processTags(std::string& msg, const RenX::LadderDatabase::Entry &entry);
RENX_API void sanitizeTags(std::string& fmt);
RENX_API void replace_tag(std::string& fmt, std::string_view tag, std::string_view internal_tag);
RENX_API const Jupiter::ReadableString &getUniqueInternalTag();
struct RENX_API Tags
@ -55,374 +56,374 @@ namespace RenX
std::string timeFmt;
/** Global tags */
Jupiter::StringS INTERNAL_DATE_TAG;
Jupiter::StringS INTERNAL_TIME_TAG;
std::string INTERNAL_DATE_TAG;
std::string INTERNAL_TIME_TAG;
/** Server tags */
Jupiter::StringS INTERNAL_RCON_VERSION_TAG;
Jupiter::StringS INTERNAL_GAME_VERSION_TAG;
Jupiter::StringS INTERNAL_RULES_TAG;
Jupiter::StringS INTERNAL_USER_TAG;
Jupiter::StringS INTERNAL_SERVER_NAME_TAG;
Jupiter::StringS INTERNAL_MAP_TAG;
Jupiter::StringS INTERNAL_MAP_GUID_TAG;
Jupiter::StringS INTERNAL_SERVER_HOSTNAME_TAG;
Jupiter::StringS INTERNAL_SERVER_PORT_TAG;
Jupiter::StringS INTERNAL_SOCKET_HOSTNAME_TAG;
Jupiter::StringS INTERNAL_SOCKET_PORT_TAG;
Jupiter::StringS INTERNAL_SERVER_PREFIX_TAG;
std::string INTERNAL_RCON_VERSION_TAG;
std::string INTERNAL_GAME_VERSION_TAG;
std::string INTERNAL_RULES_TAG;
std::string INTERNAL_USER_TAG;
std::string INTERNAL_SERVER_NAME_TAG;
std::string INTERNAL_MAP_TAG;
std::string INTERNAL_MAP_GUID_TAG;
std::string INTERNAL_SERVER_HOSTNAME_TAG;
std::string INTERNAL_SERVER_PORT_TAG;
std::string INTERNAL_SOCKET_HOSTNAME_TAG;
std::string INTERNAL_SOCKET_PORT_TAG;
std::string INTERNAL_SERVER_PREFIX_TAG;
/** Player tags */
Jupiter::StringS INTERNAL_NAME_TAG;
Jupiter::StringS INTERNAL_RAW_NAME_TAG;
Jupiter::StringS INTERNAL_IP_TAG;
Jupiter::StringS INTERNAL_HWID_TAG;
Jupiter::StringS INTERNAL_RDNS_TAG;
Jupiter::StringS INTERNAL_STEAM_TAG;
Jupiter::StringS INTERNAL_UUID_TAG;
Jupiter::StringS INTERNAL_ID_TAG;
Jupiter::StringS INTERNAL_CHARACTER_TAG;
Jupiter::StringS INTERNAL_VEHICLE_TAG;
Jupiter::StringS INTERNAL_ADMIN_TAG;
Jupiter::StringS INTERNAL_PREFIX_TAG;
Jupiter::StringS INTERNAL_GAME_PREFIX_TAG;
Jupiter::StringS INTERNAL_TEAM_COLOR_TAG;
Jupiter::StringS INTERNAL_TEAM_SHORT_TAG;
Jupiter::StringS INTERNAL_TEAM_LONG_TAG;
Jupiter::StringS INTERNAL_PING_TAG;
Jupiter::StringS INTERNAL_SCORE_TAG;
Jupiter::StringS INTERNAL_SCORE_PER_MINUTE_TAG;
Jupiter::StringS INTERNAL_CREDITS_TAG;
Jupiter::StringS INTERNAL_KILLS_TAG;
Jupiter::StringS INTERNAL_DEATHS_TAG;
Jupiter::StringS INTERNAL_KDR_TAG;
Jupiter::StringS INTERNAL_SUICIDES_TAG;
Jupiter::StringS INTERNAL_HEADSHOTS_TAG;
Jupiter::StringS INTERNAL_HEADSHOT_KILL_RATIO_TAG;
Jupiter::StringS INTERNAL_VEHICLE_KILLS_TAG;
Jupiter::StringS INTERNAL_BUILDING_KILLS_TAG;
Jupiter::StringS INTERNAL_DEFENCE_KILLS_TAG;
Jupiter::StringS INTERNAL_GAME_TIME_TAG;
Jupiter::StringS INTERNAL_GAMES_TAG;
Jupiter::StringS INTERNAL_GDI_GAMES_TAG;
Jupiter::StringS INTERNAL_NOD_GAMES_TAG;
Jupiter::StringS INTERNAL_WINS_TAG;
Jupiter::StringS INTERNAL_GDI_WINS_TAG;
Jupiter::StringS INTERNAL_NOD_WINS_TAG;
Jupiter::StringS INTERNAL_TIES_TAG;
Jupiter::StringS INTERNAL_LOSSES_TAG;
Jupiter::StringS INTERNAL_GDI_LOSSES_TAG;
Jupiter::StringS INTERNAL_NOD_LOSSES_TAG;
Jupiter::StringS INTERNAL_WIN_LOSS_RATIO_TAG;
Jupiter::StringS INTERNAL_GDI_WIN_LOSS_RATIO_TAG;
Jupiter::StringS INTERNAL_NOD_WIN_LOSS_RATIO_TAG;
Jupiter::StringS INTERNAL_BEACON_PLACEMENTS_TAG;
Jupiter::StringS INTERNAL_BEACON_DISARMS_TAG;
Jupiter::StringS INTERNAL_PROXY_PLACEMENTS_TAG;
Jupiter::StringS INTERNAL_PROXY_DISARMS_TAG;
Jupiter::StringS INTERNAL_CAPTURES_TAG;
Jupiter::StringS INTERNAL_STEALS_TAG;
Jupiter::StringS INTERNAL_STOLEN_TAG;
Jupiter::StringS INTERNAL_ACCESS_TAG;
std::string INTERNAL_NAME_TAG;
std::string INTERNAL_RAW_NAME_TAG;
std::string INTERNAL_IP_TAG;
std::string INTERNAL_HWID_TAG;
std::string INTERNAL_RDNS_TAG;
std::string INTERNAL_STEAM_TAG;
std::string INTERNAL_UUID_TAG;
std::string INTERNAL_ID_TAG;
std::string INTERNAL_CHARACTER_TAG;
std::string INTERNAL_VEHICLE_TAG;
std::string INTERNAL_ADMIN_TAG;
std::string INTERNAL_PREFIX_TAG;
std::string INTERNAL_GAME_PREFIX_TAG;
std::string INTERNAL_TEAM_COLOR_TAG;
std::string INTERNAL_TEAM_SHORT_TAG;
std::string INTERNAL_TEAM_LONG_TAG;
std::string INTERNAL_PING_TAG;
std::string INTERNAL_SCORE_TAG;
std::string INTERNAL_SCORE_PER_MINUTE_TAG;
std::string INTERNAL_CREDITS_TAG;
std::string INTERNAL_KILLS_TAG;
std::string INTERNAL_DEATHS_TAG;
std::string INTERNAL_KDR_TAG;
std::string INTERNAL_SUICIDES_TAG;
std::string INTERNAL_HEADSHOTS_TAG;
std::string INTERNAL_HEADSHOT_KILL_RATIO_TAG;
std::string INTERNAL_VEHICLE_KILLS_TAG;
std::string INTERNAL_BUILDING_KILLS_TAG;
std::string INTERNAL_DEFENCE_KILLS_TAG;
std::string INTERNAL_GAME_TIME_TAG;
std::string INTERNAL_GAMES_TAG;
std::string INTERNAL_GDI_GAMES_TAG;
std::string INTERNAL_NOD_GAMES_TAG;
std::string INTERNAL_WINS_TAG;
std::string INTERNAL_GDI_WINS_TAG;
std::string INTERNAL_NOD_WINS_TAG;
std::string INTERNAL_TIES_TAG;
std::string INTERNAL_LOSSES_TAG;
std::string INTERNAL_GDI_LOSSES_TAG;
std::string INTERNAL_NOD_LOSSES_TAG;
std::string INTERNAL_WIN_LOSS_RATIO_TAG;
std::string INTERNAL_GDI_WIN_LOSS_RATIO_TAG;
std::string INTERNAL_NOD_WIN_LOSS_RATIO_TAG;
std::string INTERNAL_BEACON_PLACEMENTS_TAG;
std::string INTERNAL_BEACON_DISARMS_TAG;
std::string INTERNAL_PROXY_PLACEMENTS_TAG;
std::string INTERNAL_PROXY_DISARMS_TAG;
std::string INTERNAL_CAPTURES_TAG;
std::string INTERNAL_STEALS_TAG;
std::string INTERNAL_STOLEN_TAG;
std::string INTERNAL_ACCESS_TAG;
/** Victim tags */
Jupiter::StringS INTERNAL_VICTIM_NAME_TAG;
Jupiter::StringS INTERNAL_VICTIM_RAW_NAME_TAG;
Jupiter::StringS INTERNAL_VICTIM_IP_TAG;
Jupiter::StringS INTERNAL_VICTIM_HWID_TAG;
Jupiter::StringS INTERNAL_VICTIM_RDNS_TAG;
Jupiter::StringS INTERNAL_VICTIM_STEAM_TAG;
Jupiter::StringS INTERNAL_VICTIM_UUID_TAG;
Jupiter::StringS INTERNAL_VICTIM_ID_TAG;
Jupiter::StringS INTERNAL_VICTIM_CHARACTER_TAG;
Jupiter::StringS INTERNAL_VICTIM_VEHICLE_TAG;
Jupiter::StringS INTERNAL_VICTIM_ADMIN_TAG;
Jupiter::StringS INTERNAL_VICTIM_PREFIX_TAG;
Jupiter::StringS INTERNAL_VICTIM_GAME_PREFIX_TAG;
Jupiter::StringS INTERNAL_VICTIM_TEAM_COLOR_TAG;
Jupiter::StringS INTERNAL_VICTIM_TEAM_SHORT_TAG;
Jupiter::StringS INTERNAL_VICTIM_TEAM_LONG_TAG;
Jupiter::StringS INTERNAL_VICTIM_PING_TAG;
Jupiter::StringS INTERNAL_VICTIM_SCORE_TAG;
Jupiter::StringS INTERNAL_VICTIM_SCORE_PER_MINUTE_TAG;
Jupiter::StringS INTERNAL_VICTIM_CREDITS_TAG;
Jupiter::StringS INTERNAL_VICTIM_KILLS_TAG;
Jupiter::StringS INTERNAL_VICTIM_DEATHS_TAG;
Jupiter::StringS INTERNAL_VICTIM_KDR_TAG;
Jupiter::StringS INTERNAL_VICTIM_SUICIDES_TAG;
Jupiter::StringS INTERNAL_VICTIM_HEADSHOTS_TAG;
Jupiter::StringS INTERNAL_VICTIM_HEADSHOT_KILL_RATIO_TAG;
Jupiter::StringS INTERNAL_VICTIM_VEHICLE_KILLS_TAG;
Jupiter::StringS INTERNAL_VICTIM_BUILDING_KILLS_TAG;
Jupiter::StringS INTERNAL_VICTIM_DEFENCE_KILLS_TAG;
Jupiter::StringS INTERNAL_VICTIM_GAME_TIME_TAG;
Jupiter::StringS INTERNAL_VICTIM_GAMES_TAG;
Jupiter::StringS INTERNAL_VICTIM_GDI_GAMES_TAG;
Jupiter::StringS INTERNAL_VICTIM_NOD_GAMES_TAG;
Jupiter::StringS INTERNAL_VICTIM_WINS_TAG;
Jupiter::StringS INTERNAL_VICTIM_GDI_WINS_TAG;
Jupiter::StringS INTERNAL_VICTIM_NOD_WINS_TAG;
Jupiter::StringS INTERNAL_VICTIM_TIES_TAG;
Jupiter::StringS INTERNAL_VICTIM_LOSSES_TAG;
Jupiter::StringS INTERNAL_VICTIM_GDI_LOSSES_TAG;
Jupiter::StringS INTERNAL_VICTIM_NOD_LOSSES_TAG;
Jupiter::StringS INTERNAL_VICTIM_WIN_LOSS_RATIO_TAG;
Jupiter::StringS INTERNAL_VICTIM_GDI_WIN_LOSS_RATIO_TAG;
Jupiter::StringS INTERNAL_VICTIM_NOD_WIN_LOSS_RATIO_TAG;
Jupiter::StringS INTERNAL_VICTIM_BEACON_PLACEMENTS_TAG;
Jupiter::StringS INTERNAL_VICTIM_BEACON_DISARMS_TAG;
Jupiter::StringS INTERNAL_VICTIM_PROXY_PLACEMENTS_TAG;
Jupiter::StringS INTERNAL_VICTIM_PROXY_DISARMS_TAG;
Jupiter::StringS INTERNAL_VICTIM_CAPTURES_TAG;
Jupiter::StringS INTERNAL_VICTIM_STEALS_TAG;
Jupiter::StringS INTERNAL_VICTIM_STOLEN_TAG;
Jupiter::StringS INTERNAL_VICTIM_ACCESS_TAG;
std::string INTERNAL_VICTIM_NAME_TAG;
std::string INTERNAL_VICTIM_RAW_NAME_TAG;
std::string INTERNAL_VICTIM_IP_TAG;
std::string INTERNAL_VICTIM_HWID_TAG;
std::string INTERNAL_VICTIM_RDNS_TAG;
std::string INTERNAL_VICTIM_STEAM_TAG;
std::string INTERNAL_VICTIM_UUID_TAG;
std::string INTERNAL_VICTIM_ID_TAG;
std::string INTERNAL_VICTIM_CHARACTER_TAG;
std::string INTERNAL_VICTIM_VEHICLE_TAG;
std::string INTERNAL_VICTIM_ADMIN_TAG;
std::string INTERNAL_VICTIM_PREFIX_TAG;
std::string INTERNAL_VICTIM_GAME_PREFIX_TAG;
std::string INTERNAL_VICTIM_TEAM_COLOR_TAG;
std::string INTERNAL_VICTIM_TEAM_SHORT_TAG;
std::string INTERNAL_VICTIM_TEAM_LONG_TAG;
std::string INTERNAL_VICTIM_PING_TAG;
std::string INTERNAL_VICTIM_SCORE_TAG;
std::string INTERNAL_VICTIM_SCORE_PER_MINUTE_TAG;
std::string INTERNAL_VICTIM_CREDITS_TAG;
std::string INTERNAL_VICTIM_KILLS_TAG;
std::string INTERNAL_VICTIM_DEATHS_TAG;
std::string INTERNAL_VICTIM_KDR_TAG;
std::string INTERNAL_VICTIM_SUICIDES_TAG;
std::string INTERNAL_VICTIM_HEADSHOTS_TAG;
std::string INTERNAL_VICTIM_HEADSHOT_KILL_RATIO_TAG;
std::string INTERNAL_VICTIM_VEHICLE_KILLS_TAG;
std::string INTERNAL_VICTIM_BUILDING_KILLS_TAG;
std::string INTERNAL_VICTIM_DEFENCE_KILLS_TAG;
std::string INTERNAL_VICTIM_GAME_TIME_TAG;
std::string INTERNAL_VICTIM_GAMES_TAG;
std::string INTERNAL_VICTIM_GDI_GAMES_TAG;
std::string INTERNAL_VICTIM_NOD_GAMES_TAG;
std::string INTERNAL_VICTIM_WINS_TAG;
std::string INTERNAL_VICTIM_GDI_WINS_TAG;
std::string INTERNAL_VICTIM_NOD_WINS_TAG;
std::string INTERNAL_VICTIM_TIES_TAG;
std::string INTERNAL_VICTIM_LOSSES_TAG;
std::string INTERNAL_VICTIM_GDI_LOSSES_TAG;
std::string INTERNAL_VICTIM_NOD_LOSSES_TAG;
std::string INTERNAL_VICTIM_WIN_LOSS_RATIO_TAG;
std::string INTERNAL_VICTIM_GDI_WIN_LOSS_RATIO_TAG;
std::string INTERNAL_VICTIM_NOD_WIN_LOSS_RATIO_TAG;
std::string INTERNAL_VICTIM_BEACON_PLACEMENTS_TAG;
std::string INTERNAL_VICTIM_BEACON_DISARMS_TAG;
std::string INTERNAL_VICTIM_PROXY_PLACEMENTS_TAG;
std::string INTERNAL_VICTIM_PROXY_DISARMS_TAG;
std::string INTERNAL_VICTIM_CAPTURES_TAG;
std::string INTERNAL_VICTIM_STEALS_TAG;
std::string INTERNAL_VICTIM_STOLEN_TAG;
std::string INTERNAL_VICTIM_ACCESS_TAG;
/** Building tags */
Jupiter::StringS INTERNAL_BUILDING_NAME_TAG;
Jupiter::StringS INTERNAL_BUILDING_RAW_NAME_TAG;
Jupiter::StringS INTERNAL_BUILDING_HEALTH_TAG;
Jupiter::StringS INTERNAL_BUILDING_MAX_HEALTH_TAG;
Jupiter::StringS INTERNAL_BUILDING_HEALTH_PERCENTAGE_TAG;
Jupiter::StringS INTERNAL_BUILDING_ARMOR_TAG;
Jupiter::StringS INTERNAL_BUILDING_MAX_ARMOR_TAG;
Jupiter::StringS INTERNAL_BUILDING_ARMOR_PERCENTAGE_TAG;
Jupiter::StringS INTERNAL_BUILDING_DURABILITY_TAG;
Jupiter::StringS INTERNAL_BUILDING_MAX_DURABILITY_TAG;
Jupiter::StringS INTERNAL_BUILDING_DURABILITY_PERCENTAGE_TAG;
Jupiter::StringS INTERNAL_BUILDING_TEAM_COLOR_TAG;
Jupiter::StringS INTERNAL_BUILDING_TEAM_SHORT_TAG;
Jupiter::StringS INTERNAL_BUILDING_TEAM_LONG_TAG;
std::string INTERNAL_BUILDING_NAME_TAG;
std::string INTERNAL_BUILDING_RAW_NAME_TAG;
std::string INTERNAL_BUILDING_HEALTH_TAG;
std::string INTERNAL_BUILDING_MAX_HEALTH_TAG;
std::string INTERNAL_BUILDING_HEALTH_PERCENTAGE_TAG;
std::string INTERNAL_BUILDING_ARMOR_TAG;
std::string INTERNAL_BUILDING_MAX_ARMOR_TAG;
std::string INTERNAL_BUILDING_ARMOR_PERCENTAGE_TAG;
std::string INTERNAL_BUILDING_DURABILITY_TAG;
std::string INTERNAL_BUILDING_MAX_DURABILITY_TAG;
std::string INTERNAL_BUILDING_DURABILITY_PERCENTAGE_TAG;
std::string INTERNAL_BUILDING_TEAM_COLOR_TAG;
std::string INTERNAL_BUILDING_TEAM_SHORT_TAG;
std::string INTERNAL_BUILDING_TEAM_LONG_TAG;
/** Ladder tags */
Jupiter::StringS INTERNAL_RANK_TAG;
Jupiter::StringS INTERNAL_LAST_GAME_TAG;
Jupiter::StringS INTERNAL_GDI_SCORE_TAG;
Jupiter::StringS INTERNAL_GDI_SPM_TAG;
Jupiter::StringS INTERNAL_GDI_GAME_TIME_TAG;
Jupiter::StringS INTERNAL_GDI_TIES_TAG;
Jupiter::StringS INTERNAL_GDI_BEACON_PLACEMENTS_TAG;
Jupiter::StringS INTERNAL_GDI_BEACON_DISARMS_TAG;
Jupiter::StringS INTERNAL_GDI_PROXY_PLACEMENTS_TAG;
Jupiter::StringS INTERNAL_GDI_PROXY_DISARMS_TAG;
Jupiter::StringS INTERNAL_GDI_KILLS_TAG;
Jupiter::StringS INTERNAL_GDI_DEATHS_TAG;
Jupiter::StringS INTERNAL_GDI_VEHICLE_KILLS_TAG;
Jupiter::StringS INTERNAL_GDI_DEFENCE_KILLS_TAG;
Jupiter::StringS INTERNAL_GDI_BUILDING_KILLS_TAG;
Jupiter::StringS INTERNAL_GDI_KDR_TAG;
Jupiter::StringS INTERNAL_GDI_HEADSHOTS_TAG;
Jupiter::StringS INTERNAL_GDI_HEADSHOT_KILL_RATIO_TAG;
Jupiter::StringS INTERNAL_NOD_SCORE_TAG;
Jupiter::StringS INTERNAL_NOD_SPM_TAG;
Jupiter::StringS INTERNAL_NOD_GAME_TIME_TAG;
Jupiter::StringS INTERNAL_NOD_TIES_TAG;
Jupiter::StringS INTERNAL_NOD_BEACON_PLACEMENTS_TAG;
Jupiter::StringS INTERNAL_NOD_BEACON_DISARMS_TAG;
Jupiter::StringS INTERNAL_NOD_PROXY_PLACEMENTS_TAG;
Jupiter::StringS INTERNAL_NOD_PROXY_DISARMS_TAG;
Jupiter::StringS INTERNAL_NOD_KILLS_TAG;
Jupiter::StringS INTERNAL_NOD_DEATHS_TAG;
Jupiter::StringS INTERNAL_NOD_VEHICLE_KILLS_TAG;
Jupiter::StringS INTERNAL_NOD_DEFENCE_KILLS_TAG;
Jupiter::StringS INTERNAL_NOD_BUILDING_KILLS_TAG;
Jupiter::StringS INTERNAL_NOD_KDR_TAG;
Jupiter::StringS INTERNAL_NOD_HEADSHOTS_TAG;
Jupiter::StringS INTERNAL_NOD_HEADSHOT_KILL_RATIO_TAG;
std::string INTERNAL_RANK_TAG;
std::string INTERNAL_LAST_GAME_TAG;
std::string INTERNAL_GDI_SCORE_TAG;
std::string INTERNAL_GDI_SPM_TAG;
std::string INTERNAL_GDI_GAME_TIME_TAG;
std::string INTERNAL_GDI_TIES_TAG;
std::string INTERNAL_GDI_BEACON_PLACEMENTS_TAG;
std::string INTERNAL_GDI_BEACON_DISARMS_TAG;
std::string INTERNAL_GDI_PROXY_PLACEMENTS_TAG;
std::string INTERNAL_GDI_PROXY_DISARMS_TAG;
std::string INTERNAL_GDI_KILLS_TAG;
std::string INTERNAL_GDI_DEATHS_TAG;
std::string INTERNAL_GDI_VEHICLE_KILLS_TAG;
std::string INTERNAL_GDI_DEFENCE_KILLS_TAG;
std::string INTERNAL_GDI_BUILDING_KILLS_TAG;
std::string INTERNAL_GDI_KDR_TAG;
std::string INTERNAL_GDI_HEADSHOTS_TAG;
std::string INTERNAL_GDI_HEADSHOT_KILL_RATIO_TAG;
std::string INTERNAL_NOD_SCORE_TAG;
std::string INTERNAL_NOD_SPM_TAG;
std::string INTERNAL_NOD_GAME_TIME_TAG;
std::string INTERNAL_NOD_TIES_TAG;
std::string INTERNAL_NOD_BEACON_PLACEMENTS_TAG;
std::string INTERNAL_NOD_BEACON_DISARMS_TAG;
std::string INTERNAL_NOD_PROXY_PLACEMENTS_TAG;
std::string INTERNAL_NOD_PROXY_DISARMS_TAG;
std::string INTERNAL_NOD_KILLS_TAG;
std::string INTERNAL_NOD_DEATHS_TAG;
std::string INTERNAL_NOD_VEHICLE_KILLS_TAG;
std::string INTERNAL_NOD_DEFENCE_KILLS_TAG;
std::string INTERNAL_NOD_BUILDING_KILLS_TAG;
std::string INTERNAL_NOD_KDR_TAG;
std::string INTERNAL_NOD_HEADSHOTS_TAG;
std::string INTERNAL_NOD_HEADSHOT_KILL_RATIO_TAG;
/** Other tags */
Jupiter::StringS INTERNAL_WEAPON_TAG;
Jupiter::StringS INTERNAL_OBJECT_TAG;
Jupiter::StringS INTERNAL_MESSAGE_TAG;
Jupiter::StringS INTERNAL_NEW_NAME_TAG;
Jupiter::StringS INTERNAL_WIN_SCORE_TAG;
Jupiter::StringS INTERNAL_LOSE_SCORE_TAG;
std::string INTERNAL_WEAPON_TAG;
std::string INTERNAL_OBJECT_TAG;
std::string INTERNAL_MESSAGE_TAG;
std::string INTERNAL_NEW_NAME_TAG;
std::string INTERNAL_WIN_SCORE_TAG;
std::string INTERNAL_LOSE_SCORE_TAG;
/** External message tags */
/** Global tags */
Jupiter::StringS dateTag;
Jupiter::StringS timeTag;
std::string dateTag;
std::string timeTag;
/** Server tags */
Jupiter::StringS rconVersionTag;
Jupiter::StringS gameVersionTag;
Jupiter::StringS rulesTag;
Jupiter::StringS userTag;
Jupiter::StringS serverNameTag;
Jupiter::StringS mapTag;
Jupiter::StringS mapGUIDTag;
Jupiter::StringS serverHostnameTag;
Jupiter::StringS serverPortTag;
Jupiter::StringS socketHostnameTag;
Jupiter::StringS socketPortTag;
Jupiter::StringS serverPrefixTag;
std::string rconVersionTag;
std::string gameVersionTag;
std::string rulesTag;
std::string userTag;
std::string serverNameTag;
std::string mapTag;
std::string mapGUIDTag;
std::string serverHostnameTag;
std::string serverPortTag;
std::string socketHostnameTag;
std::string socketPortTag;
std::string serverPrefixTag;
/** Player tags */
Jupiter::StringS nameTag;
Jupiter::StringS rawNameTag;
Jupiter::StringS ipTag;
Jupiter::StringS hwidTag;
Jupiter::StringS rdnsTag;
Jupiter::StringS steamTag;
Jupiter::StringS uuidTag;
Jupiter::StringS idTag;
Jupiter::StringS characterTag;
Jupiter::StringS vehicleTag;
Jupiter::StringS adminTag;
Jupiter::StringS prefixTag;
Jupiter::StringS gamePrefixTag;
Jupiter::StringS teamColorTag;
Jupiter::StringS teamShortTag;
Jupiter::StringS teamLongTag;
Jupiter::StringS pingTag;
Jupiter::StringS scoreTag;
Jupiter::StringS scorePerMinuteTag;
Jupiter::StringS creditsTag;
Jupiter::StringS killsTag;
Jupiter::StringS deathsTag;
Jupiter::StringS kdrTag;
Jupiter::StringS suicidesTag;
Jupiter::StringS headshotsTag;
Jupiter::StringS headshotKillRatioTag;
Jupiter::StringS vehicleKillsTag;
Jupiter::StringS buildingKillsTag;
Jupiter::StringS defenceKillsTag;
Jupiter::StringS gameTimeTag;
Jupiter::StringS gamesTag;
Jupiter::StringS GDIGamesTag;
Jupiter::StringS NodGamesTag;
Jupiter::StringS winsTag;
Jupiter::StringS GDIWinsTag;
Jupiter::StringS NodWinsTag;
Jupiter::StringS tiesTag;
Jupiter::StringS lossesTag;
Jupiter::StringS GDILossesTag;
Jupiter::StringS NodLossesTag;
Jupiter::StringS winLossRatioTag;
Jupiter::StringS GDIWinLossRatioTag;
Jupiter::StringS NodWinLossRatioTag;
Jupiter::StringS beaconPlacementsTag;
Jupiter::StringS beaconDisarmsTag;
Jupiter::StringS proxyPlacementsTag;
Jupiter::StringS proxyDisarmsTag;
Jupiter::StringS capturesTag;
Jupiter::StringS stealsTag;
Jupiter::StringS stolenTag;
Jupiter::StringS accessTag;
std::string nameTag;
std::string rawNameTag;
std::string ipTag;
std::string hwidTag;
std::string rdnsTag;
std::string steamTag;
std::string uuidTag;
std::string idTag;
std::string characterTag;
std::string vehicleTag;
std::string adminTag;
std::string prefixTag;
std::string gamePrefixTag;
std::string teamColorTag;
std::string teamShortTag;
std::string teamLongTag;
std::string pingTag;
std::string scoreTag;
std::string scorePerMinuteTag;
std::string creditsTag;
std::string killsTag;
std::string deathsTag;
std::string kdrTag;
std::string suicidesTag;
std::string headshotsTag;
std::string headshotKillRatioTag;
std::string vehicleKillsTag;
std::string buildingKillsTag;
std::string defenceKillsTag;
std::string gameTimeTag;
std::string gamesTag;
std::string GDIGamesTag;
std::string NodGamesTag;
std::string winsTag;
std::string GDIWinsTag;
std::string NodWinsTag;
std::string tiesTag;
std::string lossesTag;
std::string GDILossesTag;
std::string NodLossesTag;
std::string winLossRatioTag;
std::string GDIWinLossRatioTag;
std::string NodWinLossRatioTag;
std::string beaconPlacementsTag;
std::string beaconDisarmsTag;
std::string proxyPlacementsTag;
std::string proxyDisarmsTag;
std::string capturesTag;
std::string stealsTag;
std::string stolenTag;
std::string accessTag;
/** Victim tags */
Jupiter::StringS victimNameTag;
Jupiter::StringS victimRawNameTag;
Jupiter::StringS victimIPTag;
Jupiter::StringS victimHWIDTag;
Jupiter::StringS victimRDNSTag;
Jupiter::StringS victimSteamTag;
Jupiter::StringS victimUUIDTag;
Jupiter::StringS victimIDTag;
Jupiter::StringS victimCharacterTag;
Jupiter::StringS victimVehicleTag;
Jupiter::StringS victimAdminTag;
Jupiter::StringS victimPrefixTag;
Jupiter::StringS victimGamePrefixTag;
Jupiter::StringS victimTeamColorTag;
Jupiter::StringS victimTeamShortTag;
Jupiter::StringS victimTeamLongTag;
Jupiter::StringS victimPingTag;
Jupiter::StringS victimScoreTag;
Jupiter::StringS victimScorePerMinuteTag;
Jupiter::StringS victimCreditsTag;
Jupiter::StringS victimKillsTag;
Jupiter::StringS victimDeathsTag;
Jupiter::StringS victimKDRTag;
Jupiter::StringS victimSuicidesTag;
Jupiter::StringS victimHeadshotsTag;
Jupiter::StringS victimHeadshotKillRatioTag;
Jupiter::StringS victimVehicleKillsTag;
Jupiter::StringS victimBuildingKillsTag;
Jupiter::StringS victimDefenceKillsTag;
Jupiter::StringS victimGameTimeTag;
Jupiter::StringS victimGamesTag;
Jupiter::StringS victimGDIGamesTag;
Jupiter::StringS victimNodGamesTag;
Jupiter::StringS victimWinsTag;
Jupiter::StringS victimGDIWinsTag;
Jupiter::StringS victimNodWinsTag;
Jupiter::StringS victimTiesTag;
Jupiter::StringS victimLossesTag;
Jupiter::StringS victimGDILossesTag;
Jupiter::StringS victimNodLossesTag;
Jupiter::StringS victimWinLossRatioTag;
Jupiter::StringS victimGDIWinLossRatioTag;
Jupiter::StringS victimNodWinLossRatioTag;
Jupiter::StringS victimBeaconPlacementsTag;
Jupiter::StringS victimBeaconDisarmsTag;
Jupiter::StringS victimProxyPlacementsTag;
Jupiter::StringS victimProxyDisarmsTag;
Jupiter::StringS victimCapturesTag;
Jupiter::StringS victimStealsTag;
Jupiter::StringS victimStolenTag;
Jupiter::StringS victimAccessTag;
std::string victimNameTag;
std::string victimRawNameTag;
std::string victimIPTag;
std::string victimHWIDTag;
std::string victimRDNSTag;
std::string victimSteamTag;
std::string victimUUIDTag;
std::string victimIDTag;
std::string victimCharacterTag;
std::string victimVehicleTag;
std::string victimAdminTag;
std::string victimPrefixTag;
std::string victimGamePrefixTag;
std::string victimTeamColorTag;
std::string victimTeamShortTag;
std::string victimTeamLongTag;
std::string victimPingTag;
std::string victimScoreTag;
std::string victimScorePerMinuteTag;
std::string victimCreditsTag;
std::string victimKillsTag;
std::string victimDeathsTag;
std::string victimKDRTag;
std::string victimSuicidesTag;
std::string victimHeadshotsTag;
std::string victimHeadshotKillRatioTag;
std::string victimVehicleKillsTag;
std::string victimBuildingKillsTag;
std::string victimDefenceKillsTag;
std::string victimGameTimeTag;
std::string victimGamesTag;
std::string victimGDIGamesTag;
std::string victimNodGamesTag;
std::string victimWinsTag;
std::string victimGDIWinsTag;
std::string victimNodWinsTag;
std::string victimTiesTag;
std::string victimLossesTag;
std::string victimGDILossesTag;
std::string victimNodLossesTag;
std::string victimWinLossRatioTag;
std::string victimGDIWinLossRatioTag;
std::string victimNodWinLossRatioTag;
std::string victimBeaconPlacementsTag;
std::string victimBeaconDisarmsTag;
std::string victimProxyPlacementsTag;
std::string victimProxyDisarmsTag;
std::string victimCapturesTag;
std::string victimStealsTag;
std::string victimStolenTag;
std::string victimAccessTag;
/** Building tags */
Jupiter::StringS buildingNameTag;
Jupiter::StringS buildingRawNameTag;
Jupiter::StringS buildingHealthTag;
Jupiter::StringS buildingMaxHealthTag;
Jupiter::StringS buildingHealthPercentageTag;
Jupiter::StringS buildingArmorTag;
Jupiter::StringS buildingMaxArmorTag;
Jupiter::StringS buildingArmorPercentageTag;
Jupiter::StringS buildingDurabilityTag;
Jupiter::StringS buildingMaxDurabilityTag;
Jupiter::StringS buildingDurabilityPercentageTag;
Jupiter::StringS buildingTeamColorTag;
Jupiter::StringS buildingTeamShortTag;
Jupiter::StringS buildingTeamLongTag;
std::string buildingNameTag;
std::string buildingRawNameTag;
std::string buildingHealthTag;
std::string buildingMaxHealthTag;
std::string buildingHealthPercentageTag;
std::string buildingArmorTag;
std::string buildingMaxArmorTag;
std::string buildingArmorPercentageTag;
std::string buildingDurabilityTag;
std::string buildingMaxDurabilityTag;
std::string buildingDurabilityPercentageTag;
std::string buildingTeamColorTag;
std::string buildingTeamShortTag;
std::string buildingTeamLongTag;
/** Ladder tags */
Jupiter::StringS rankTag;
Jupiter::StringS lastGameTag;
Jupiter::StringS GDIScoreTag;
Jupiter::StringS GDISPMTag;
Jupiter::StringS GDIGameTimeTag;
Jupiter::StringS GDITiesTag;
Jupiter::StringS GDIBeaconPlacementsTag;
Jupiter::StringS GDIBeaconDisarmsTag;
Jupiter::StringS GDIProxyPlacementsTag;
Jupiter::StringS GDIProxyDisarmsTag;
Jupiter::StringS GDIKillsTag;
Jupiter::StringS GDIDeathsTag;
Jupiter::StringS GDIVehicleKillsTag;
Jupiter::StringS GDIDefenceKillsTag;
Jupiter::StringS GDIBuildingKillsTag;
Jupiter::StringS GDIKDRTag;
Jupiter::StringS GDIHeadshotsTag;
Jupiter::StringS GDIHeadshotKillRatioTag;
Jupiter::StringS NodScoreTag;
Jupiter::StringS NodSPMTag;
Jupiter::StringS NodGameTimeTag;
Jupiter::StringS NodTiesTag;
Jupiter::StringS NodBeaconPlacementsTag;
Jupiter::StringS NodBeaconDisarmsTag;
Jupiter::StringS NodProxyPlacementsTag;
Jupiter::StringS NodProxyDisarmsTag;
Jupiter::StringS NodKillsTag;
Jupiter::StringS NodDeathsTag;
Jupiter::StringS NodVehicleKillsTag;
Jupiter::StringS NodDefenceKillsTag;
Jupiter::StringS NodBuildingKillsTag;
Jupiter::StringS NodKDRTag;
Jupiter::StringS NodHeadshotsTag;
Jupiter::StringS NodHeadshotKillRatioTag;
std::string rankTag;
std::string lastGameTag;
std::string GDIScoreTag;
std::string GDISPMTag;
std::string GDIGameTimeTag;
std::string GDITiesTag;
std::string GDIBeaconPlacementsTag;
std::string GDIBeaconDisarmsTag;
std::string GDIProxyPlacementsTag;
std::string GDIProxyDisarmsTag;
std::string GDIKillsTag;
std::string GDIDeathsTag;
std::string GDIVehicleKillsTag;
std::string GDIDefenceKillsTag;
std::string GDIBuildingKillsTag;
std::string GDIKDRTag;
std::string GDIHeadshotsTag;
std::string GDIHeadshotKillRatioTag;
std::string NodScoreTag;
std::string NodSPMTag;
std::string NodGameTimeTag;
std::string NodTiesTag;
std::string NodBeaconPlacementsTag;
std::string NodBeaconDisarmsTag;
std::string NodProxyPlacementsTag;
std::string NodProxyDisarmsTag;
std::string NodKillsTag;
std::string NodDeathsTag;
std::string NodVehicleKillsTag;
std::string NodDefenceKillsTag;
std::string NodBuildingKillsTag;
std::string NodKDRTag;
std::string NodHeadshotsTag;
std::string NodHeadshotKillRatioTag;
/** Other tags */
Jupiter::StringS weaponTag;
Jupiter::StringS objectTag;
Jupiter::StringS messageTag;
Jupiter::StringS newNameTag;
Jupiter::StringS winScoreTag;
Jupiter::StringS loseScoreTag;
std::string weaponTag;
std::string objectTag;
std::string messageTag;
std::string newNameTag;
std::string winScoreTag;
std::string loseScoreTag;
};
RENX_API extern Tags *tags;
@ -432,7 +433,7 @@ namespace RenX
#define PROCESS_TAG(tag, value) \
while(true) { \
index = msg.find(tag); \
if (index == Jupiter::INVALID_INDEX) break; \
if (index == std::string::npos) break; \
msg.replace(index, tag.size(), value); }
/** Re-enable warnings */

8
src/Plugins/RenX/RenX.ExtraLogging/RenX_ExtraLogging.cpp

@ -63,7 +63,7 @@ bool RenX_ExtraLoggingPlugin::initialize() {
if (!logFile.empty()) {
RenX_ExtraLoggingPlugin::file = fopen(logFile.c_str(), "a+b");
if (RenX_ExtraLoggingPlugin::file != nullptr && !RenX_ExtraLoggingPlugin::newDayFmt.empty()) {
Jupiter::String line = RenX_ExtraLoggingPlugin::newDayFmt;
std::string line = RenX_ExtraLoggingPlugin::newDayFmt;
RenX::processTags(line);
fwrite(line.data(), sizeof(char), line.size(), file);
fputs("\r\n", file);
@ -82,7 +82,7 @@ int RenX_ExtraLoggingPlugin::think() {
if (currentDay != RenX_ExtraLoggingPlugin::day)
{
RenX_ExtraLoggingPlugin::day = currentDay;
Jupiter::String line = RenX_ExtraLoggingPlugin::newDayFmt;
std::string line = RenX_ExtraLoggingPlugin::newDayFmt;
RenX::processTags(line);
fwrite(line.data(), sizeof(char), line.size(), file);
fputs("\r\n", file);
@ -94,7 +94,7 @@ int RenX_ExtraLoggingPlugin::think() {
void RenX_ExtraLoggingPlugin::RenX_OnRaw(RenX::Server &server, const Jupiter::ReadableString &raw) {
if (RenX_ExtraLoggingPlugin::printToConsole) {
if (!RenX_ExtraLoggingPlugin::consolePrefix.empty()) {
Jupiter::StringS cPrefix = RenX_ExtraLoggingPlugin::consolePrefix;
std::string cPrefix = RenX_ExtraLoggingPlugin::consolePrefix;
RenX::processTags(cPrefix, &server);
fwrite(cPrefix.data(), sizeof(char), cPrefix.size(), stdout);
fputc(' ', stdout);
@ -105,7 +105,7 @@ void RenX_ExtraLoggingPlugin::RenX_OnRaw(RenX::Server &server, const Jupiter::Re
if (RenX_ExtraLoggingPlugin::file != nullptr) {
if (!RenX_ExtraLoggingPlugin::filePrefix.empty()) {
Jupiter::StringS fPrefix = RenX_ExtraLoggingPlugin::filePrefix;
std::string fPrefix = RenX_ExtraLoggingPlugin::filePrefix;
RenX::processTags(fPrefix, &server);
fwrite(fPrefix.data(), sizeof(char), fPrefix.size(), file);
fputc(' ', RenX_ExtraLoggingPlugin::file);

6
src/Plugins/RenX/RenX.ExtraLogging/RenX_ExtraLogging.h

@ -38,9 +38,9 @@ public: // RenX_ExtraLoggingPlugin
~RenX_ExtraLoggingPlugin();
private:
Jupiter::StringS filePrefix;
Jupiter::StringS consolePrefix;
Jupiter::StringS newDayFmt;
std::string filePrefix;
std::string consolePrefix;
std::string newDayFmt;
bool printToConsole;
FILE *file;

2
src/Plugins/RenX/RenX.Greetings/RenX_Greetings.cpp

@ -27,7 +27,7 @@ using namespace std::literals;
void RenX_GreetingsPlugin::RenX_OnJoin(RenX::Server &server, const RenX::PlayerInfo &player) {
auto sendMessage = [&](const std::string& raw_message) {
Jupiter::String msg = raw_message;
std::string msg = raw_message;
RenX::sanitizeTags(msg);
RenX::processTags(msg, &server, &player);

3
src/Plugins/RenX/RenX.HybridUUID/RenX_HybridUUID.cpp

@ -24,12 +24,13 @@
#include "RenX_HybridUUID.h"
using namespace Jupiter::literals;
using namespace std::literals;
Jupiter::StringS calc_uuid(RenX::PlayerInfo &player)
{
if (player.steamid != 0U)
return Jupiter::StringS::Format("S%.16llX", player.steamid);
return "N"_jrs + player.name;
return "N"s + player.name;
}
RenX_HybridUUIDPlugin::RenX_HybridUUIDPlugin()

108
src/Plugins/RenX/RenX.Ladder.Web/RenX_Ladder_Web.cpp

@ -266,10 +266,11 @@ Jupiter::String RenX_Ladder_WebPlugin::generate_entry_table(RenX::LadderDatabase
}
// append rows
Jupiter::String row(256);
std::string row;
row.reserve(256);
while (count != 0) {
row = RenX_Ladder_WebPlugin::entry_table_row;
row.replace(RenX::tags->INTERNAL_OBJECT_TAG, db->getName());
RenX::replace_tag(row, RenX::tags->INTERNAL_OBJECT_TAG, db->getName());
RenX::processTags(row, *node);
result += row;
node = node->next;
@ -286,22 +287,23 @@ Jupiter::String RenX_Ladder_WebPlugin::generate_entry_table(RenX::LadderDatabase
return result;
}
Jupiter::String *RenX_Ladder_WebPlugin::generate_ladder_page(RenX::LadderDatabase *db, uint8_t format, size_t index, size_t count, const Jupiter::HTTP::HTMLFormResponse& query_params) {
Jupiter::String *result = new Jupiter::String(2048);
std::string* RenX_Ladder_WebPlugin::generate_ladder_page(RenX::LadderDatabase *db, uint8_t format, size_t index, size_t count, const Jupiter::HTTP::HTMLFormResponse& query_params) {
std::string* result = new std::string();
result->reserve(2048);
if ((format & this->FLAG_INCLUDE_PAGE_HEADER) != 0) // Header
result->concat(RenX_Ladder_WebPlugin::header);
result->append(RenX_Ladder_WebPlugin::header);
if ((format & this->FLAG_INCLUDE_SEARCH) != 0) // Search
result->concat(generate_search(db));
result->append(generate_search(db));
if ((format & this->FLAG_INCLUDE_SELECTOR) != 0) // Selector
result->concat(generate_database_selector(db, query_params));
result->append(generate_database_selector(db, query_params));
result->concat(this->generate_entry_table(db, format, index, count));
result->append(this->generate_entry_table(db, format, index, count));
if ((format & this->FLAG_INCLUDE_PAGE_FOOTER) != 0) // Footer
result->concat(RenX_Ladder_WebPlugin::footer);
result->append(RenX_Ladder_WebPlugin::footer);
return result;
}
@ -310,70 +312,73 @@ Jupiter::String *RenX_Ladder_WebPlugin::generate_ladder_page(RenX::LadderDatabas
// include_header | include_footer | include_any_headers | include_any_footers
/** Search page */
Jupiter::String *RenX_Ladder_WebPlugin::generate_search_page(RenX::LadderDatabase *db, uint8_t format, size_t start_index, size_t count, std::string_view name, const Jupiter::HTTP::HTMLFormResponse& query_params) {
Jupiter::String *result = new Jupiter::String(2048);
std::string* RenX_Ladder_WebPlugin::generate_search_page(RenX::LadderDatabase *db, uint8_t format, size_t start_index, size_t count, std::string_view name, const Jupiter::HTTP::HTMLFormResponse& query_params) {
std::string* result = new std::string();
result->reserve(2048);
if ((format & this->FLAG_INCLUDE_PAGE_HEADER) != 0) // Header
result->concat(RenX_Ladder_WebPlugin::header);
result->append(RenX_Ladder_WebPlugin::header);
if ((format & this->FLAG_INCLUDE_SEARCH) != 0) // Search
result->concat(generate_search(db));
result->append(generate_search(db));
if ((format & this->FLAG_INCLUDE_SELECTOR) != 0) // Selector
result->concat(generate_database_selector(db, query_params));
result->append(generate_database_selector(db, query_params));
if (db->getEntries() == 0) { // No ladder data
result->concat("Error: No ladder data"_jrs);
result->append("Error: No ladder data"_jrs);
if ((format & this->FLAG_INCLUDE_PAGE_FOOTER) != 0) // Footer
result->concat(RenX_Ladder_WebPlugin::footer);
result->append(RenX_Ladder_WebPlugin::footer);
return result;
}
if ((format & this->FLAG_INCLUDE_DATA_HEADER) != 0) // Data header
result->concat(RenX_Ladder_WebPlugin::ladder_table_header);
result->append(RenX_Ladder_WebPlugin::ladder_table_header);
// append rows
Jupiter::String row(256);
std::string row;
row.reserve(256);
RenX::LadderDatabase::Entry *node = db->getHead();
while (node != nullptr) {
if (jessilib::findi(node->most_recent_name, name) != std::string::npos) { // match found
row = RenX_Ladder_WebPlugin::entry_table_row;
row.replace(RenX::tags->INTERNAL_OBJECT_TAG, db->getName());
RenX::replace_tag(row, RenX::tags->INTERNAL_OBJECT_TAG, db->getName());
RenX::processTags(row, *node);
result->concat(row);
result->append(row);
}
node = node->next;
}
if ((format & this->FLAG_INCLUDE_DATA_FOOTER) != 0) // Data footer
result->concat(RenX_Ladder_WebPlugin::ladder_table_footer);
result->append(RenX_Ladder_WebPlugin::ladder_table_footer);
if ((format & this->FLAG_INCLUDE_PAGE_FOOTER) != 0) // Footer
result->concat(RenX_Ladder_WebPlugin::footer);
result->append(RenX_Ladder_WebPlugin::footer);
return result;
}
/** Profile page */
Jupiter::String *RenX_Ladder_WebPlugin::generate_profile_page(RenX::LadderDatabase *db, uint8_t format, uint64_t steam_id, const Jupiter::HTTP::HTMLFormResponse& query_params) {
Jupiter::String *result = new Jupiter::String(2048);
std::string* RenX_Ladder_WebPlugin::generate_profile_page(RenX::LadderDatabase *db, uint8_t format, uint64_t steam_id, const Jupiter::HTTP::HTMLFormResponse& query_params) {
std::string* result = new std::string();
result->reserve(2048);
if ((format & this->FLAG_INCLUDE_PAGE_HEADER) != 0)
result->concat(RenX_Ladder_WebPlugin::header);
result->append(RenX_Ladder_WebPlugin::header);
if ((format & this->FLAG_INCLUDE_SEARCH) != 0) // Search
result->concat(generate_search(db));
result->append(generate_search(db));
if ((format & this->FLAG_INCLUDE_SELECTOR) != 0) // Selector
result->concat(generate_database_selector(db, query_params));
result->append(generate_database_selector(db, query_params));
if (db->getEntries() == 0) { // No ladder data
result->concat("Error: No ladder data"_jrs);
result->append("Error: No ladder data"_jrs);
if ((format & this->FLAG_INCLUDE_PAGE_FOOTER) != 0) // Footer
result->concat(RenX_Ladder_WebPlugin::footer);
result->append(RenX_Ladder_WebPlugin::footer);
return result;
}
@ -386,56 +391,56 @@ Jupiter::String *RenX_Ladder_WebPlugin::generate_profile_page(RenX::LadderDataba
}
if (entry == nullptr) {
result->concat("Error: Player not found"_jrs);
result->append("Error: Player not found"_jrs);
}
else {
Jupiter::String profile_data(RenX_Ladder_WebPlugin::entry_profile);
std::string profile_data(RenX_Ladder_WebPlugin::entry_profile);
RenX::processTags(profile_data, *entry);
result->concat(profile_data);
result->append(profile_data);
result->concat("<div class=\"profile-navigation\">"_jrs);
result->append("<div class=\"profile-navigation\">"_jrs);
if (entry->prev != nullptr)
{
profile_data = RenX_Ladder_WebPlugin::entry_profile_previous;
profile_data.replace(RenX::tags->INTERNAL_OBJECT_TAG, db->getName());
profile_data.replace(RenX::tags->INTERNAL_WEAPON_TAG, Jupiter::StringS::Format("%llu", entry->prev->steam_id));
RenX::replace_tag(profile_data, RenX::tags->INTERNAL_OBJECT_TAG, db->getName());
RenX::replace_tag(profile_data, RenX::tags->INTERNAL_WEAPON_TAG, Jupiter::StringS::Format("%llu", entry->prev->steam_id));
RenX::processTags(profile_data, *entry->prev);
result->concat(profile_data);
result->append(profile_data);
}
if (entry->next != nullptr)
{
profile_data = RenX_Ladder_WebPlugin::entry_profile_next;
profile_data.replace(RenX::tags->INTERNAL_OBJECT_TAG, db->getName());
profile_data.replace(RenX::tags->INTERNAL_VICTIM_STEAM_TAG, Jupiter::StringS::Format("%llu", entry->next->steam_id));
RenX::replace_tag(profile_data, RenX::tags->INTERNAL_OBJECT_TAG, db->getName());
RenX::replace_tag(profile_data, RenX::tags->INTERNAL_VICTIM_STEAM_TAG, Jupiter::StringS::Format("%llu", entry->next->steam_id));
RenX::processTags(profile_data, *entry->next);
result->concat(profile_data);
result->append(profile_data);
}
result->concat("</div>"_jrs);
result->append("</div>"_jrs);
}
if ((format & this->FLAG_INCLUDE_PAGE_FOOTER) != 0) // Footer
result->concat(RenX_Ladder_WebPlugin::footer);
result->append(RenX_Ladder_WebPlugin::footer);
return result;
}
/** Content functions */
Jupiter::ReadableString *generate_no_db_page(const Jupiter::HTTP::HTMLFormResponse& query_params) {
Jupiter::String *result = new Jupiter::String(pluginInstance.header);
std::string* generate_no_db_page(const Jupiter::HTTP::HTMLFormResponse& query_params) {
std::string* result = new std::string(pluginInstance.header);
if (RenX::ladder_databases.size() != 0) {
result->concat(generate_search(nullptr));
result->concat(generate_database_selector(nullptr, query_params));
result->concat("Error: No such database exists"_jrs);
result->append(generate_search(nullptr));
result->append(generate_database_selector(nullptr, query_params));
result->append("Error: No such database exists"_jrs);
}
else {
result->concat("Error: No ladder databases loaded"_jrs);
result->append("Error: No ladder databases loaded"_jrs);
}
result->concat(pluginInstance.footer);
result->append(pluginInstance.footer);
return result;
}
Jupiter::ReadableString *handle_ladder_page(std::string_view query_string) {
std::string* handle_ladder_page(std::string_view query_string) {
Jupiter::HTTP::HTMLFormResponse html_form_response(query_string);
RenX::LadderDatabase *db = RenX::default_ladder_database;
size_t start_index = 0, count = pluginInstance.getEntriesPerPage();
@ -464,7 +469,7 @@ Jupiter::ReadableString *handle_ladder_page(std::string_view query_string) {
return pluginInstance.generate_ladder_page(db, format, start_index, count, html_form_response);
}
Jupiter::ReadableString *handle_search_page(std::string_view query_string) {
std::string* handle_search_page(std::string_view query_string) {
Jupiter::HTTP::HTMLFormResponse html_form_response(query_string);
RenX::LadderDatabase *db = RenX::default_ladder_database;
uint8_t format = 0xFF;
@ -498,8 +503,7 @@ Jupiter::ReadableString *handle_search_page(std::string_view query_string) {
return pluginInstance.generate_search_page(db, format, start_index, count, name, html_form_response);
}
Jupiter::ReadableString *handle_profile_page(std::string_view query_string)
{
std::string* handle_profile_page(std::string_view query_string) {
Jupiter::HTTP::HTMLFormResponse html_form_response(query_string);
RenX::LadderDatabase *db = RenX::default_ladder_database;
uint64_t steam_id = 0;

14
src/Plugins/RenX/RenX.Ladder.Web/RenX_Ladder_Web.h

@ -39,9 +39,9 @@ public:
Jupiter::StringS header;
Jupiter::StringS footer;
Jupiter::String *generate_ladder_page(RenX::LadderDatabase *db, uint8_t format, size_t start_index, size_t count, const Jupiter::HTTP::HTMLFormResponse& query_params);
Jupiter::String *generate_search_page(RenX::LadderDatabase *db, uint8_t format, size_t start_index, size_t count, std::string_view name, const Jupiter::HTTP::HTMLFormResponse& query_params);
Jupiter::String *generate_profile_page(RenX::LadderDatabase *db, uint8_t format, uint64_t steam_id, const Jupiter::HTTP::HTMLFormResponse& query_params);
std::string* generate_ladder_page(RenX::LadderDatabase *db, uint8_t format, size_t start_index, size_t count, const Jupiter::HTTP::HTMLFormResponse& query_params);
std::string* generate_search_page(RenX::LadderDatabase *db, uint8_t format, size_t start_index, size_t count, std::string_view name, const Jupiter::HTTP::HTMLFormResponse& query_params);
std::string* generate_profile_page(RenX::LadderDatabase *db, uint8_t format, uint64_t steam_id, const Jupiter::HTTP::HTMLFormResponse& query_params);
inline size_t getEntriesPerPage() const { return this->entries_per_page; }
inline size_t getMinSearchNameLength() const { return this->min_search_name_length; };
@ -66,11 +66,11 @@ private:
std::string web_ladder_table_header_filename;
std::string web_ladder_table_footer_filename;
Jupiter::StringS entry_table_row, entry_profile, entry_profile_previous, entry_profile_next;
std::string entry_table_row, entry_profile, entry_profile_previous, entry_profile_next;
};
Jupiter::ReadableString *handle_ladder_page(std::string_view query_string);
Jupiter::ReadableString *handle_search_page(std::string_view query_string);
Jupiter::ReadableString *handle_profile_page(std::string_view query_string);
std::string* handle_ladder_page(std::string_view query_string);
std::string* handle_search_page(std::string_view query_string);
std::string* handle_profile_page(std::string_view query_string);
#endif // _RENX_LADDER_WEB_H

562
src/Plugins/RenX/RenX.Logging/RenX_Logging.cpp

File diff suppressed because it is too large

210
src/Plugins/RenX/RenX.Logging/RenX_Logging.h

@ -224,111 +224,111 @@ private:
unsigned int otherPublic : 1;
/** Event formats */
Jupiter::StringS playerRDNSFmt;
Jupiter::StringS playerIdentifyFmt;
Jupiter::StringS joinPublicFmt, joinAdminFmt, joinNoSteamAdminFmt;
Jupiter::StringS partFmt;
Jupiter::StringS kickFmt;
Jupiter::StringS nameChangeFmt;
Jupiter::StringS teamChangeFmt;
Jupiter::StringS speedHackFmt;
Jupiter::StringS playerFmt;
Jupiter::StringS chatFmt;
Jupiter::StringS teamChatFmt;
Jupiter::StringS radioChatFmt;
Jupiter::StringS hostChatFmt;
Jupiter::StringS hostPageFmt;
Jupiter::StringS adminMsgFmt;
Jupiter::StringS warnMsgFmt;
Jupiter::StringS pAdminMsgFmt;
Jupiter::StringS pWarnMsgFmt;
Jupiter::StringS otherChatFmt;
Jupiter::StringS deployFmt;
Jupiter::StringS mineDeployFmt;
Jupiter::StringS overMineFmt;
Jupiter::StringS disarmFmt;
Jupiter::StringS mineDisarmFmt;
Jupiter::StringS disarmNoOwnerFmt;
Jupiter::StringS mineDisarmNoOwnerFmt;
Jupiter::StringS explodeFmt;
Jupiter::StringS explodeNoOwnerFmt;
Jupiter::StringS suicideFmt;
Jupiter::StringS dieFmt;
Jupiter::StringS dieFmt2;
Jupiter::StringS killFmt;
Jupiter::StringS killFmt2;
Jupiter::StringS destroyBuildingFmt;
Jupiter::StringS destroyBuildingFmt2;
Jupiter::StringS destroyDefenceFmt;
Jupiter::StringS destroyDefenceFmt2;
Jupiter::StringS destroyVehicleFmt;
Jupiter::StringS destroyVehicleFmt2;
Jupiter::StringS captureFmt;
Jupiter::StringS neutralizeFmt;
Jupiter::StringS characterPurchaseFmt;
Jupiter::StringS itemPurchaseFmt;
Jupiter::StringS weaponPurchaseFmt;
Jupiter::StringS refillPurchaseFmt;
Jupiter::StringS vehiclePurchaseFmt;
Jupiter::StringS vehicleSpawnFmt;
Jupiter::StringS spawnFmt;
Jupiter::StringS botJoinFmt;
Jupiter::StringS vehicleCrateFmt;
Jupiter::StringS TSVehicleCrateFmt;
Jupiter::StringS RAVehicleCrateFmt;
Jupiter::StringS deathCrateFmt;
Jupiter::StringS moneyCrateFmt;
Jupiter::StringS characterCrateFmt;
Jupiter::StringS spyCrateFmt;
Jupiter::StringS refillCrateFmt;
Jupiter::StringS timeBombCrateFmt;
Jupiter::StringS speedCrateFmt;
Jupiter::StringS nukeCrateFmt;
Jupiter::StringS abductionCrateFmt;
Jupiter::StringS unspecifiedCrateFmt;
Jupiter::StringS otherCrateFmt;
Jupiter::StringS stealFmt;
Jupiter::StringS stealNoOwnerFmt;
Jupiter::StringS donateFmt;
Jupiter::StringS gameOverFmt;
Jupiter::StringS gameOverTieFmt;
Jupiter::StringS gameOverTieNoWinFmt;
Jupiter::StringS gameOverScoreFmt;
Jupiter::StringS gameFmt;
Jupiter::StringS executeFmt, playerExecuteFmt, devBotExecuteFmt;
Jupiter::StringS playerCommandSuccessFmt, playerCommandFailFmt;
Jupiter::StringS subscribeFmt;
Jupiter::StringS rconFmt;
Jupiter::StringS adminLoginFmt;
Jupiter::StringS adminGrantFmt;
Jupiter::StringS adminLogoutFmt;
Jupiter::StringS adminFmt;
Jupiter::StringS voteAddBotsFmt;
Jupiter::StringS voteChangeMapFmt;
Jupiter::StringS voteKickFmt;
Jupiter::StringS voteMineBanFmt;
Jupiter::StringS voteRemoveBotsFmt;
Jupiter::StringS voteRestartMapFmt;
Jupiter::StringS voteSurrenderFmt;
Jupiter::StringS voteSurveyFmt;
Jupiter::StringS voteOtherFmt;
Jupiter::StringS voteOverSuccessFmt;
Jupiter::StringS voteOverFailFmt;
Jupiter::StringS voteCancelFmt;
Jupiter::StringS voteFmt;
Jupiter::StringS mapChangeFmt;
Jupiter::StringS mapLoadFmt;
Jupiter::StringS mapStartFmt;
Jupiter::StringS mapFmt;
Jupiter::StringS demoRecordFmt, rconDemoRecordFmt;
Jupiter::StringS demoRecordStopFmt;
Jupiter::StringS demoFmt;
Jupiter::StringS logFmt;
Jupiter::StringS commandFmt;
Jupiter::StringS errorFmt;
Jupiter::StringS versionFmt;
Jupiter::StringS authorizedFmt;
Jupiter::StringS otherFmt;
std::string playerRDNSFmt;
std::string playerIdentifyFmt;
std::string joinPublicFmt, joinAdminFmt, joinNoSteamAdminFmt;
std::string partFmt;
std::string kickFmt;
std::string nameChangeFmt;
std::string teamChangeFmt;
std::string speedHackFmt;
std::string playerFmt;
std::string chatFmt;
std::string teamChatFmt;
std::string radioChatFmt;
std::string hostChatFmt;
std::string hostPageFmt;
std::string adminMsgFmt;
std::string warnMsgFmt;
std::string pAdminMsgFmt;
std::string pWarnMsgFmt;
std::string otherChatFmt;
std::string deployFmt;
std::string mineDeployFmt;
std::string overMineFmt;
std::string disarmFmt;
std::string mineDisarmFmt;
std::string disarmNoOwnerFmt;
std::string mineDisarmNoOwnerFmt;
std::string explodeFmt;
std::string explodeNoOwnerFmt;
std::string suicideFmt;
std::string dieFmt;
std::string dieFmt2;
std::string killFmt;
std::string killFmt2;
std::string destroyBuildingFmt;
std::string destroyBuildingFmt2;
std::string destroyDefenceFmt;
std::string destroyDefenceFmt2;
std::string destroyVehicleFmt;
std::string destroyVehicleFmt2;
std::string captureFmt;
std::string neutralizeFmt;
std::string characterPurchaseFmt;
std::string itemPurchaseFmt;
std::string weaponPurchaseFmt;
std::string refillPurchaseFmt;
std::string vehiclePurchaseFmt;
std::string vehicleSpawnFmt;
std::string spawnFmt;
std::string botJoinFmt;
std::string vehicleCrateFmt;
std::string TSVehicleCrateFmt;
std::string RAVehicleCrateFmt;
std::string deathCrateFmt;
std::string moneyCrateFmt;
std::string characterCrateFmt;
std::string spyCrateFmt;
std::string refillCrateFmt;
std::string timeBombCrateFmt;
std::string speedCrateFmt;
std::string nukeCrateFmt;
std::string abductionCrateFmt;
std::string unspecifiedCrateFmt;
std::string otherCrateFmt;
std::string stealFmt;
std::string stealNoOwnerFmt;
std::string donateFmt;
std::string gameOverFmt;
std::string gameOverTieFmt;
std::string gameOverTieNoWinFmt;
std::string gameOverScoreFmt;
std::string gameFmt;
std::string executeFmt, playerExecuteFmt, devBotExecuteFmt;
std::string playerCommandSuccessFmt, playerCommandFailFmt;
std::string subscribeFmt;
std::string rconFmt;
std::string adminLoginFmt;
std::string adminGrantFmt;
std::string adminLogoutFmt;
std::string adminFmt;
std::string voteAddBotsFmt;
std::string voteChangeMapFmt;
std::string voteKickFmt;
std::string voteMineBanFmt;
std::string voteRemoveBotsFmt;
std::string voteRestartMapFmt;
std::string voteSurrenderFmt;
std::string voteSurveyFmt;
std::string voteOtherFmt;
std::string voteOverSuccessFmt;
std::string voteOverFailFmt;
std::string voteCancelFmt;
std::string voteFmt;
std::string mapChangeFmt;
std::string mapLoadFmt;
std::string mapStartFmt;
std::string mapFmt;
std::string demoRecordFmt, rconDemoRecordFmt;
std::string demoRecordStopFmt;
std::string demoFmt;
std::string logFmt;
std::string commandFmt;
std::string errorFmt;
std::string versionFmt;
std::string authorizedFmt;
std::string otherFmt;
};
#endif // _RENX_LOGGING_H_HEADER

18
src/Plugins/RenX/RenX.Medals/RenX_Medals.cpp

@ -96,20 +96,20 @@ void congratPlayer(unsigned int, void *params)
delete congratPlayerData;
}
void RenX_MedalsPlugin::RenX_SanitizeTags(Jupiter::StringType &fmt) {
fmt.replace(RenX_MedalsPlugin::recsTag, this->INTERNAL_RECS_TAG);
fmt.replace(RenX_MedalsPlugin::noobTag, this->INTERNAL_NOOB_TAG);
fmt.replace(RenX_MedalsPlugin::worthTag, this->INTERNAL_WORTH_TAG);
void RenX_MedalsPlugin::RenX_SanitizeTags(std::string& fmt) {
RenX::replace_tag(fmt, RenX_MedalsPlugin::recsTag, this->INTERNAL_RECS_TAG);
RenX::replace_tag(fmt, RenX_MedalsPlugin::noobTag, this->INTERNAL_NOOB_TAG);
RenX::replace_tag(fmt, RenX_MedalsPlugin::worthTag, this->INTERNAL_WORTH_TAG);
}
void RenX_MedalsPlugin::RenX_ProcessTags(Jupiter::StringType &msg, const RenX::Server *server, const RenX::PlayerInfo *player, const RenX::PlayerInfo *, const RenX::BuildingInfo *) {
void RenX_MedalsPlugin::RenX_ProcessTags(std::string& msg, const RenX::Server *server, const RenX::PlayerInfo *player, const RenX::PlayerInfo *, const RenX::BuildingInfo *) {
if (player != nullptr) {
const Jupiter::ReadableString &recs = RenX_MedalsPlugin::medalsFile.get(player->uuid, "Recs"_jrs);
const Jupiter::ReadableString &noobs = RenX_MedalsPlugin::medalsFile.get(player->uuid, "Noobs"_jrs);
msg.replace(this->INTERNAL_RECS_TAG, recs);
msg.replace(this->INTERNAL_NOOB_TAG, noobs);
msg.replace(this->INTERNAL_WORTH_TAG, Jupiter::StringS::Format("%d", Jupiter::from_string<int>(recs) - Jupiter::from_string<int>(noobs)));
RenX::replace_tag(msg, this->INTERNAL_RECS_TAG, recs);
RenX::replace_tag(msg, this->INTERNAL_NOOB_TAG, noobs);
RenX::replace_tag(msg, this->INTERNAL_WORTH_TAG, Jupiter::StringS::Format("%d", Jupiter::from_string<int>(recs) - Jupiter::from_string<int>(noobs)));
}
}
@ -142,7 +142,7 @@ void RenX_MedalsPlugin::RenX_OnJoin(RenX::Server &server, const RenX::PlayerInfo
std::string_view msg = section->get(Jupiter::StringS::Format("%u", (rand() % table_size) + 1));
if (!msg.empty()) {
Jupiter::StringS tagged_msg = static_cast<Jupiter::ReferenceString>(msg);
std::string tagged_msg = static_cast<std::string>(msg);
RenX::sanitizeTags(tagged_msg);
RenX::processTags(tagged_msg, &server, &player);
server.sendMessage(tagged_msg);

4
src/Plugins/RenX/RenX.Medals/RenX_Medals.h

@ -43,8 +43,8 @@ int getWorth(const RenX::PlayerInfo &player);
class RenX_MedalsPlugin : public RenX::Plugin
{
public: // RenX::Plugin
void RenX_SanitizeTags(Jupiter::StringType &fmt) override;
void RenX_ProcessTags(Jupiter::StringType &msg, const RenX::Server *server, const RenX::PlayerInfo *player, const RenX::PlayerInfo *victim, const RenX::BuildingInfo *building) override;
void RenX_SanitizeTags(std::string& fmt) override;
void RenX_ProcessTags(std::string& msg, const RenX::Server *server, const RenX::PlayerInfo *player, const RenX::PlayerInfo *victim, const RenX::BuildingInfo *building) override;
void RenX_OnPlayerCreate(RenX::Server &server, const RenX::PlayerInfo &player) override;
void RenX_OnPlayerDelete(RenX::Server &server, const RenX::PlayerInfo &player) override;
void RenX_OnJoin(RenX::Server &server, const RenX::PlayerInfo &player) override;

48
src/Plugins/RenX/RenX.ServerList/RenX_ServerList.cpp

@ -150,15 +150,15 @@ size_t RenX_ServerListPlugin::getListedPlayerCount(const RenX::Server& server) {
return std::min(server.activePlayers(false).size(), player_limit);
}
Jupiter::ReadableString *RenX_ServerListPlugin::getServerListJSON() {
std::string* RenX_ServerListPlugin::getServerListJSON() {
return &m_server_list_json;
}
Jupiter::ReadableString *RenX_ServerListPlugin::getMetadataJSON() {
std::string* RenX_ServerListPlugin::getMetadataJSON() {
return &m_metadata_json;
}
Jupiter::ReadableString *RenX_ServerListPlugin::getMetadataPrometheus() {
std::string* RenX_ServerListPlugin::getMetadataPrometheus() {
return &m_metadata_prometheus;
}
@ -166,13 +166,13 @@ constexpr const char *json_bool_as_cstring(bool in) {
return in ? "true" : "false";
}
Jupiter::StringS RenX_ServerListPlugin::server_as_json(const RenX::Server &server) {
Jupiter::String server_json_block(128);
std::string RenX_ServerListPlugin::server_as_json(const RenX::Server &server) {
Jupiter::String server_json_block(128); // TODO: use std::string
ListServerInfo serverInfo = getListServerInfo(server);
if (serverInfo.hostname.empty()) {
server_json_block = "null";
return server_json_block;
return static_cast<std::string>(server_json_block);
}
Jupiter::String server_name = jsonify(server.getName());
@ -184,7 +184,7 @@ Jupiter::StringS RenX_ServerListPlugin::server_as_json(const RenX::Server &serve
// Some members we only include if they're populated
if (!server_prefix.empty()) {
server_prefix = R"json("NamePrefix":")json"_jrs + server_prefix + "\","_jrs;
server_prefix = R"json("NamePrefix":")json"s + server_prefix + "\","_jrs;
}
std::string server_attributes;
@ -230,7 +230,7 @@ Jupiter::StringS RenX_ServerListPlugin::server_as_json(const RenX::Server &serve
server_json_block += '}';
return server_json_block;
return static_cast<std::string>(server_json_block);
}
std::string RenX_ServerListPlugin::server_as_server_details_json(const RenX::Server& server) {
@ -315,8 +315,8 @@ std::string RenX_ServerListPlugin::server_as_server_details_json(const RenX::Ser
return server_json_block;
}
Jupiter::StringS RenX_ServerListPlugin::server_as_long_json(const RenX::Server &server) {
Jupiter::String server_json_block(128);
std::string RenX_ServerListPlugin::server_as_long_json(const RenX::Server &server) {
Jupiter::String server_json_block(128); // TODO: use std::string
ListServerInfo serverInfo = getListServerInfo(server);
Jupiter::String server_name = jsonify(server.getName());
@ -456,7 +456,7 @@ Jupiter::StringS RenX_ServerListPlugin::server_as_long_json(const RenX::Server &
server_json_block += "\n\t}"_jrs;
return server_json_block;
return static_cast<std::string>(server_json_block);
}
void RenX_ServerListPlugin::addServerToServerList(RenX::Server &server) {
@ -468,7 +468,7 @@ void RenX_ServerListPlugin::addServerToServerList(RenX::Server &server) {
m_server_list_json = '[';
}
else {
m_server_list_json.truncate(1); // remove trailing ']'.
m_server_list_json.pop_back(); // remove trailing ']'.
m_server_list_json += ',';
}
m_server_list_json += server_json_block;
@ -526,10 +526,11 @@ void RenX_ServerListPlugin::updateMetadata() {
}
}
m_metadata_json.format(R"json({"player_count":%zu,"server_count":%u})json",
// TODO: not rely on StringS
m_metadata_json = Jupiter::StringS::Format(R"json({"player_count":%zu,"server_count":%u})json",
player_count, server_count);
m_metadata_prometheus.format("player_count %zu\nserver_count %u\n",
m_metadata_prometheus = Jupiter::StringS::Format("player_count %zu\nserver_count %u\n",
player_count, server_count);
}
@ -619,15 +620,16 @@ void RenX_ServerListPlugin::RenX_OnMapLoad(RenX::Server &server, const Jupiter::
// Plugin instantiation and entry point.
RenX_ServerListPlugin pluginInstance;
Jupiter::ReadableString *handle_server_list_page(std::string_view) {
std::string* handle_server_list_page(std::string_view) {
return pluginInstance.getServerListJSON();
}
Jupiter::ReadableString *handle_server_list_long_page(std::string_view) {
std::string* handle_server_list_long_page(std::string_view) {
const auto& servers = RenX::getCore()->getServers();
size_t index = 0;
RenX::Server *server;
Jupiter::String *server_list_long_json = new Jupiter::String(256 * servers.size());
std::string *server_list_long_json = new std::string;
server_list_long_json->reserve(256 * servers.size());
// regenerate server_list_json
@ -657,7 +659,7 @@ Jupiter::ReadableString *handle_server_list_long_page(std::string_view) {
return server_list_long_json;
}
Jupiter::ReadableString *handle_server_page(std::string_view query_string) {
std::string* handle_server_page(std::string_view query_string) {
Jupiter::HTTP::HTMLFormResponse html_form_response(query_string);
Jupiter::ReferenceString address;
int port = 0;
@ -666,7 +668,7 @@ Jupiter::ReadableString *handle_server_page(std::string_view query_string) {
// parse form data
if (html_form_response.table.size() < 2)
return new Jupiter::ReferenceString();
return new std::string();
if (html_form_response.table.size() != 0) {
address = html_form_response.tableGet("ip"sv, address);
@ -679,7 +681,7 @@ Jupiter::ReadableString *handle_server_page(std::string_view query_string) {
while (true) {
if (index == servers.size())
return new Jupiter::ReferenceString();
return new std::string();
server = servers[index];
if (address == pluginInstance.getListServerAddress(*server) && server->getPort() == port)
@ -690,14 +692,14 @@ Jupiter::ReadableString *handle_server_page(std::string_view query_string) {
// return server data
pluginInstance.touchDetails(*server);
return new Jupiter::ReferenceString(server->varData[pluginInstance.getName()].get("j"_jrs));
return new std::string(server->varData[pluginInstance.getName()].get("j"_jrs));
}
Jupiter::ReadableString *handle_metadata_page(std::string_view) {
std::string* handle_metadata_page(std::string_view) {
return pluginInstance.getMetadataJSON();
}
Jupiter::ReadableString *handle_metadata_prometheus_page(std::string_view) {
std::string* handle_metadata_prometheus_page(std::string_view) {
return pluginInstance.getMetadataPrometheus();
}

22
src/Plugins/RenX/RenX.ServerList/RenX_ServerList.h

@ -35,9 +35,9 @@ public: // RenX_ServerListPlugin
size_t getListedPlayerCount(const RenX::Server& server);
Jupiter::ReadableString *getServerListJSON();
Jupiter::ReadableString* getMetadataJSON();
Jupiter::ReadableString* getMetadataPrometheus();
std::string* getServerListJSON();
std::string* getMetadataJSON();
std::string* getMetadataPrometheus();
void addServerToServerList(RenX::Server &server);
void updateServerList();
@ -46,9 +46,9 @@ public: // RenX_ServerListPlugin
void touchDetails(RenX::Server& in_server);
std::string_view getListServerAddress(const RenX::Server& server);
ListServerInfo getListServerInfo(const RenX::Server& server);
Jupiter::StringS server_as_json(const RenX::Server &server);
std::string server_as_json(const RenX::Server &server);
std::string server_as_server_details_json(const RenX::Server& server);
Jupiter::StringS server_as_long_json(const RenX::Server &server);
std::string server_as_long_json(const RenX::Server &server);
virtual bool initialize() override;
~RenX_ServerListPlugin();
@ -61,15 +61,15 @@ public: // RenX::Plugin
void RenX_OnMapLoad(RenX::Server &server, const Jupiter::ReadableString &map) override;
private:
Jupiter::StringS m_server_list_json, m_metadata_json, m_metadata_prometheus;
std::string m_server_list_json, m_metadata_json, m_metadata_prometheus;
std::string m_web_hostname, m_web_path;
std::string m_server_list_page_name, m_server_list_long_page_name, m_server_page_name, m_metadata_page_name, m_metadata_prometheus_page_name;
};
Jupiter::ReadableString *handle_server_list_page(std::string_view);
Jupiter::ReadableString *handle_server_list_long_page(std::string_view);
Jupiter::ReadableString *handle_server_page(std::string_view);
Jupiter::ReadableString *handle_metadata_page(std::string_view);
Jupiter::ReadableString *handle_metadata_prometheus_page(std::string_view);
std::string* handle_server_list_page(std::string_view);
std::string* handle_server_list_long_page(std::string_view);
std::string* handle_server_page(std::string_view);
std::string* handle_metadata_page(std::string_view);
std::string* handle_metadata_prometheus_page(std::string_view);
#endif // _RENX_SERVERLIST_H_HEADER

Loading…
Cancel
Save