Browse Source

Updated Jupiter and refactored code as necessary. Will improve config file formats over time to use proper subsections.

pull/4/head
Jessica James 8 years ago
parent
commit
3f22f2646b
  1. 32
      Bot/IRC_Bot.cpp
  2. 2
      Bot/IRC_Bot.h
  3. 13
      Bot/Jupiter_Bot.h
  4. 40
      Bot/Main.cpp
  5. 6
      Bot/ServerManager.h
  6. 3
      ChannelRelay/ChannelRelay.cpp
  7. 1
      Configs/IRC.Core.ini
  8. 1
      CoreCommands/CoreCommands.cpp
  9. 3
      HTTPServer/HTTPServer.cpp
  10. 2
      IRC.Core/IRC_Core.cpp
  11. 2
      Jupiter
  12. 15
      RenX.Announcements/RenX_Announcements.cpp
  13. 3
      RenX.Announcements/RenX_Announcements.h
  14. 18
      RenX.Commands/RenX_Commands.cpp
  15. 15
      RenX.Core/RenX_BanDatabase.cpp
  16. 2
      RenX.Core/RenX_BanDatabase.h
  17. 4
      RenX.Core/RenX_BuildingInfo.h
  18. 9
      RenX.Core/RenX_Core.cpp
  19. 6
      RenX.Core/RenX_Core.h
  20. 3
      RenX.Core/RenX_ExemptionDatabase.cpp
  21. 49
      RenX.Core/RenX_Functions.cpp
  22. 4
      RenX.Core/RenX_Functions.h
  23. 4
      RenX.Core/RenX_PlayerInfo.h
  24. 326
      RenX.Core/RenX_Server.cpp
  25. 10
      RenX.Core/RenX_Server.h
  26. 351
      RenX.Core/RenX_Tags.cpp
  27. 1
      RenX.Core/RenX_TeamInfo.h
  28. 11
      RenX.ExcessiveHeadshots/ExcessiveHeadshots.cpp
  29. 13
      RenX.ExtraLogging/RenX_ExtraLogging.cpp
  30. 11
      RenX.Greetings/RenX_Greetings.cpp
  31. 25
      RenX.IRCJoin/RenX_IRCJoin.cpp
  32. 9
      RenX.Ladder.All-Time/RenX_Ladder_All_Time.cpp
  33. 9
      RenX.Ladder.Daily/RenX_Ladder_Daily.cpp
  34. 9
      RenX.Ladder.Monthly/RenX_Ladder_Monthly.cpp
  35. 75
      RenX.Ladder.Web/RenX_Ladder_Web.cpp
  36. 7
      RenX.Ladder.Web/RenX_Ladder_Web.h
  37. 11
      RenX.Ladder.Weekly/RenX_Ladder_Weekly.cpp
  38. 9
      RenX.Ladder.Yearly/RenX_Ladder_Yearly.cpp
  39. 15
      RenX.Ladder/RenX_Ladder.cpp
  40. 17
      RenX.Listen/RenX_Listen.cpp
  41. 373
      RenX.Logging/RenX_Logging.cpp
  42. 135
      RenX.Medals/RenX_Medals.cpp
  43. 10
      RenX.Medals/RenX_Medals.h
  44. 3
      RenX.MinPlayers/RenX_MinPlayers.cpp
  45. 338
      RenX.ModSystem/RenX_ModSystem.cpp
  46. 3
      RenX.ModSystem/RenX_ModSystem.h
  47. 21
      RenX.ServerList/RenX_ServerList.cpp
  48. 13
      RenX.SetJoin/RenX_SetJoin.cpp
  49. 3
      RenX.SetJoin/RenX_SetJoin.h
  50. 50
      RenX.Warn/RenX_Warn.cpp
  51. 33
      SetJoin/SetJoin.cpp
  52. 2
      SetJoin/SetJoin.h

32
Bot/IRC_Bot.cpp

@ -19,7 +19,7 @@
#include <cstdio>
#include <cstring>
#include <cctype>
#include "Jupiter/INIFile.h"
#include "Jupiter/Config.h"
#include "Jupiter/Plugin.h"
#include "Jupiter/Functions.h"
#include "IRC_Bot.h"
@ -27,7 +27,7 @@
using namespace Jupiter::literals;
IRC_Bot::IRC_Bot(const Jupiter::INIFile::Section *in_primary_section, const Jupiter::INIFile::Section *in_secondary_section) : Client(in_primary_section, in_secondary_section)
IRC_Bot::IRC_Bot(const Jupiter::Config *in_primary_section, const Jupiter::Config *in_secondary_section) : Client(in_primary_section, in_secondary_section)
{
IRC_Bot::commandPrefix = this->readConfigValue("Prefix"_jrs);
@ -108,28 +108,24 @@ void IRC_Bot::setCommandAccessLevels(IRCCommand *in_command)
{
auto set_command_access_levels = [this, in_command](const Jupiter::ReadableString &section_name)
{
Jupiter::INIFile::Section *section = serverManager->getConfig().getSection(section_name);
Jupiter::Config *section = serverManager->getConfig().getSection(section_name);
if (section != nullptr)
{
size_t section_length = section->size();
Jupiter::INIFile::Section::KeyValuePair *pair;
auto read_section = [this, section, in_command](Jupiter::HashTable::Bucket::Entry &in_entry)
{
size_t tmp_index;
Jupiter::ReferenceString tmp_key, tmp_sub_key;
IRCCommand *command;
for (size_t pair_index = 0; pair_index != section_length; ++pair_index)
{
pair = section->getPair(pair_index);
tmp_index = pair->getKey().find('.');
tmp_index = in_entry.key.find('.');
if (tmp_index != Jupiter::INVALID_INDEX)
{
// non-default access assignment
tmp_key.set(pair->getKey().ptr(), tmp_index);
tmp_key.set(in_entry.key.ptr(), tmp_index);
tmp_sub_key = pair->getKey();
tmp_sub_key = in_entry.key;
tmp_sub_key.shiftRight(tmp_index + 1);
if (tmp_sub_key.findi("Type."_jrs) == 0)
@ -138,7 +134,7 @@ void IRC_Bot::setCommandAccessLevels(IRCCommand *in_command)
command = this->getCommand(tmp_key);
if (command != nullptr && (in_command == nullptr || in_command == command))
command->setAccessLevel(tmp_sub_key.asInt(), pair->getValue().asInt());
command->setAccessLevel(tmp_sub_key.asInt(), in_entry.value.asInt());
}
else if (tmp_sub_key.findi("Channel."_jrs) == 0)
{
@ -147,21 +143,21 @@ void IRC_Bot::setCommandAccessLevels(IRCCommand *in_command)
// Assign access level to command (if command exists)
command = this->getCommand(tmp_key);
if (command != nullptr && (in_command == nullptr || in_command == command))
command->setAccessLevel(tmp_sub_key, pair->getValue().asInt());
command->setAccessLevel(tmp_sub_key, in_entry.value.asInt());
}
}
else
{
// Assign access level to command (if command exists)
command = this->getCommand(pair->getKey());
command = this->getCommand(in_entry.key);
if (command != nullptr && (in_command == nullptr || in_command == command))
command->setAccessLevel(pair->getValue().asInt());
}
command->setAccessLevel(in_entry.value.asInt());
}
};
}
};
const Jupiter::INIFile::Section *section;
const Jupiter::Config *section;
section = this->getSecondaryConfigSection();
if (section != nullptr)

2
Bot/IRC_Bot.h

@ -110,7 +110,7 @@ public:
bool OnBadRehash(bool removed) { return removed; };
/** Constructor for IRC_Bot */
IRC_Bot(const Jupiter::INIFile::Section *in_primary_section, const Jupiter::INIFile::Section *in_secondary_section);
IRC_Bot(const Jupiter::Config *in_primary_section, const Jupiter::Config *in_secondary_section);
/** Destructor for IRC_Bot */
~IRC_Bot();

13
Bot/Jupiter_Bot.h

@ -38,11 +38,20 @@
#if defined __cplusplus
#include <chrono>
/** Forward declaration */
namespace Jupiter { class INIFile; }
namespace Jupiter { class Config; }
namespace Jupiter
{
/** Application config file */
extern Jupiter::INIFile *g_config;
extern Jupiter::Config *g_config;
/** Application start time */
extern std::chrono::steady_clock::time_point g_start_time;
}
#endif // __cplusplus

40
Bot/Main.cpp

@ -23,8 +23,7 @@
#include <thread>
#include <mutex>
#include "Jupiter/Functions.h"
#include "Jupiter/INIFile.h"
#include "Jupiter/Queue.h"
#include "Jupiter/INIConfig.h"
#include "Jupiter/Socket.h"
#include "Jupiter/Plugin.h"
#include "Jupiter/Timer.h"
@ -38,8 +37,9 @@
using namespace Jupiter::literals;
Jupiter::INIFile o_config;
Jupiter::INIFile *g_config = &o_config;
Jupiter::INIConfig o_config;
Jupiter::Config *Jupiter::g_config = &o_config;
std::chrono::steady_clock::time_point Jupiter::g_start_time = std::chrono::steady_clock::now();
#define INPUT_BUFFER_SIZE 2048
@ -127,20 +127,24 @@ int main(int argc, const char **args)
printf("Warning: Unknown command line argument \"%s\" specified. Ignoring...", args[i]);
}
std::chrono::steady_clock::time_point load_start = std::chrono::steady_clock::now();
puts("Loading config file...");
if (!o_config.readFile(configFileName))
if (!o_config.read(configFileName))
{
puts("Unable to read config file. Closing...");
exit(0);
}
puts("Config loaded.");
double time_taken = static_cast<double>(std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::steady_clock::now() - load_start).count()) / 1000.0;
printf("Config loaded (%fms)." ENDL, time_taken);
if (plugins_directory.isEmpty())
plugins_directory = o_config.get(Jupiter::ReferenceString::empty, "PluginsDirectory"_jrs);
plugins_directory = o_config.get("PluginsDirectory"_jrs);
if (configs_directory.isEmpty())
configs_directory = o_config.get(Jupiter::ReferenceString::empty, "ConfigsDirectory"_jrs);
configs_directory = o_config.get("ConfigsDirectory"_jrs);
if (plugins_directory.isNotEmpty())
{
@ -155,7 +159,7 @@ int main(int argc, const char **args)
}
puts("Loading plugins...");
const Jupiter::ReadableString &pluginList = o_config.get(Jupiter::ReferenceString::empty, "Plugins"_jrs);
const Jupiter::ReadableString &pluginList = o_config.get("Plugins"_jrs);
if (pluginList.isEmpty())
puts("No plugins to load!");
else
@ -164,12 +168,20 @@ int main(int argc, const char **args)
unsigned int nPlugins = pluginList.wordCount(WHITESPACE);
printf("Attempting to load %u plugins..." ENDL, nPlugins);
bool load_success;
for (unsigned int i = 0; i < nPlugins; i++)
{
Jupiter::ReferenceString plugin = Jupiter::ReferenceString::getWord(pluginList, i, WHITESPACE);
if (Jupiter::Plugin::load(plugin) == nullptr)
fprintf(stderr, "WARNING: Failed to load plugin \"%.*s\"!" ENDL, plugin.size(), plugin.ptr());
else printf("\"%.*s\" loaded successfully." ENDL, plugin.size(), plugin.ptr());
load_start = std::chrono::steady_clock::now();
load_success = Jupiter::Plugin::load(plugin) != nullptr;
time_taken = static_cast<double>(std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::steady_clock::now() - load_start).count()) / 1000.0;
if (load_success)
printf("\"%.*s\" loaded successfully (%fms)." ENDL, plugin.size(), plugin.ptr(), time_taken);
else
fprintf(stderr, "WARNING: Failed to load plugin \"%.*s\" (%fms)!" ENDL, plugin.size(), plugin.ptr(), time_taken);
}
// OnPostInitialize
@ -177,6 +189,8 @@ int main(int argc, const char **args)
Jupiter::plugins->get(index)->OnPostInitialize();
}
printf("Initialization completed in %f milliseconds." ENDL, static_cast<double>(std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::steady_clock::now() - Jupiter::g_start_time).count()) / 1000.0 );
if (consoleCommands->size() > 0)
printf("%u Console Commands have been initialized%s" ENDL, consoleCommands->size(), getConsoleCommand("help"_jrs) == nullptr ? "." : "; type \"help\" for more information.");
if (IRCMasterCommandList->size() > 0)
@ -190,7 +204,7 @@ int main(int argc, const char **args)
Jupiter::Plugin::free(index);
else
++index;
Jupiter_checkTimers();
Jupiter::Timer::check();
if (console_input.input_mutex.try_lock())
{

6
Bot/ServerManager.h

@ -147,14 +147,14 @@ public:
*
* @return Configuration file being used
*/
inline Jupiter::INIFile &getConfig() const { return *this->m_config; };
inline Jupiter::Config &getConfig() const { return *this->m_config; };
/**
* @brief Sets the configuration file to use
*
* @param Reference to the config file to use
*/
inline void setConfig(Jupiter::INIFile &in_config) { this->m_config = &in_config; };
inline void setConfig(Jupiter::Config &in_config) { this->m_config = &in_config; };
/**
* Destructor for the ServerManager class.
@ -166,7 +166,7 @@ private:
Jupiter::ArrayList<IRC_Bot> servers;
/** Config to read data from */
Jupiter::INIFile *m_config = g_config;
Jupiter::Config *m_config = Jupiter::g_config;
};
/** Pointer to an instance of the server manager. Note: DO NOT DELETE OR FREE THIS POINTER. */

3
ChannelRelay/ChannelRelay.cpp

@ -17,7 +17,6 @@
*/
#include "Jupiter/IRC_Client.h"
#include "Jupiter/INIFile.h"
#include "Jupiter/String.h"
#include "ServerManager.h"
#include "IRC_Bot.h"
@ -27,7 +26,7 @@ using namespace Jupiter::literals;
bool ChannelRelayPlugin::initialize()
{
Jupiter::ReferenceString str = this->config.get(Jupiter::ReferenceString::empty, "Types"_jrs);
Jupiter::ReferenceString str = this->config.get("Types"_jrs);
unsigned int words = str.wordCount(WHITESPACE);
if (words == 0)
return false;

1
Configs/IRC.Core.ini

@ -66,7 +66,6 @@ Nick=RenXBot
AltNick=RenXBot`
RealName=Jupiter IRC Framework by Agent
AutoPartMessage=Auto-Parting Enabled
AutoReconnect=1
MaxReconnectAttempts=3
AutoReconnectDelay=5
PrintOutput=1

1
CoreCommands/CoreCommands.cpp

@ -17,7 +17,6 @@
*/
#include <cstring>
#include "Jupiter/INIFile.h"
#include "Jupiter/Functions.h"
#include "Jupiter/ArrayList.h"
#include "CoreCommands.h"

3
HTTPServer/HTTPServer.cpp

@ -16,14 +16,13 @@
* Written by Jessica James <jessica.aj@outlook.com>
*/
#include "Jupiter/INIFile.h"
#include "HTTPServer.h"
using namespace Jupiter::literals;
HTTPServerPlugin::HTTPServerPlugin()
{
HTTPServerPlugin::server.bind(this->config.get(Jupiter::ReferenceString::empty, "BindAddress"_jrs, "0.0.0.0"_jrs), this->config.getInt(Jupiter::ReferenceString::empty, "BindPort"_jrs, 80));
HTTPServerPlugin::server.bind(this->config.get("BindAddress"_jrs, "0.0.0.0"_jrs), this->config.get<uint16_t>("BindPort"_jrs, 80));
}
int HTTPServerPlugin::think()

2
IRC.Core/IRC_Core.cpp

@ -30,7 +30,7 @@ IRCCorePlugin::~IRCCorePlugin()
bool IRCCorePlugin::initialize()
{
const Jupiter::ReadableString &serverList = this->config.get(Jupiter::ReferenceString::empty, "Servers"_jrs);
const Jupiter::ReadableString &serverList = this->config.get("Servers"_jrs);
if (serverList != nullptr)
{
serverManager->setConfig(this->config);

2
Jupiter

@ -1 +1 @@
Subproject commit ae3294c72b799178bc79b312fe43f34c28deca86
Subproject commit d52d8cbbfbe8f8c1b74d01096d7d90c0c46d9518

15
RenX.Announcements/RenX_Announcements.cpp

@ -17,20 +17,21 @@
*/
#include "Jupiter/IRC_Client.h"
#include "Jupiter/INIFile.h"
#include "RenX_Announcements.h"
#include "RenX_Core.h"
#include "RenX_Server.h"
#include "RenX_Tags.h"
using namespace Jupiter::literals;
RenX_AnnouncementsPlugin pluginInstance;
void announce_(unsigned int x)
void announce_(unsigned int x, void*)
{
pluginInstance.announce(x);
pluginInstance.announce(x, nullptr);
}
void RenX_AnnouncementsPlugin::announce(unsigned int)
void RenX_AnnouncementsPlugin::announce(unsigned int, void *)
{
if (RenX_AnnouncementsPlugin::random == false)
{
@ -73,15 +74,15 @@ int RenX_AnnouncementsPlugin::OnRehash()
bool RenX_AnnouncementsPlugin::initialize()
{
RenX_AnnouncementsPlugin::random = this->config.getBool(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Random"));
RenX_AnnouncementsPlugin::random = this->config.get<bool>("Random"_jrs);
RenX_AnnouncementsPlugin::announcementsFile.load(this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("File"), STRING_LITERAL_AS_REFERENCE("Announcements.txt")));
RenX_AnnouncementsPlugin::announcementsFile.load(this->config.get("File"_jrs, "Announcements.txt"_jrs));
if (RenX_AnnouncementsPlugin::announcementsFile.getLineCount() == 0)
{
fputs("[RenX.Announcements] ERROR: No announcements loaded." ENDL, stderr);
return false;
}
time_t delay = this->config.getInt(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Delay"), 60);
std::chrono::milliseconds delay = std::chrono::seconds(this->config.get<long long>("Delay"_jrs, 60));
RenX_AnnouncementsPlugin::timer = new Jupiter::Timer(0, delay, announce_);
if (RenX_AnnouncementsPlugin::random == false)
RenX_AnnouncementsPlugin::lastLine = RenX_AnnouncementsPlugin::announcementsFile.getLineCount() - 1;

3
RenX.Announcements/RenX_Announcements.h

@ -30,7 +30,7 @@
class RenX_AnnouncementsPlugin : public RenX::Plugin
{
public:
void announce(unsigned int);
void announce(unsigned int, void *);
public: // Jupiter::Plugin
virtual bool initialize() override;
@ -41,7 +41,6 @@ private:
bool random;
unsigned int lastLine;
Jupiter::Timer *timer;
//Jupiter::StringS modsTag;
Jupiter::File announcementsFile;
};

18
RenX.Commands/RenX_Commands.cpp

@ -31,20 +31,22 @@
using namespace Jupiter::literals;
const Jupiter::ReferenceString RxCommandsSection = "RenX.Commands"_jrs;
inline bool togglePhasing(RenX::Server *server, bool newState)
{
server->varData.set(STRING_LITERAL_AS_REFERENCE("RenX.Commands"), STRING_LITERAL_AS_REFERENCE("phasing"), newState ? STRING_LITERAL_AS_REFERENCE("true") : STRING_LITERAL_AS_REFERENCE("false"));
server->varData[RxCommandsSection].set("phasing"_jrs, newState ? "true"_jrs : "false"_jrs);
return newState;
}
inline bool togglePhasing(RenX::Server *server)
{
return togglePhasing(server, !server->varData.getBool(STRING_LITERAL_AS_REFERENCE("RenX.Commands"), STRING_LITERAL_AS_REFERENCE("phasing"), false));
return togglePhasing(server, !server->varData[RxCommandsSection].get<bool>("phasing"_jrs, false));
}
inline void onDie(RenX::Server *server, const RenX::PlayerInfo *player)
{
if (player->isBot && server->varData.getBool(STRING_LITERAL_AS_REFERENCE("RenX.Commands"), STRING_LITERAL_AS_REFERENCE("phasing"), false))
if (player->isBot && server->varData[RxCommandsSection].get<bool>("phasing"_jrs, false))
server->kickPlayer(player, Jupiter::StringS::empty);
}
@ -65,11 +67,11 @@ void RenX_CommandsPlugin::RenX_OnDie(RenX::Server *server, const RenX::PlayerInf
bool RenX_CommandsPlugin::initialize()
{
RenX_CommandsPlugin::_defaultTempBanTime = std::chrono::seconds(this->config.getLongLong(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("TBanTime"), 86400));
RenX_CommandsPlugin::playerInfoFormat = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("PlayerInfoFormat"), STRING_LITERAL_AS_REFERENCE(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}"));
RenX_CommandsPlugin::adminPlayerInfoFormat = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("AdminPlayerInfoFormat"), Jupiter::StringS::Format("%.*s - IP: " IRCBOLD "{IP}" IRCBOLD " - HWID: " IRCBOLD "{HWID}" IRCBOLD " - RDNS: " IRCBOLD "{RDNS}" IRCBOLD " - Steam ID: " IRCBOLD "{STEAM}", RenX_CommandsPlugin::playerInfoFormat.size(), RenX_CommandsPlugin::playerInfoFormat.ptr()));
RenX_CommandsPlugin::buildingInfoFormat = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("BuildingInfoFormat"), STRING_LITERAL_AS_REFERENCE(IRCCOLOR) + RenX::tags->buildingTeamColorTag + RenX::tags->buildingNameTag + STRING_LITERAL_AS_REFERENCE(IRCCOLOR " - " IRCCOLOR "07") + RenX::tags->buildingHealthPercentageTag + STRING_LITERAL_AS_REFERENCE("%"));
RenX_CommandsPlugin::staffTitle = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("StaffTitle"), STRING_LITERAL_AS_REFERENCE("Moderator"));
RenX_CommandsPlugin::_defaultTempBanTime = std::chrono::seconds(this->config.get<long long>("TBanTime"_jrs, 86400));
RenX_CommandsPlugin::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);
RenX_CommandsPlugin::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}", RenX_CommandsPlugin::playerInfoFormat.size(), RenX_CommandsPlugin::playerInfoFormat.ptr()));
RenX_CommandsPlugin::buildingInfoFormat = this->config.get("BuildingInfoFormat"_jrs, ""_jrs IRCCOLOR + RenX::tags->buildingTeamColorTag + RenX::tags->buildingNameTag + IRCCOLOR " - " IRCCOLOR "07"_jrs + RenX::tags->buildingHealthPercentageTag + "%"_jrs);
RenX_CommandsPlugin::staffTitle = this->config.get("StaffTitle"_jrs, "Moderator"_jrs);
RenX::sanitizeTags(RenX_CommandsPlugin::playerInfoFormat);
RenX::sanitizeTags(RenX_CommandsPlugin::adminPlayerInfoFormat);

15
RenX.Core/RenX_BanDatabase.cpp

@ -19,7 +19,6 @@
#include <ctime>
#include <cstdio>
#include "Jupiter/IRC_Client.h"
#include "Jupiter/INIFile.h"
#include "RenX_PlayerInfo.h"
#include "RenX_BanDatabase.h"
#include "RenX_Core.h"
@ -154,13 +153,13 @@ void RenX::BanDatabase::write(RenX::BanDatabase::Entry *entry, FILE *file)
size_t varData_entries = entry->varData.size();
buffer.push(varData_entries);
Jupiter::INIFile::Section::KeyValuePair *pair;
while (varData_entries != 0)
auto write_varData_entry = [&buffer](Jupiter::HashTable::Bucket::Entry &in_entry)
{
pair = entry->varData.getPair(--varData_entries);
buffer.push(pair->getKey());
buffer.push(pair->getValue());
}
buffer.push(in_entry.key);
buffer.push(in_entry.value);
};
entry->varData.callback(write_varData_entry);
// push buffer to file
buffer.push_to(file);
@ -252,7 +251,7 @@ const Jupiter::ArrayList<RenX::BanDatabase::Entry> &RenX::BanDatabase::getEntrie
bool RenX::BanDatabase::initialize()
{
RenX::BanDatabase::filename = RenX::getCore()->getConfig().get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("BanDB"), STRING_LITERAL_AS_REFERENCE("Bans.db"));
RenX::BanDatabase::filename = RenX::getCore()->getConfig().get("BanDB"_jrs, "Bans.db"_jrs);
return this->process_file(filename);
}

2
RenX.Core/RenX_BanDatabase.h

@ -91,7 +91,7 @@ namespace RenX
Jupiter::StringS name /** Name of the banned player */;
Jupiter::StringS banner /** Name of the user who initiated the ban */;
Jupiter::StringS reason /** Reason the player was banned */;
Jupiter::INIFile::Section varData; /** Variable entry data */
Jupiter::HashTable varData; /** Variable entry data */
static const uint16_t FLAG_ACTIVE = 0x8000U;
static const uint16_t FLAG_USE_RDNS = 0x4000U;

4
RenX.Core/RenX_BuildingInfo.h

@ -25,7 +25,7 @@
*/
#include "Jupiter/String.h"
#include "Jupiter/INIFile.h"
#include "Jupiter/Config.h"
#include "RenX.h"
/** DLL Linkage Nagging */
@ -51,7 +51,7 @@ namespace RenX
bool capturable = false;
bool destroyed = false;
std::chrono::steady_clock::time_point destruction_time;
mutable Jupiter::INIFile varData;
mutable Jupiter::Config varData;
};
}

9
RenX.Core/RenX_Core.cpp

@ -17,7 +17,6 @@
*/
#include <ctime>
#include "Jupiter/INIFile.h"
#include "Jupiter/Functions.h"
#include "IRC_Bot.h"
#include "RenX_Core.h"
@ -30,6 +29,8 @@
#include "RenX_ExemptionDatabase.h"
#include "RenX_Tags.h"
using namespace Jupiter::literals;
RenX::Core pluginInstance;
RenX::Core *RenXInstance = &pluginInstance;
@ -45,8 +46,8 @@ bool RenX::Core::initialize()
RenX::tags->initialize();
RenX::initTranslations(this->config);
const Jupiter::ReadableString &serverList = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Servers"));
RenX::Core::commandsFile.readFile(this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("CommandsFile"), STRING_LITERAL_AS_REFERENCE("RenXGameCommands.ini")));
const Jupiter::ReadableString &serverList = this->config.get("Servers"_jrs);
RenX::Core::commandsFile.read(this->config.get("CommandsFile"_jrs, "RenXGameCommands.ini"_jrs));
unsigned int wc = serverList.wordCount(WHITESPACE);
@ -151,7 +152,7 @@ Jupiter::ArrayList<RenX::Plugin> *RenX::Core::getPlugins()
return &(RenX::Core::plugins);
}
Jupiter::INIFile &RenX::Core::getCommandsFile()
Jupiter::Config &RenX::Core::getCommandsFile()
{
return RenX::Core::commandsFile;
}

6
RenX.Core/RenX_Core.h

@ -25,7 +25,7 @@
*/
#include "Jupiter/Plugin.h"
#include "Jupiter/INIFile.h"
#include "Jupiter/Config.h"
#include "RenX.h"
/** DLL Linkage Nagging */
@ -155,7 +155,7 @@ namespace RenX
*
* @return Commands settings configuration file.
*/
Jupiter::INIFile &getCommandsFile();
Jupiter::Config &getCommandsFile();
/**
* @brief Copys a command, and passes it to each server.
@ -179,7 +179,7 @@ namespace RenX
/** Inaccessible private members */
Jupiter::ArrayList<RenX::Server> servers;
Jupiter::ArrayList<RenX::Plugin> plugins;
Jupiter::INIFile commandsFile;
Jupiter::INIConfig commandsFile;
};
RENX_API Core *getCore();

3
RenX.Core/RenX_ExemptionDatabase.cpp

@ -18,7 +18,6 @@
#include <cstdio>
#include "Jupiter/IRC_Client.h"
#include "Jupiter/INIFile.h"
#include "RenX_PlayerInfo.h"
#include "RenX_ExemptionDatabase.h"
#include "RenX_Core.h"
@ -187,7 +186,7 @@ const Jupiter::ArrayList<RenX::ExemptionDatabase::Entry> &RenX::ExemptionDatabas
bool RenX::ExemptionDatabase::initialize()
{
RenX::ExemptionDatabase::filename = RenX::getCore()->getConfig().get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("ExemptionDB"), STRING_LITERAL_AS_REFERENCE("Exemptions.db"));
RenX::ExemptionDatabase::filename = RenX::getCore()->getConfig().get("ExemptionDB"_jrs, "Exemptions.db"_jrs);
return this->process_file(filename);
}

49
RenX.Core/RenX_Functions.cpp

@ -18,7 +18,6 @@
#include <ctime>
#include "Jupiter/Functions.h"
#include "Jupiter/INIFile.h"
#include "IRC_Bot.h"
#include "ServerManager.h"
#include "RenX_Functions.h"
@ -828,34 +827,34 @@ const Jupiter::ReadableString &RenX::translateWinTypePlain(RenX::WinType winType
}
}
void RenX::initTranslations(Jupiter::INIFile &translationsFile)
void RenX::initTranslations(Jupiter::Config &translationsFile)
{
NodColor = translationsFile.get("TeamColor"_jrs, "Nod"_jrs, "04"_jrs);
GDIColor = translationsFile.get("TeamColor"_jrs, "GDI"_jrs, "08"_jrs);
OtherColor = translationsFile.get("TeamColor"_jrs, "Other"_jrs, "14"_jrs);
NodColor = translationsFile["TeamColor"_jrs].get("Nod"_jrs, "04"_jrs);
GDIColor = translationsFile["TeamColor"_jrs].get("GDI"_jrs, "08"_jrs);
OtherColor = translationsFile["TeamColor"_jrs].get("Other"_jrs, "14"_jrs);
NodShortName = translationsFile.get("ShortTeamName"_jrs, "Nod"_jrs, "Nod"_jrs);
GDIShortName = translationsFile.get("ShortTeamName"_jrs, "GDI"_jrs, "GDI"_jrs);
OtherShortName = translationsFile.get("ShortTeamName"_jrs, "Other"_jrs, "N/A"_jrs);
NodLongName = translationsFile.get("LongTeamName"_jrs, "Nod"_jrs, "Brotherhood of Nod"_jrs);
GDILongName = translationsFile.get("LongTeamName"_jrs, "GDI"_jrs, "Global Defense Initiative"_jrs);
OtherLongName = translationsFile.get("LongTeamName"_jrs, "Other"_jrs, "Unknown"_jrs);
NodShortName = translationsFile["ShortTeamName"_jrs].get("Nod"_jrs, "Nod"_jrs);
GDIShortName = translationsFile["ShortTeamName"_jrs].get("GDI"_jrs, "GDI"_jrs);
OtherShortName = translationsFile["ShortTeamName"_jrs].get("Other"_jrs, "N/A"_jrs);
NodLongName = translationsFile["LongTeamName"_jrs].get("Nod"_jrs, "Brotherhood of Nod"_jrs);
GDILongName = translationsFile["LongTeamName"_jrs].get("GDI"_jrs, "Global Defense Initiative"_jrs);
OtherLongName = translationsFile["LongTeamName"_jrs].get("Other"_jrs, "Unknown"_jrs);
scoreWinTypeTranslation = translationsFile.get("WinType"_jrs, "Score"_jrs, "Domination (High Score)"_jrs);
baseWinTypeTranslation = translationsFile.get("WinType"_jrs, "Base"_jrs, "Conquest (Base Destruction)"_jrs);
beaconWinTypeTranslation = translationsFile.get("WinType"_jrs, "Beacon"_jrs, "Espionage (Beacon)"_jrs);
tieWinTypeTranslation = translationsFile.get("WinType"_jrs, "Tie"_jrs, "Draw (Tie)"_jrs);
shutdownWinTypeTranslation = translationsFile.get("WinType"_jrs, "Shutdown"_jrs, "Ceasefire (Shutdown)"_jrs);
surrenderWinTypeTranslation = translationsFile.get("WinType"_jrs, "Surrender"_jrs, "Forfeit (Surrender)"_jrs);
unknownWinTypeTranslation = translationsFile.get("WinType"_jrs, "Unknown"_jrs, "Aliens (Unknown)"_jrs);
scoreWinTypeTranslation = translationsFile["WinType"_jrs].get("Score"_jrs, "Domination (High Score)"_jrs);
baseWinTypeTranslation = translationsFile["WinType"_jrs].get("Base"_jrs, "Conquest (Base Destruction)"_jrs);
beaconWinTypeTranslation = translationsFile["WinType"_jrs].get("Beacon"_jrs, "Espionage (Beacon)"_jrs);
tieWinTypeTranslation = translationsFile["WinType"_jrs].get("Tie"_jrs, "Draw (Tie)"_jrs);
shutdownWinTypeTranslation = translationsFile["WinType"_jrs].get("Shutdown"_jrs, "Ceasefire (Shutdown)"_jrs);
surrenderWinTypeTranslation = translationsFile["WinType"_jrs].get("Surrender"_jrs, "Forfeit (Surrender)"_jrs);
unknownWinTypeTranslation = translationsFile["WinType"_jrs].get("Unknown"_jrs, "Aliens (Unknown)"_jrs);
scoreWinTypePlainTranslation = translationsFile.get("WinTypePlain"_jrs, "Score"_jrs, "High Score"_jrs);
baseWinTypePlainTranslation = translationsFile.get("WinTypePlain"_jrs, "Base"_jrs, "Base Destruction"_jrs);
beaconWinTypePlainTranslation = translationsFile.get("WinTypePlain"_jrs, "Beacon"_jrs, "Beacon"_jrs);
tieWinTypePlainTranslation = translationsFile.get("WinTypePlain"_jrs, "Tie"_jrs, "Tie"_jrs);
shutdownWinTypePlainTranslation = translationsFile.get("WinTypePlain"_jrs, "Shutdown"_jrs, "Shutdown"_jrs);
surrenderWinTypePlainTranslation = translationsFile.get("WinTypePlain"_jrs, "Surrender"_jrs, "Surrender"_jrs);
unknownWinTypePlainTranslation = translationsFile.get("WinTypePlain"_jrs, "Unknown"_jrs, "Unknown"_jrs);
scoreWinTypePlainTranslation = translationsFile["WinTypePlain"_jrs].get("Score"_jrs, "High Score"_jrs);
baseWinTypePlainTranslation = translationsFile["WinTypePlain"_jrs].get("Base"_jrs, "Base Destruction"_jrs);
beaconWinTypePlainTranslation = translationsFile["WinTypePlain"_jrs].get("Beacon"_jrs, "Beacon"_jrs);
tieWinTypePlainTranslation = translationsFile["WinTypePlain"_jrs].get("Tie"_jrs, "Tie"_jrs);
shutdownWinTypePlainTranslation = translationsFile["WinTypePlain"_jrs].get("Shutdown"_jrs, "Shutdown"_jrs);
surrenderWinTypePlainTranslation = translationsFile["WinTypePlain"_jrs].get("Surrender"_jrs, "Surrender"_jrs);
unknownWinTypePlainTranslation = translationsFile["WinTypePlain"_jrs].get("Unknown"_jrs, "Unknown"_jrs);
}
Jupiter::String RenX::getFormattedPlayerName(const RenX::PlayerInfo *player)

4
RenX.Core/RenX_Functions.h

@ -25,7 +25,7 @@
*/
#include <chrono>
#include "Jupiter/INIFile.h"
#include "Jupiter/Config.h"
#include "Jupiter/String.h"
#include "RenX.h"
#include "RenX_Map.h"
@ -126,7 +126,7 @@ namespace RenX
*
* @param filename Optional parameter to specify which file to load.
*/
RENX_API void initTranslations(Jupiter::INIFile &settings);
RENX_API void initTranslations(Jupiter::Config &settings);
/**
* @brief Creates a String containing an IRC-ready version of the player's name.

4
RenX.Core/RenX_PlayerInfo.h

@ -29,7 +29,7 @@
#include <thread>
#include "Jupiter/Reference_String.h"
#include "Jupiter/String.h"
#include "Jupiter/INIFile.h"
#include "Jupiter/Config.h"
#include "RenX.h"
/** DLL Linkage Nagging */
@ -93,7 +93,7 @@ namespace RenX
mutable Jupiter::StringS formatNamePrefix;
mutable std::thread rdns_thread;
mutable int access = 0;
mutable Jupiter::INIFile varData; // This will be replaced later with a more dedicated type.
mutable Jupiter::Config varData;
};
static Jupiter::ReferenceString rdns_pending = STRING_LITERAL_AS_REFERENCE("RDNS_PENDING");

326
RenX.Core/RenX_Server.cpp

@ -17,7 +17,6 @@
*/
#include <ctime>
#include "Jupiter/INIFile.h"
#include "Jupiter/String.h"
#include "ServerManager.h"
#include "IRC_Bot.h"
@ -1617,76 +1616,76 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line)
rPlayerLog Kills PlayerKills BotKills Deaths Score Credits Character BoundVehicle Vehicle Spy RemoteC4 ATMine KDR Ping Admin Steam IP ID Name Team TeamNum
rGDI,256,EKT-J 0 0 0 0 0 5217.9629 Rx_FamilyInfo_GDI_Soldier   False 0 0 0.0000 8 None 0x0110000104AE0666 127.0.0.1 256 EKT-J GDI 0
*/
Jupiter::INIFile::Section table;
Jupiter::HashTable table;
size_t i = tokens.token_count;
while (i-- != 0)
table.set(this->commandListFormat.getToken(i), tokens.getToken(i));
auto parse = [&table](RenX::PlayerInfo *player)
{
Jupiter::INIFile::Section::KeyValuePair *pair;
Jupiter::ReadableString *value;
pair = table.getPair("Kills"_jrs);
if (pair != nullptr)
player->kills = pair->getValue().asUnsignedInt();
value = table.get("Kills"_jrs);
if (value != nullptr)
player->kills = value->asUnsignedInt();
pair = table.getPair("Deaths"_jrs);
if (pair != nullptr)
player->deaths = pair->getValue().asUnsignedInt();
value = table.get("Deaths"_jrs);
if (value != nullptr)
player->deaths = value->asUnsignedInt();
pair = table.getPair("Score"_jrs);
if (pair != nullptr)
player->score = pair->getValue().asDouble();
value = table.get("Score"_jrs);
if (value != nullptr)
player->score = value->asDouble();
pair = table.getPair("Credits"_jrs);
if (pair != nullptr)
player->credits = pair->getValue().asDouble();
value = table.get("Credits"_jrs);
if (value != nullptr)
player->credits = value->asDouble();
pair = table.getPair("Character"_jrs);
if (pair != nullptr)
player->character = pair->getValue();
value = table.get("Character"_jrs);
if (value != nullptr)
player->character = *value;
pair = table.getPair("Vehicle"_jrs);
if (pair != nullptr)
player->vehicle = pair->getValue();
value = table.get("Vehicle"_jrs);
if (value != nullptr)
player->vehicle = *value;
pair = table.getPair("Ping"_jrs);
if (pair != nullptr)
player->ping = pair->getValue().asUnsignedInt();
value = table.get("Ping"_jrs);
if (value != nullptr)
player->ping = value->asUnsignedInt();
pair = table.getPair("Admin"_jrs);
if (pair != nullptr)
value = table.get("Admin"_jrs);
if (value != nullptr)
{
if (pair->getValue().equals("None"_jrs))
if (value->equals("None"_jrs))
player->adminType = "";
else
player->adminType = pair->getValue();
player->adminType = *value;
}
};
Jupiter::INIFile::Section::KeyValuePair *pair = table.getPair("PlayerLog"_jrs);
if (pair != nullptr)
parse(getPlayerOrAdd(Jupiter::ReferenceString::getToken(pair->getValue(), 2, ','), Jupiter::ReferenceString::getToken(pair->getValue(), 1, ',').asInt(), RenX::getTeam(Jupiter::ReferenceString::getToken(pair->getValue(), 0, ',')), false, table.get("STEAM"_jrs).asUnsignedLongLong(), table.get("IP"_jrs), table.get("HWID"_jrs)));
Jupiter::ReadableString *value = table.get("PlayerLog"_jrs);
if (value != nullptr)
parse(getPlayerOrAdd(Jupiter::ReferenceString::getToken(*value, 2, ','), Jupiter::ReferenceString::getToken(*value, 1, ',').asInt(), RenX::getTeam(Jupiter::ReferenceString::getToken(*value, 0, ',')), false, table.get("STEAM"_jrs, Jupiter::ReferenceString::empty).asUnsignedLongLong(), table.get("IP"_jrs, Jupiter::ReferenceString::empty), table.get("HWID"_jrs, Jupiter::ReferenceString::empty)));
else
{
Jupiter::INIFile::Section::KeyValuePair *namePair = table.getPair("Name"_jrs);
pair = table.getPair("ID"_jrs);
Jupiter::ReadableString *name = table.get("Name"_jrs);
value = table.get("ID"_jrs);
if (pair != nullptr)
if (value != nullptr)
{
RenX::PlayerInfo *player = getPlayer(pair->getValue().asInt());
RenX::PlayerInfo *player = getPlayer(value->asInt());
if (player != nullptr)
{
if (player->name.isEmpty())
{
player->name = table.get("Name"_jrs);
player->name = table.get("Name"_jrs, Jupiter::ReferenceString::empty);
player->name.processEscapeSequences();
}
if (player->ip.isEmpty())
player->ip = table.get("IP"_jrs);
player->ip = table.get("IP"_jrs, Jupiter::ReferenceString::empty);
if (player->hwid.isEmpty())
player->hwid = table.get("HWID"_jrs);
player->hwid = table.get("HWID"_jrs, Jupiter::ReferenceString::empty);
if (player->steamid == 0)
{
uint64_t steamid = table.get("STEAM"_jrs).asUnsignedLongLong();
uint64_t steamid = table.get("STEAM"_jrs, Jupiter::ReferenceString::empty).asUnsignedLongLong();
if (steamid != 0)
{
player->steamid = steamid;
@ -1694,14 +1693,14 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line)
}
}
pair = table.getPair("TeamNum"_jrs);
if (pair != nullptr)
player->team = RenX::getTeam(pair->getValue().asInt());
value = table.get("TeamNum"_jrs);
if (value != nullptr)
player->team = RenX::getTeam(value->asInt());
else
{
pair = table.getPair("Team"_jrs);
if (pair != nullptr)
player->team = RenX::getTeam(pair->getValue());
value = table.get("Team"_jrs);
if (value != nullptr)
player->team = RenX::getTeam(*value);
}
parse(player);
@ -1709,18 +1708,18 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line)
// I *could* try and fetch a player by name, but that seems like it *could* open a security hole.
// In addition, would I update their ID?
}
else if (namePair != nullptr)
else if (name != nullptr)
{
RenX::PlayerInfo *player = getPlayerByName(namePair->getValue());
RenX::PlayerInfo *player = getPlayerByName(*name);
if (player != nullptr)
{
if (player->ip.isEmpty())
player->ip = table.get("IP"_jrs);
player->ip = table.get("IP"_jrs, Jupiter::ReferenceString::empty);
if (player->hwid.isEmpty())
player->hwid = table.get("HWID"_jrs);
player->hwid = table.get("HWID"_jrs, Jupiter::ReferenceString::empty);
if (player->steamid == 0)
{
uint64_t steamid = table.get("STEAM"_jrs).asUnsignedLongLong();
uint64_t steamid = table.get("STEAM"_jrs, Jupiter::ReferenceString::empty).asUnsignedLongLong();
if (steamid != 0)
{
player->steamid = steamid;
@ -1728,14 +1727,14 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line)
}
}
pair = table.getPair("TeamNum"_jrs);
if (pair != nullptr)
player->team = RenX::getTeam(pair->getValue().asInt());
value = table.get("TeamNum"_jrs);
if (value != nullptr)
player->team = RenX::getTeam(value->asInt());
else
{
pair = table.getPair("Team"_jrs);
if (pair != nullptr)
player->team = RenX::getTeam(pair->getValue());
value = table.get("Team"_jrs);
if (value != nullptr)
player->team = RenX::getTeam(*value);
}
parse(player);
@ -1764,83 +1763,83 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line)
rPlayerLog Kills PlayerKills BotKills Deaths Score Credits Character BoundVehicle Vehicle Spy RemoteC4 ATMine KDR Ping Admin Steam IP ID Name Team TeamNum
rGDI,256,EKT-J 0 0 0 0 0 5217.9629 Rx_FamilyInfo_GDI_Soldier   False 0 0 0.0000 8 None 0x0110000104AE0666 127.0.0.1 256 EKT-J GDI 0
*/
Jupiter::INIFile::Section table;
Jupiter::HashTable table;
size_t i = tokens.token_count;
while (i-- != 0)
table.set(this->commandListFormat.getToken(i), tokens.getToken(i));
auto parse = [&table](RenX::PlayerInfo *player)
{
Jupiter::INIFile::Section::KeyValuePair *pair;
Jupiter::ReadableString *value;
pair = table.getPair("Kills"_jrs);
if (pair != nullptr)
player->kills = pair->getValue().asUnsignedInt();
value = table.get("Kills"_jrs);
if (value != nullptr)
player->kills = value->asUnsignedInt();
pair = table.getPair("Deaths"_jrs);
if (pair != nullptr)
player->deaths = pair->getValue().asUnsignedInt();
value = table.get("Deaths"_jrs);
if (value != nullptr)
player->deaths = value->asUnsignedInt();
pair = table.getPair("Score"_jrs);
if (pair != nullptr)
player->score = pair->getValue().asDouble();
value = table.get("Score"_jrs);
if (value != nullptr)
player->score = value->asDouble();
pair = table.getPair("Credits"_jrs);
if (pair != nullptr)
player->credits = pair->getValue().asDouble();
value = table.get("Credits"_jrs);
if (value != nullptr)
player->credits = value->asDouble();
pair = table.getPair("Character"_jrs);
if (pair != nullptr)
player->character = pair->getValue();
value = table.get("Character"_jrs);
if (value != nullptr)
player->character = *value;
pair = table.getPair("Vehicle"_jrs);
if (pair != nullptr)
player->vehicle = pair->getValue();
value = table.get("Vehicle"_jrs);
if (value != nullptr)
player->vehicle = *value;
};
Jupiter::INIFile::Section::KeyValuePair *pair = table.getPair("PlayerLog"_jrs);
if (pair != nullptr)
parse(getPlayerOrAdd(Jupiter::ReferenceString::getToken(pair->getValue(), 2, ','), Jupiter::ReferenceString::getToken(pair->getValue(), 1, ',').substring(1).asInt(), RenX::getTeam(Jupiter::ReferenceString::getToken(pair->getValue(), 0, ',')), true, 0ULL, Jupiter::ReferenceString::empty, Jupiter::ReferenceString::empty));
Jupiter::ReadableString *value = table.get("PlayerLog"_jrs);
if (value != nullptr)
parse(getPlayerOrAdd(Jupiter::ReferenceString::getToken(*value, 2, ','), Jupiter::ReferenceString::getToken(*value, 1, ',').substring(1).asInt(), RenX::getTeam(Jupiter::ReferenceString::getToken(*value, 0, ',')), true, 0ULL, Jupiter::ReferenceString::empty, Jupiter::ReferenceString::empty));
else
{
Jupiter::INIFile::Section::KeyValuePair *namePair = table.getPair("Name"_jrs);
pair = table.getPair("ID"_jrs);
Jupiter::ReadableString *name = table.get("Name"_jrs);
value = table.get("ID"_jrs);
if (pair != nullptr)
if (value != nullptr)
{
RenX::PlayerInfo *player = getPlayer(pair->getValue().asInt());
RenX::PlayerInfo *player = getPlayer(value->asInt());
if (player != nullptr)
{
if (player->name.isEmpty())
{
player->name = table.get("Name"_jrs);
player->name = table.get("Name"_jrs, Jupiter::ReferenceString::empty);
player->name.processEscapeSequences();
}
pair = table.getPair("TeamNum"_jrs);
if (pair != nullptr)
player->team = RenX::getTeam(pair->getValue().asInt());
value = table.get("TeamNum"_jrs);
if (value != nullptr)
player->team = RenX::getTeam(value->asInt());
else
{
pair = table.getPair("Team"_jrs);
if (pair != nullptr)
player->team = RenX::getTeam(pair->getValue());
value = table.get("Team"_jrs);
if (value != nullptr)
player->team = RenX::getTeam(*value);
}
parse(player);
}
}
else if (namePair != nullptr)
else if (name != nullptr)
{
RenX::PlayerInfo *player = getPlayerByName(namePair->getValue());
RenX::PlayerInfo *player = getPlayerByName(*name);
if (player != nullptr)
{
pair = table.getPair("TeamNum"_jrs);
if (pair != nullptr)
player->team = RenX::getTeam(pair->getValue().asInt());
value = table.get("TeamNum"_jrs);
if (value != nullptr)
player->team = RenX::getTeam(value->asInt());
else
{
pair = table.getPair("Team"_jrs);
if (pair != nullptr)
player->team = RenX::getTeam(pair->getValue());
value = table.get("Team"_jrs);
if (value != nullptr)
player->team = RenX::getTeam(*value);
}
parse(player);
@ -1861,52 +1860,52 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line)
rBuilding Health MaxHealth Armor MaxArmor Team Capturable Destroyed
rRx_Building_Refinery_GDI 2000 2000 2000 2000 GDI False False
*/
Jupiter::INIFile::Section table;
Jupiter::HashTable table;
size_t i = tokens.token_count;
while (i-- != 0)
table.set(this->commandListFormat.getToken(i), tokens.getToken(i));
Jupiter::INIFile::Section::KeyValuePair *pair;
Jupiter::ReadableString *value;
RenX::BuildingInfo *building;
pair = table.getPair("Building"_jrs);
if (pair != nullptr)
value = table.get("Building"_jrs);
if (value != nullptr)
{
building = this->getBuildingByName(pair->getValue());
building = this->getBuildingByName(*value);
if (building == nullptr)
{
building = new RenX::BuildingInfo();
RenX::Server::buildings.add(building);
building->name = pair->getValue();
building->name = *value;
}
pair = table.getPair("Health"_jrs);
if (pair != nullptr)
building->health = pair->getValue().asInt(10);
value = table.get("Health"_jrs);
if (value != nullptr)
building->health = value->asInt(10);
pair = table.getPair("MaxHealth"_jrs);
if (pair != nullptr)
building->max_health = pair->getValue().asInt(10);
value = table.get("MaxHealth"_jrs);
if (value != nullptr)
building->max_health = value->asInt(10);
pair = table.getPair("Team"_jrs);
if (pair != nullptr)
building->team = RenX::getTeam(pair->getValue());
value = table.get("Team"_jrs);
if (value != nullptr)
building->team = RenX::getTeam(*value);
pair = table.getPair("Capturable"_jrs);
if (pair != nullptr)
building->capturable = pair->getValue().asBool();
value = table.get("Capturable"_jrs);
if (value != nullptr)
building->capturable = value->asBool();
pair = table.getPair("Destroyed"_jrs);
if (pair != nullptr)
building->destroyed = pair->getValue().asBool();
value = table.get("Destroyed"_jrs);
if (value != nullptr)
building->destroyed = value->asBool();
pair = table.getPair("Armor"_jrs);
if (pair != nullptr)
building->armor = pair->getValue().asInt(10);
value = table.get("Armor"_jrs);
if (value != nullptr)
building->armor = value->asInt(10);
pair = table.getPair("MaxArmor"_jrs);
if (pair != nullptr)
building->max_armor = pair->getValue().asInt(10);
value = table.get("MaxArmor"_jrs);
if (value != nullptr)
building->max_armor = value->asInt(10);
}
}
}
@ -3484,39 +3483,39 @@ RenX::Server::Server(const Jupiter::ReadableString &configurationSection)
xPlugins.get(i)->RenX_OnServerCreate(this);
}
void RenX::Server::init(const Jupiter::INIFile::Section &config)
void RenX::Server::init(const Jupiter::Config &config)
{
RenX::Server::hostname = config.get("Hostname"_jrs, "localhost"_jrs);
RenX::Server::port = static_cast<unsigned short>(config.getInt("Port"_jrs, 7777));
RenX::Server::port = config.get<unsigned short>("Port"_jrs, 7777);
RenX::Server::clientHostname = config.get("ClientAddress"_jrs);
RenX::Server::pass = config.get("Password"_jrs, "renx"_jrs);
RenX::Server::logChanType = config.getShort("ChanType"_jrs);
RenX::Server::adminLogChanType = config.getShort("AdminChanType"_jrs);
RenX::Server::logChanType = config.get<int>("ChanType"_jrs);
RenX::Server::adminLogChanType = config.get<int>("AdminChanType"_jrs);
RenX::Server::setCommandPrefix(config.get("CommandPrefix"_jrs));
RenX::Server::setPrefix(config.get("IRCPrefix"_jrs));
RenX::Server::ban_from_str = config.get("BanFromStr"_jrs, "the server"_jrs);
RenX::Server::rules = config.get("Rules"_jrs, "Anarchy!"_jrs);
RenX::Server::delay = std::chrono::milliseconds(config.getInt("ReconnectDelay"_jrs, 10000));
RenX::Server::maxAttempts = config.getInt("MaxReconnectAttempts"_jrs, -1);
RenX::Server::rconBan = config.getBool("RCONBan"_jrs, false);
RenX::Server::localSteamBan = config.getBool("LocalSteamBan"_jrs, true);
RenX::Server::localIPBan = config.getBool("LocalIPBan"_jrs, true);
RenX::Server::localHWIDBan = config.getBool("LocalHWIDBan"_jrs, true);
RenX::Server::localRDNSBan = config.getBool("LocalRDNSBan"_jrs, false);
RenX::Server::localNameBan = config.getBool("LocalNameBan"_jrs, false);
RenX::Server::delay = std::chrono::milliseconds(config.get<long long>("ReconnectDelay"_jrs, 10000));
RenX::Server::maxAttempts = config.get<int>("MaxReconnectAttempts"_jrs, -1);
RenX::Server::rconBan = config.get<bool>("RCONBan"_jrs, false);
RenX::Server::localSteamBan = config.get<bool>("LocalSteamBan"_jrs, true);
RenX::Server::localIPBan = config.get<bool>("LocalIPBan"_jrs, true);
RenX::Server::localHWIDBan = config.get<bool>("LocalHWIDBan"_jrs, true);
RenX::Server::localRDNSBan = config.get<bool>("LocalRDNSBan"_jrs, false);
RenX::Server::localNameBan = config.get<bool>("LocalNameBan"_jrs, false);
RenX::Server::localBan = RenX::Server::localIPBan || RenX::Server::localRDNSBan || RenX::Server::localSteamBan || RenX::Server::localNameBan;
RenX::Server::steamFormat = config.getInt("SteamFormat"_jrs, 16);
RenX::Server::neverSay = config.getBool("NeverSay"_jrs, false);
RenX::Server::resolve_player_rdns = config.getBool("ResolvePlayerRDNS"_jrs, true);
RenX::Server::clientUpdateRate = std::chrono::milliseconds(config.getInt("ClientUpdateRate"_jrs, 2500));
RenX::Server::buildingUpdateRate = std::chrono::milliseconds(config.getInt("BuildingUpdateRate"_jrs, 7500));
RenX::Server::pingRate = std::chrono::milliseconds(config.getInt("PingUpdateRate"_jrs, 60000));
RenX::Server::pingTimeoutThreshold = std::chrono::milliseconds(config.getInt("PingTimeoutThreshold"_jrs, 10000));
Jupiter::INIFile &commandsFile = RenX::getCore()->getCommandsFile();
RenX::Server::steamFormat = config.get<int>("SteamFormat"_jrs, 16);
RenX::Server::neverSay = config.get<bool>("NeverSay"_jrs, false);
RenX::Server::resolve_player_rdns = config.get<bool>("ResolvePlayerRDNS"_jrs, true);
RenX::Server::clientUpdateRate = std::chrono::milliseconds(config.get<long long>("ClientUpdateRate"_jrs, 2500));
RenX::Server::buildingUpdateRate = std::chrono::milliseconds(config.get<long long>("BuildingUpdateRate"_jrs, 7500));
RenX::Server::pingRate = std::chrono::milliseconds(config.get<long long>("PingUpdateRate"_jrs, 60000));
RenX::Server::pingTimeoutThreshold = std::chrono::milliseconds(config.get<long long>("PingTimeoutThreshold"_jrs, 10000));
Jupiter::Config &commandsFile = RenX::getCore()->getCommandsFile();
RenX::Server::commandAccessLevels = commandsFile.getSection(RenX::Server::configSection);
RenX::Server::commandAliases = commandsFile.getSection(RenX::Server::configSection + ".Aliases"_jrs);
@ -3525,28 +3524,27 @@ void RenX::Server::init(const Jupiter::INIFile::Section &config)
auto load_basic_commands = [this, &commandsFile](const Jupiter::ReadableString &section_prefix)
{
Jupiter::INIFile::Section *basic_commands = commandsFile.getSection(section_prefix + ".Basic"_jrs);
Jupiter::Config *basic_commands = commandsFile.getSection(section_prefix + ".Basic"_jrs);
if (basic_commands != nullptr)
{
Jupiter::INIFile::Section *basic_commands_help = commandsFile.getSection(section_prefix + ".Basic.Help"_jrs);
Jupiter::INIFile::Section::KeyValuePair *pair;
size_t i = 0;
if (basic_commands_help == nullptr)
while (i != basic_commands->size())
Jupiter::Config *basic_commands_help = commandsFile.getSection(section_prefix + ".Basic.Help"_jrs);
auto basic_command_no_help_callback = [this](Jupiter::HashTable::Bucket::Entry &in_entry)
{
pair = basic_commands->getPair(i);
++i;
if (this->getCommand(pair->getKey()) == nullptr)
this->addCommand(new RenX::BasicGameCommand(pair->getKey(), pair->getValue(), ""_jrs));
}
else
while (i != basic_commands->size())
if (this->getCommand(in_entry.key) == nullptr)
this->addCommand(new RenX::BasicGameCommand(in_entry.key, in_entry.value, ""_jrs));
};
auto basic_command_callback = [this, basic_commands_help](Jupiter::HashTable::Bucket::Entry &in_entry)
{
pair = basic_commands->getPair(i);
++i;
if (this->getCommand(pair->getKey()) == nullptr)
this->addCommand(new RenX::BasicGameCommand(pair->getKey(), pair->getValue(), basic_commands_help->get(pair->getKey(), ""_jrs)));
}
if (this->getCommand(in_entry.key) == nullptr)
this->addCommand(new RenX::BasicGameCommand(in_entry.key, in_entry.value, basic_commands_help->get(in_entry.value, ""_jrs)));
};
if (basic_commands_help == nullptr)
basic_commands->getTable().callback(basic_command_no_help_callback);
else
basic_commands->getTable().callback(basic_command_callback);
}
};

10
RenX.Core/RenX_Server.h

@ -31,7 +31,7 @@
#include "Jupiter/ArrayList.h"
#include "Jupiter/String.h"
#include "Jupiter/CString.h"
#include "Jupiter/INIFile.h"
#include "Jupiter/Config.h"
#include "Jupiter/Thinker.h"
#include "Jupiter/Rehash.h"
#include "RenX.h"
@ -88,7 +88,7 @@ namespace RenX
Jupiter::ArrayList<RenX::BuildingInfo> buildings; /** A list of buildings in the server */
Jupiter::ArrayList<Jupiter::StringS> mutators; /** A list of buildings the server is running */
Jupiter::ArrayList<RenX::Map> maps; /** A list of maps in the server's rotation */
Jupiter::INIFile varData; /** This may be replaced later with a more dedicated type. */
Jupiter::Config varData; /** Variable data. */
/**
* @brief Checks if the server is connected to RCON.
@ -1007,7 +1007,7 @@ namespace RenX
/** Private members */
private:
void init(const Jupiter::INIFile::Section &config);
void init(const Jupiter::Config &config);
void wipePlayers();
/** Tracking variables */
@ -1091,8 +1091,8 @@ namespace RenX
Jupiter::StringS ban_from_str;
Jupiter::StringS IRCPrefix;
Jupiter::StringS CommandPrefix;
Jupiter::INIFile::Section *commandAccessLevels;
Jupiter::INIFile::Section *commandAliases;
Jupiter::Config *commandAccessLevels;
Jupiter::Config *commandAliases;
};
}

351
RenX.Core/RenX_Tags.cpp

@ -17,7 +17,6 @@
*/
#include "Jupiter/Reference_String.h"
#include "Jupiter/INIFile.h"
#include "Jupiter/IRC_Client.h"
#include "RenX_Core.h"
#include "RenX_Functions.h"
@ -53,14 +52,14 @@ bool TagsImp::initialize()
this->tagItr = 0;
this->uniqueTag = "\0\0\0\0\0\0"_jrs;
const Jupiter::INIFile &config = RenX::getCore()->getConfig();
const Jupiter::ReadableString &configSection = config.get(Jupiter::ReferenceString::empty, "TagDefinitions"_jrs, "Tags"_jrs);
Jupiter::Config &config = RenX::getCore()->getConfig();
const Jupiter::ReadableString &configSection = config.get("TagDefinitions"_jrs, "Tags"_jrs);
TagsImp::bar_width = config.getInt(configSection, "BarWidth"_jrs, 19);
TagsImp::bar_width = config[configSection].get<int>("BarWidth"_jrs, 19);
/** Global formats */
this->dateFmt = config.get(configSection, "DateFormat"_jrs, "%A, %B %d, %Y"_jrs);
this->timeFmt = config.get(configSection, "TimeFormat"_jrs, "%H:%M:%S"_jrs);;
this->dateFmt = config[configSection].get("DateFormat"_jrs, "%A, %B %d, %Y"_jrs);
this->timeFmt = config[configSection].get("TimeFormat"_jrs, "%H:%M:%S"_jrs);;
/** Internal message tags */
@ -251,188 +250,188 @@ bool TagsImp::initialize()
/** External (config) tags */
/** Global tags */
this->dateTag = config.get(configSection, "DateTag"_jrs, "{DATE}"_jrs);
this->timeTag = config.get(configSection, "TimeTag"_jrs, "{TIME}"_jrs);
this->dateTag = config[configSection].get("DateTag"_jrs, "{DATE}"_jrs);
this->timeTag = config[configSection].get("TimeTag"_jrs, "{TIME}"_jrs);
/** Server tags */
this->rconVersionTag = config.get(configSection, "RCONVersionTag"_jrs, "{RVER}"_jrs);
this->gameVersionTag = config.get(configSection, "GameVersionTag"_jrs, "{GVER}"_jrs);
this->rulesTag = config.get(configSection, "RulesTag"_jrs, "{RULES}"_jrs);
this->userTag = config.get(configSection, "UserTag"_jrs, "{USER}"_jrs);
this->serverNameTag = config.get(configSection, "ServerNameTag"_jrs, "{SERVERNAME}"_jrs);
this->mapTag = config.get(configSection, "MapTag"_jrs, "{MAP}"_jrs);
this->mapGUIDTag = config.get(configSection, "MapGUIDTag"_jrs, "{MGUID}"_jrs);
this->serverHostnameTag = config.get(configSection, "ServerHostnameTag"_jrs, "{SERVERHOST}"_jrs);
this->serverPortTag = config.get(configSection, "ServerPortTag"_jrs, "{SERVERPORT}"_jrs);
this->socketHostnameTag = config.get(configSection, "SocketHostnameTag"_jrs, "{SOCKHOST}"_jrs);
this->socketPortTag = config.get(configSection, "SocketPortTag"_jrs, "{SOCKPORT}"_jrs);
this->serverPrefixTag = config.get(configSection, "ServerPrefixTag"_jrs, "{SERVERPREFIX}"_jrs);
this->rconVersionTag = config[configSection].get("RCONVersionTag"_jrs, "{RVER}"_jrs);
this->gameVersionTag = config[configSection].get("GameVersionTag"_jrs, "{GVER}"_jrs);
this->rulesTag = config[configSection].get("RulesTag"_jrs, "{RULES}"_jrs);
this->userTag = config[configSection].get("UserTag"_jrs, "{USER}"_jrs);
this->serverNameTag = config[configSection].get("ServerNameTag"_jrs, "{SERVERNAME}"_jrs);
this->mapTag = config[configSection].get("MapTag"_jrs, "{MAP}"_jrs);
this->mapGUIDTag = config[configSection].get("MapGUIDTag"_jrs, "{MGUID}"_jrs);
this->serverHostnameTag = config[configSection].get("ServerHostnameTag"_jrs, "{SERVERHOST}"_jrs);
this->serverPortTag = config[configSection].get("ServerPortTag"_jrs, "{SERVERPORT}"_jrs);
this->socketHostnameTag = config[configSection].get("SocketHostnameTag"_jrs, "{SOCKHOST}"_jrs);
this->socketPortTag = config[configSection].get("SocketPortTag"_jrs, "{SOCKPORT}"_jrs);
this->serverPrefixTag = config[configSection].get("ServerPrefixTag"_jrs, "{SERVERPREFIX}"_jrs);
/** Player tags */
this->nameTag = config.get(configSection, "NameTag"_jrs, "{NAME}"_jrs);
this->rawNameTag = config.get(configSection, "RawNameTag"_jrs, "{RNAME}"_jrs);
this->ipTag = config.get(configSection, "IPTag"_jrs, "{IP}"_jrs);
this->hwidTag = config.get(configSection, "HWIDTag"_jrs, "{HWID}"_jrs);
this->rdnsTag = config.get(configSection, "RDNSTag"_jrs, "{RDNS}"_jrs);
this->steamTag = config.get(configSection, "SteamTag"_jrs, "{STEAM}"_jrs);
this->uuidTag = config.get(configSection, "UUIDTag"_jrs, "{UUID}"_jrs);
this->idTag = config.get(configSection, "IDTag"_jrs, "{ID}"_jrs);
this->characterTag = config.get(configSection, "CharacterTag"_jrs, "{CHAR}"_jrs);
this->vehicleTag = config.get(configSection, "VehicleTag"_jrs, "{VEH}"_jrs);
this->adminTag = config.get(configSection, "AdminTag"_jrs, "{ADMIN}"_jrs);
this->prefixTag = config.get(configSection, "PrefixTag"_jrs, "{PREFIX}"_jrs);
this->gamePrefixTag = config.get(configSection, "GamePrefixTag"_jrs, "{GPREFIX}"_jrs);
this->teamColorTag = config.get(configSection, "TeamColorTag"_jrs, "{TCOLOR}"_jrs);
this->teamShortTag = config.get(configSection, "ShortTeamTag"_jrs, "{TEAMS}"_jrs);
this->teamLongTag = config.get(configSection, "LongTeamTag"_jrs, "{TEAML}"_jrs);
this->pingTag = config.get(configSection, "PingTag"_jrs, "{PING}"_jrs);
this->scoreTag = config.get(configSection, "ScoreTag"_jrs, "{SCORE}"_jrs);
this->scorePerMinuteTag = config.get(configSection, "ScorePerMinuteTag"_jrs, "{SPM}"_jrs);
this->creditsTag = config.get(configSection, "CreditsTag"_jrs, "{CREDITS}"_jrs);
this->killsTag = config.get(configSection, "KillsTag"_jrs, "{KILLS}"_jrs);
this->deathsTag = config.get(configSection, "DeathsTag"_jrs, "{DEATHS}"_jrs);
this->kdrTag = config.get(configSection, "KDRTag"_jrs, "{KDR}"_jrs);
this->suicidesTag = config.get(configSection, "SuicidesTag"_jrs, "{SUICIDES}"_jrs);
this->headshotsTag = config.get(configSection, "HeadshotsTag"_jrs, "{HEADSHOTS}"_jrs);
this->headshotKillRatioTag = config.get(configSection, "HeadshotKillRatioTag"_jrs, "{HSKR}"_jrs);
this->vehicleKillsTag = config.get(configSection, "VehicleKillsTag"_jrs, "{VEHICLEKILLS}"_jrs);
this->buildingKillsTag = config.get(configSection, "BuildingKillsTag"_jrs, "{BUILDINGKILLS}"_jrs);
this->defenceKillsTag = config.get(configSection, "DefenceKillsTag"_jrs, "{DEFENCEKILLS}"_jrs);
this->gameTimeTag = config.get(configSection, "GameTimeTag"_jrs, "{GAMETIME}"_jrs);
this->gamesTag = config.get(configSection, "GamesTag"_jrs, "{GAMES}"_jrs);
this->GDIGamesTag = config.get(configSection, "GDIGamesTag"_jrs, "{GDIGAMES}"_jrs);
this->NodGamesTag = config.get(configSection, "NodGamesTag"_jrs, "{NODGAMES}"_jrs);
this->winsTag = config.get(configSection, "WinsTag"_jrs, "{WINS}"_jrs);
this->GDIWinsTag = config.get(configSection, "GDIWinsTag"_jrs, "{GDIWINS}"_jrs);
this->NodWinsTag = config.get(configSection, "NodWinsTag"_jrs, "{NODWINS}"_jrs);
this->tiesTag = config.get(configSection, "TiesTag"_jrs, "{TIES}"_jrs);
this->lossesTag = config.get(configSection, "LossesTag"_jrs, "{LOSSES}"_jrs);
this->GDILossesTag = config.get(configSection, "GDILossesTag"_jrs, "{GDILOSSES}"_jrs);
this->NodLossesTag = config.get(configSection, "NodLossesTag"_jrs, "{NODLOSSES}"_jrs);
this->winLossRatioTag = config.get(configSection, "WinLossRatioTag"_jrs, "{WLR}"_jrs);
this->GDIWinLossRatioTag = config.get(configSection, "GDIWinLossRatioTag"_jrs, "{GDIWLR}"_jrs);
this->NodWinLossRatioTag = config.get(configSection, "NodWinLossRatioTag"_jrs, "{NODWLR}"_jrs);
this->beaconPlacementsTag = config.get(configSection, "BeaconPlacementsTag"_jrs, "{BEACONPLACEMENTS}"_jrs);
this->beaconDisarmsTag = config.get(configSection, "BeaconDisarmsTag"_jrs, "{BEACONDISARMS}"_jrs);
this->proxyPlacementsTag = config.get(configSection, "ProxyPlacementsTag"_jrs, "{PROXYPLACEMENTS}"_jrs);
this->proxyDisarmsTag = config.get(configSection, "ProxyDisarmsTag"_jrs, "{PROXYDISARMS}"_jrs);
this->capturesTag = config.get(configSection, "CapturesTag"_jrs, "{CAPTURES}"_jrs);
this->stealsTag = config.get(configSection, "StealsTag"_jrs, "{STEALS}"_jrs);
this->stolenTag = config.get(configSection, "StolenTag"_jrs, "{STOLEN}"_jrs);
this->accessTag = config.get(configSection, "AccessTag"_jrs, "{ACCESS}"_jrs);
this->nameTag = config[configSection].get("NameTag"_jrs, "{NAME}"_jrs);
this->rawNameTag = config[configSection].get("RawNameTag"_jrs, "{RNAME}"_jrs);
this->ipTag = config[configSection].get("IPTag"_jrs, "{IP}"_jrs);
this->hwidTag = config[configSection].get("HWIDTag"_jrs, "{HWID}"_jrs);
this->rdnsTag = config[configSection].get("RDNSTag"_jrs, "{RDNS}"_jrs);
this->steamTag = config[configSection].get("SteamTag"_jrs, "{STEAM}"_jrs);
this->uuidTag = config[configSection].get("UUIDTag"_jrs, "{UUID}"_jrs);
this->idTag = config[configSection].get("IDTag"_jrs, "{ID}"_jrs);
this->characterTag = config[configSection].get("CharacterTag"_jrs, "{CHAR}"_jrs);
this->vehicleTag = config[configSection].get("VehicleTag"_jrs, "{VEH}"_jrs);
this->adminTag = config[configSection].get("AdminTag"_jrs, "{ADMIN}"_jrs);
this->prefixTag = config[configSection].get("PrefixTag"_jrs, "{PREFIX}"_jrs);
this->gamePrefixTag = config[configSection].get("GamePrefixTag"_jrs, "{GPREFIX}"_jrs);
this->teamColorTag = config[configSection].get("TeamColorTag"_jrs, "{TCOLOR}"_jrs);
this->teamShortTag = config[configSection].get("ShortTeamTag"_jrs, "{TEAMS}"_jrs);
this->teamLongTag = config[configSection].get("LongTeamTag"_jrs, "{TEAML}"_jrs);
this->pingTag = config[configSection].get("PingTag"_jrs, "{PING}"_jrs);
this->scoreTag = config[configSection].get("ScoreTag"_jrs, "{SCORE}"_jrs);
this->scorePerMinuteTag = config[configSection].get("ScorePerMinuteTag"_jrs, "{SPM}"_jrs);
this->creditsTag = config[configSection].get("CreditsTag"_jrs, "{CREDITS}"_jrs);
this->killsTag = config[configSection].get("KillsTag"_jrs, "{KILLS}"_jrs);
this->deathsTag = config[configSection].get("DeathsTag"_jrs, "{DEATHS}"_jrs);
this->kdrTag = config[configSection].get("KDRTag"_jrs, "{KDR}"_jrs);
this->suicidesTag = config[configSection].get("SuicidesTag"_jrs, "{SUICIDES}"_jrs);
this->headshotsTag = config[configSection].get("HeadshotsTag"_jrs, "{HEADSHOTS}"_jrs);
this->headshotKillRatioTag = config[configSection].get("HeadshotKillRatioTag"_jrs, "{HSKR}"_jrs);
this->vehicleKillsTag = config[configSection].get("VehicleKillsTag"_jrs, "{VEHICLEKILLS}"_jrs);
this->buildingKillsTag = config[configSection].get("BuildingKillsTag"_jrs, "{BUILDINGKILLS}"_jrs);
this->defenceKillsTag = config[configSection].get("DefenceKillsTag"_jrs, "{DEFENCEKILLS}"_jrs);
this->gameTimeTag = config[configSection].get("GameTimeTag"_jrs, "{GAMETIME}"_jrs);
this->gamesTag = config[configSection].get("GamesTag"_jrs, "{GAMES}"_jrs);
this->GDIGamesTag = config[configSection].get("GDIGamesTag"_jrs, "{GDIGAMES}"_jrs);
this->NodGamesTag = config[configSection].get("NodGamesTag"_jrs, "{NODGAMES}"_jrs);
this->winsTag = config[configSection].get("WinsTag"_jrs, "{WINS}"_jrs);
this->GDIWinsTag = config[configSection].get("GDIWinsTag"_jrs, "{GDIWINS}"_jrs);
this->NodWinsTag = config[configSection].get("NodWinsTag"_jrs, "{NODWINS}"_jrs);
this->tiesTag = config[configSection].get("TiesTag"_jrs, "{TIES}"_jrs);
this->lossesTag = config[configSection].get("LossesTag"_jrs, "{LOSSES}"_jrs);
this->GDILossesTag = config[configSection].get("GDILossesTag"_jrs, "{GDILOSSES}"_jrs);
this->NodLossesTag = config[configSection].get("NodLossesTag"_jrs, "{NODLOSSES}"_jrs);
this->winLossRatioTag = config[configSection].get("WinLossRatioTag"_jrs, "{WLR}"_jrs);
this->GDIWinLossRatioTag = config[configSection].get("GDIWinLossRatioTag"_jrs, "{GDIWLR}"_jrs);
this->NodWinLossRatioTag = config[configSection].get("NodWinLossRatioTag"_jrs, "{NODWLR}"_jrs);
this->beaconPlacementsTag = config[configSection].get("BeaconPlacementsTag"_jrs, "{BEACONPLACEMENTS}"_jrs);
this->beaconDisarmsTag = config[configSection].get("BeaconDisarmsTag"_jrs, "{BEACONDISARMS}"_jrs);
this->proxyPlacementsTag = config[configSection].get("ProxyPlacementsTag"_jrs, "{PROXYPLACEMENTS}"_jrs);
this->proxyDisarmsTag = config[configSection].get("ProxyDisarmsTag"_jrs, "{PROXYDISARMS}"_jrs);
this->capturesTag = config[configSection].get("CapturesTag"_jrs, "{CAPTURES}"_jrs);
this->stealsTag = config[configSection].get("StealsTag"_jrs, "{STEALS}"_jrs);
this->stolenTag = config[configSection].get("StolenTag"_jrs, "{STOLEN}"_jrs);
this->accessTag = config[configSection].get("AccessTag"_jrs, "{ACCESS}"_jrs);
/** Victim player tags */
this->victimNameTag = config.get(configSection, "VictimNameTag"_jrs, "{VNAME}"_jrs);
this->victimRawNameTag = config.get(configSection, "VictimRawNameTag"_jrs, "{VRNAME}"_jrs);
this->victimIPTag = config.get(configSection, "VictimIPTag"_jrs, "{VIP}"_jrs);
this->victimHWIDTag = config.get(configSection, "VictimHWIDTag"_jrs, "{VHWID}"_jrs);
this->victimRDNSTag = config.get(configSection, "VictimRDNSTag"_jrs, "{VRDNS}"_jrs);
this->victimSteamTag = config.get(configSection, "VictimSteamTag"_jrs, "{VSTEAM}"_jrs);
this->victimUUIDTag = config.get(configSection, "VictimUUIDTag"_jrs, "{VUUID}"_jrs);
this->victimIDTag = config.get(configSection, "VictimIDTag"_jrs, "{VID}"_jrs);
this->victimCharacterTag = config.get(configSection, "VictimCharacterTag"_jrs, "{VCHAR}"_jrs);
this->victimVehicleTag = config.get(configSection, "VictimVehicleTag"_jrs, "{VVEH}"_jrs);
this->victimAdminTag = config.get(configSection, "VictimAdminTag"_jrs, "{VADMIN}"_jrs);
this->victimPrefixTag = config.get(configSection, "VictimPrefixTag"_jrs, "{VPREFIX}"_jrs);
this->victimGamePrefixTag = config.get(configSection, "VictimGamePrefixTag"_jrs, "{VGPREFIX}"_jrs);
this->victimTeamColorTag = config.get(configSection, "VictimTeamColorTag"_jrs, "{VTCOLOR}"_jrs);
this->victimTeamShortTag = config.get(configSection, "VictimShortTeamTag"_jrs, "{VTEAMS}"_jrs);
this->victimTeamLongTag = config.get(configSection, "VictimLongTeamTag"_jrs, "{VTEAML}"_jrs);
this->victimPingTag = config.get(configSection, "VictimPingTag"_jrs, "{VPING}"_jrs);
this->victimScoreTag = config.get(configSection, "VictimScoreTag"_jrs, "{VSCORE}"_jrs);
this->victimScorePerMinuteTag = config.get(configSection, "VictimScorePerMinuteTag"_jrs, "{VSPM}"_jrs);
this->victimCreditsTag = config.get(configSection, "VictimCreditsTag"_jrs, "{VCREDITS}"_jrs);
this->victimKillsTag = config.get(configSection, "VictimKillsTag"_jrs, "{VKILLS}"_jrs);
this->victimDeathsTag = config.get(configSection, "VictimDeathsTag"_jrs, "{VDEATHS}"_jrs);
this->victimKDRTag = config.get(configSection, "VictimKDRTag"_jrs, "{VKDR}"_jrs);
this->victimSuicidesTag = config.get(configSection, "VictimSuicidesTag"_jrs, "{VSUICIDES}"_jrs);
this->victimHeadshotsTag = config.get(configSection, "VictimHeadshotsTag"_jrs, "{VHEADSHOTS}"_jrs);
this->victimHeadshotKillRatioTag = config.get(configSection, "VictimHeadshotKillRatioTag"_jrs, "{VHSKR}"_jrs);
this->victimVehicleKillsTag = config.get(configSection, "VictimVehicleKillsTag"_jrs, "{VVEHICLEKILLS}"_jrs);
this->victimBuildingKillsTag = config.get(configSection, "VictimBuildingKillsTag"_jrs, "{VBUILDINGKILLS}"_jrs);
this->victimDefenceKillsTag = config.get(configSection, "VictimDefenceKillsTag"_jrs, "{VDEFENCEKILLS}"_jrs);
this->victimGameTimeTag = config.get(configSection, "VictimGameTimeTag"_jrs, "{VGAMETIME}"_jrs);
this->victimGamesTag = config.get(configSection, "VictimGamesTag"_jrs, "{VGAMES}"_jrs);
this->victimGDIGamesTag = config.get(configSection, "VictimGDIGamesTag"_jrs, "{VGDIGAMES}"_jrs);
this->victimNodGamesTag = config.get(configSection, "VictimNodGamesTag"_jrs, "{VNODGAMES}"_jrs);
this->victimWinsTag = config.get(configSection, "VictimWinsTag"_jrs, "{VWINS}"_jrs);
this->victimGDIWinsTag = config.get(configSection, "VictimGDIWinsTag"_jrs, "{VGDIWINS}"_jrs);
this->victimNodWinsTag = config.get(configSection, "VictimNodWinsTag"_jrs, "{VNODWINS}"_jrs);
this->victimTiesTag = config.get(configSection, "VictimTiesTag"_jrs, "{VTIES}"_jrs);
this->victimLossesTag = config.get(configSection, "VictimLossesTag"_jrs, "{VLOSSES}"_jrs);
this->victimGDILossesTag = config.get(configSection, "VictimGDILossesTag"_jrs, "{VGDILOSSES}"_jrs);
this->victimNodLossesTag = config.get(configSection, "VictimNodLossesTag"_jrs, "{VNODLOSSES}"_jrs);
this->victimWinLossRatioTag = config.get(configSection, "VictimWinLossRatioTag"_jrs, "{VWLR}"_jrs);
this->victimGDIWinLossRatioTag = config.get(configSection, "VictimGDIWinLossRatioTag"_jrs, "{VGDIWLR}"_jrs);
this->victimNodWinLossRatioTag = config.get(configSection, "VictimNodWinLossRatioTag"_jrs, "{VNODWLR}"_jrs);
this->victimBeaconPlacementsTag = config.get(configSection, "VictimBeaconPlacementsTag"_jrs, "{VBEACONPLACEMENTS}"_jrs);
this->victimBeaconDisarmsTag = config.get(configSection, "VictimBeaconDisarmsTag"_jrs, "{VBEACONDISARMS}"_jrs);
this->victimProxyPlacementsTag = config.get(configSection, "VictimProxyPlacementsTag"_jrs, "{VPROXYPLACEMENTS}"_jrs);
this->victimProxyDisarmsTag = config.get(configSection, "VictimProxyDisarmsTag"_jrs, "{VPROXYDISARMS}"_jrs);
this->victimCapturesTag = config.get(configSection, "VictimCapturesTag"_jrs, "{VCAPTURES}"_jrs);
this->victimStealsTag = config.get(configSection, "VictimStealsTag"_jrs, "{VSTEALS}"_jrs);
this->victimStolenTag = config.get(configSection, "VictimStolenTag"_jrs, "{VSTOLEN}"_jrs);
this->victimAccessTag = config.get(configSection, "VictimAccessTag"_jrs, "{VACCESS}"_jrs);
this->victimNameTag = config[configSection].get("VictimNameTag"_jrs, "{VNAME}"_jrs);
this->victimRawNameTag = config[configSection].get("VictimRawNameTag"_jrs, "{VRNAME}"_jrs);
this->victimIPTag = config[configSection].get("VictimIPTag"_jrs, "{VIP}"_jrs);
this->victimHWIDTag = config[configSection].get("VictimHWIDTag"_jrs, "{VHWID}"_jrs);
this->victimRDNSTag = config[configSection].get("VictimRDNSTag"_jrs, "{VRDNS}"_jrs);
this->victimSteamTag = config[configSection].get("VictimSteamTag"_jrs, "{VSTEAM}"_jrs);
this->victimUUIDTag = config[configSection].get("VictimUUIDTag"_jrs, "{VUUID}"_jrs);
this->victimIDTag = config[configSection].get("VictimIDTag"_jrs, "{VID}"_jrs);
this->victimCharacterTag = config[configSection].get("VictimCharacterTag"_jrs, "{VCHAR}"_jrs);
this->victimVehicleTag = config[configSection].get("VictimVehicleTag"_jrs, "{VVEH}"_jrs);
this->victimAdminTag = config[configSection].get("VictimAdminTag"_jrs, "{VADMIN}"_jrs);
this->victimPrefixTag = config[configSection].get("VictimPrefixTag"_jrs, "{VPREFIX}"_jrs);
this->victimGamePrefixTag = config[configSection].get("VictimGamePrefixTag"_jrs, "{VGPREFIX}"_jrs);
this->victimTeamColorTag = config[configSection].get("VictimTeamColorTag"_jrs, "{VTCOLOR}"_jrs);
this->victimTeamShortTag = config[configSection].get("VictimShortTeamTag"_jrs, "{VTEAMS}"_jrs);
this->victimTeamLongTag = config[configSection].get("VictimLongTeamTag"_jrs, "{VTEAML}"_jrs);
this->victimPingTag = config[configSection].get("VictimPingTag"_jrs, "{VPING}"_jrs);
this->victimScoreTag = config[configSection].get("VictimScoreTag"_jrs, "{VSCORE}"_jrs);
this->victimScorePerMinuteTag = config[configSection].get("VictimScorePerMinuteTag"_jrs, "{VSPM}"_jrs);
this->victimCreditsTag = config[configSection].get("VictimCreditsTag"_jrs, "{VCREDITS}"_jrs);
this->victimKillsTag = config[configSection].get("VictimKillsTag"_jrs, "{VKILLS}"_jrs);
this->victimDeathsTag = config[configSection].get("VictimDeathsTag"_jrs, "{VDEATHS}"_jrs);
this->victimKDRTag = config[configSection].get("VictimKDRTag"_jrs, "{VKDR}"_jrs);
this->victimSuicidesTag = config[configSection].get("VictimSuicidesTag"_jrs, "{VSUICIDES}"_jrs);
this->victimHeadshotsTag = config[configSection].get("VictimHeadshotsTag"_jrs, "{VHEADSHOTS}"_jrs);
this->victimHeadshotKillRatioTag = config[configSection].get("VictimHeadshotKillRatioTag"_jrs, "{VHSKR}"_jrs);
this->victimVehicleKillsTag = config[configSection].get("VictimVehicleKillsTag"_jrs, "{VVEHICLEKILLS}"_jrs);
this->victimBuildingKillsTag = config[configSection].get("VictimBuildingKillsTag"_jrs, "{VBUILDINGKILLS}"_jrs);
this->victimDefenceKillsTag = config[configSection].get("VictimDefenceKillsTag"_jrs, "{VDEFENCEKILLS}"_jrs);
this->victimGameTimeTag = config[configSection].get("VictimGameTimeTag"_jrs, "{VGAMETIME}"_jrs);
this->victimGamesTag = config[configSection].get("VictimGamesTag"_jrs, "{VGAMES}"_jrs);
this->victimGDIGamesTag = config[configSection].get("VictimGDIGamesTag"_jrs, "{VGDIGAMES}"_jrs);
this->victimNodGamesTag = config[configSection].get("VictimNodGamesTag"_jrs, "{VNODGAMES}"_jrs);
this->victimWinsTag = config[configSection].get("VictimWinsTag"_jrs, "{VWINS}"_jrs);
this->victimGDIWinsTag = config[configSection].get("VictimGDIWinsTag"_jrs, "{VGDIWINS}"_jrs);
this->victimNodWinsTag = config[configSection].get("VictimNodWinsTag"_jrs, "{VNODWINS}"_jrs);
this->victimTiesTag = config[configSection].get("VictimTiesTag"_jrs, "{VTIES}"_jrs);
this->victimLossesTag = config[configSection].get("VictimLossesTag"_jrs, "{VLOSSES}"_jrs);
this->victimGDILossesTag = config[configSection].get("VictimGDILossesTag"_jrs, "{VGDILOSSES}"_jrs);
this->victimNodLossesTag = config[configSection].get("VictimNodLossesTag"_jrs, "{VNODLOSSES}"_jrs);
this->victimWinLossRatioTag = config[configSection].get("VictimWinLossRatioTag"_jrs, "{VWLR}"_jrs);
this->victimGDIWinLossRatioTag = config[configSection].get("VictimGDIWinLossRatioTag"_jrs, "{VGDIWLR}"_jrs);
this->victimNodWinLossRatioTag = config[configSection].get("VictimNodWinLossRatioTag"_jrs, "{VNODWLR}"_jrs);
this->victimBeaconPlacementsTag = config[configSection].get("VictimBeaconPlacementsTag"_jrs, "{VBEACONPLACEMENTS}"_jrs);
this->victimBeaconDisarmsTag = config[configSection].get("VictimBeaconDisarmsTag"_jrs, "{VBEACONDISARMS}"_jrs);
this->victimProxyPlacementsTag = config[configSection].get("VictimProxyPlacementsTag"_jrs, "{VPROXYPLACEMENTS}"_jrs);
this->victimProxyDisarmsTag = config[configSection].get("VictimProxyDisarmsTag"_jrs, "{VPROXYDISARMS}"_jrs);
this->victimCapturesTag = config[configSection].get("VictimCapturesTag"_jrs, "{VCAPTURES}"_jrs);
this->victimStealsTag = config[configSection].get("VictimStealsTag"_jrs, "{VSTEALS}"_jrs);
this->victimStolenTag = config[configSection].get("VictimStolenTag"_jrs, "{VSTOLEN}"_jrs);
this->victimAccessTag = config[configSection].get("VictimAccessTag"_jrs, "{VACCESS}"_jrs);
/** Building tags */
this->buildingNameTag = config.get(configSection, "BuildingNameTag"_jrs, "{BNAME}"_jrs);
this->buildingRawNameTag = config.get(configSection, "BuildingRawNameTag"_jrs, "{BRNAME}"_jrs);
this->buildingHealthTag = config.get(configSection, "BuildingHealthTag"_jrs, "{BHEALTH}"_jrs);
this->buildingMaxHealthTag = config.get(configSection, "BuildingMaxHealthTag"_jrs, "{BMHEALTH}"_jrs);
this->buildingHealthPercentageTag = config.get(configSection, "BuildingHealthPercentageTag"_jrs, "{BHP}"_jrs);
this->buildingArmorTag = config.get(configSection, "BuildingArmorTag"_jrs, "{BARMOR}"_jrs);
this->buildingMaxArmorTag = config.get(configSection, "BuildingMaxArmorTag"_jrs, "{BMARMOR}"_jrs);
this->buildingArmorPercentageTag = config.get(configSection, "BuildingArmorPercentageTag"_jrs, "{BAP}"_jrs);
this->buildingDurabilityTag = config.get(configSection, "BuildingDurabilityTag"_jrs, "{BDURABILITY}"_jrs);
this->buildingMaxDurabilityTag = config.get(configSection, "BuildingMaxDurabilityTag"_jrs, "{BMDURABILITY}"_jrs);
this->buildingDurabilityPercentageTag = config.get(configSection, "BuildingDurabilityPercentageTag"_jrs, "{BDP}"_jrs);
this->buildingTeamColorTag = config.get(configSection, "BuildingTeamColorTag"_jrs, "{BCOLOR}"_jrs);
this->buildingTeamShortTag = config.get(configSection, "BuildingShortTeamTag"_jrs, "{BTEAMS}"_jrs);
this->buildingTeamLongTag = config.get(configSection, "BuildingLongTeamTag"_jrs, "{BTEAML}"_jrs);
this->buildingNameTag = config[configSection].get("BuildingNameTag"_jrs, "{BNAME}"_jrs);
this->buildingRawNameTag = config[configSection].get("BuildingRawNameTag"_jrs, "{BRNAME}"_jrs);
this->buildingHealthTag = config[configSection].get("BuildingHealthTag"_jrs, "{BHEALTH}"_jrs);
this->buildingMaxHealthTag = config[configSection].get("BuildingMaxHealthTag"_jrs, "{BMHEALTH}"_jrs);
this->buildingHealthPercentageTag = config[configSection].get("BuildingHealthPercentageTag"_jrs, "{BHP}"_jrs);
this->buildingArmorTag = config[configSection].get("BuildingArmorTag"_jrs, "{BARMOR}"_jrs);
this->buildingMaxArmorTag = config[configSection].get("BuildingMaxArmorTag"_jrs, "{BMARMOR}"_jrs);
this->buildingArmorPercentageTag = config[configSection].get("BuildingArmorPercentageTag"_jrs, "{BAP}"_jrs);
this->buildingDurabilityTag = config[configSection].get("BuildingDurabilityTag"_jrs, "{BDURABILITY}"_jrs);
this->buildingMaxDurabilityTag = config[configSection].get("BuildingMaxDurabilityTag"_jrs, "{BMDURABILITY}"_jrs);
this->buildingDurabilityPercentageTag = config[configSection].get("BuildingDurabilityPercentageTag"_jrs, "{BDP}"_jrs);
this->buildingTeamColorTag = config[configSection].get("BuildingTeamColorTag"_jrs, "{BCOLOR}"_jrs);
this->buildingTeamShortTag = config[configSection].get("BuildingShortTeamTag"_jrs, "{BTEAMS}"_jrs);
this->buildingTeamLongTag = config[configSection].get("BuildingLongTeamTag"_jrs, "{BTEAML}"_jrs);
/** Ladder tags */
this->rankTag = config.get(configSection, "RankTag"_jrs, "{RANK}"_jrs);
this->lastGameTag = config.get(configSection, "LastGameTag"_jrs, "{LASTGAME}"_jrs);
this->GDIScoreTag = config.get(configSection, "GDIScoreTag"_jrs, "{GDISCORE}"_jrs);
this->GDISPMTag = config.get(configSection, "GDISPMTag"_jrs, "{GDISPM}"_jrs);
this->GDIGameTimeTag = config.get(configSection, "GDIGameTimeTag"_jrs, "{GDIGAMETIME}"_jrs);
this->GDITiesTag = config.get(configSection, "GDITiesTag"_jrs, "{GDITIES}"_jrs);
this->GDIBeaconPlacementsTag = config.get(configSection, "GDIBeaconPlacementsTag"_jrs, "{GDIBEACONPLACEMENTS}"_jrs);
this->GDIBeaconDisarmsTag = config.get(configSection, "GDIBeaconDisarmsTag"_jrs, "{GDIBEACONDISARMS}"_jrs);
this->GDIProxyPlacementsTag = config.get(configSection, "GDIProxyPlacementsTag"_jrs, "{GDIPROXYPLACEMENTS}"_jrs);
this->GDIProxyDisarmsTag = config.get(configSection, "GDIProxyDisarmsTag"_jrs, "{GDIPROXYDISARMS}"_jrs);
this->GDIKillsTag = config.get(configSection, "GDIKillsTag"_jrs, "{GDIKILLS}"_jrs);
this->GDIDeathsTag = config.get(configSection, "GDIDeathsTag"_jrs, "{GDIDEATHS}"_jrs);
this->GDIVehicleKillsTag = config.get(configSection, "GDIVehicleKillsTag"_jrs, "{GDIVEHICLEKILLS}"_jrs);
this->GDIDefenceKillsTag = config.get(configSection, "GDIDefenceKillsTag"_jrs, "{GDIDEFENCEKILLS}"_jrs);
this->GDIBuildingKillsTag = config.get(configSection, "GDIBuildingKillsTag"_jrs, "{GDIBUILDINGKILLS}"_jrs);
this->GDIKDRTag = config.get(configSection, "GDIKDRTag"_jrs, "{GDIKDR}"_jrs);
this->GDIHeadshotsTag = config.get(configSection, "GDIHeadshotsTag"_jrs, "{GDIHEADSHOTS}"_jrs);
this->GDIHeadshotKillRatioTag = config.get(configSection, "GDIHeadshotKillRatioTag"_jrs, "{GDIHSKR}"_jrs);
this->NodScoreTag = config.get(configSection, "NodScoreTag"_jrs, "{NODSCORE}"_jrs);
this->NodSPMTag = config.get(configSection, "NodSPMTag"_jrs, "{NODSPM}"_jrs);
this->NodGameTimeTag = config.get(configSection, "NodGameTimeTag"_jrs, "{NODGAMETIME}"_jrs);
this->NodTiesTag = config.get(configSection, "NodTiesTag"_jrs, "{NODTIES}"_jrs);
this->NodBeaconPlacementsTag = config.get(configSection, "NodBeaconPlacementsTag"_jrs, "{NODBEACONPLACEMENTS}"_jrs);
this->NodBeaconDisarmsTag = config.get(configSection, "NodBeaconDisarmsTag"_jrs, "{NODBEACONDISARMS}"_jrs);
this->NodProxyPlacementsTag = config.get(configSection, "NodProxyPlacementsTag"_jrs, "{NODPROXYPLACEMENTS}"_jrs);
this->NodProxyDisarmsTag = config.get(configSection, "NodProxyDisarmsTag"_jrs, "{NODPROXYDISARMS}"_jrs);
this->NodKillsTag = config.get(configSection, "NodKillsTag"_jrs, "{NODKILLS}"_jrs);
this->NodDeathsTag = config.get(configSection, "NodDeathsTag"_jrs, "{NODDEATHS}"_jrs);
this->NodVehicleKillsTag = config.get(configSection, "NodVehicleKillsTag"_jrs, "{NODVEHICLEKILLS}"_jrs);
this->NodDefenceKillsTag = config.get(configSection, "NodDefenceKillsTag"_jrs, "{NODDEFENCEKILLS}"_jrs);
this->NodBuildingKillsTag = config.get(configSection, "NodBuildingKillsTag"_jrs, "{NODBUILDINGKILLS}"_jrs);
this->NodKDRTag = config.get(configSection, "NodKDRTag"_jrs, "{NODKDR}"_jrs);
this->NodHeadshotsTag = config.get(configSection, "NodHeadshotsTag"_jrs, "{NODHEADSHOTS}"_jrs);
this->NodHeadshotKillRatioTag = config.get(configSection, "NodHeadshotKillRatioTag"_jrs, "{NODHSKR}"_jrs);
this->rankTag = config[configSection].get("RankTag"_jrs, "{RANK}"_jrs);
this->lastGameTag = config[configSection].get("LastGameTag"_jrs, "{LASTGAME}"_jrs);
this->GDIScoreTag = config[configSection].get("GDIScoreTag"_jrs, "{GDISCORE}"_jrs);
this->GDISPMTag = config[configSection].get("GDISPMTag"_jrs, "{GDISPM}"_jrs);
this->GDIGameTimeTag = config[configSection].get("GDIGameTimeTag"_jrs, "{GDIGAMETIME}"_jrs);
this->GDITiesTag = config[configSection].get("GDITiesTag"_jrs, "{GDITIES}"_jrs);
this->GDIBeaconPlacementsTag = config[configSection].get("GDIBeaconPlacementsTag"_jrs, "{GDIBEACONPLACEMENTS}"_jrs);
this->GDIBeaconDisarmsTag = config[configSection].get("GDIBeaconDisarmsTag"_jrs, "{GDIBEACONDISARMS}"_jrs);
this->GDIProxyPlacementsTag = config[configSection].get("GDIProxyPlacementsTag"_jrs, "{GDIPROXYPLACEMENTS}"_jrs);
this->GDIProxyDisarmsTag = config[configSection].get("GDIProxyDisarmsTag"_jrs, "{GDIPROXYDISARMS}"_jrs);
this->GDIKillsTag = config[configSection].get("GDIKillsTag"_jrs, "{GDIKILLS}"_jrs);
this->GDIDeathsTag = config[configSection].get("GDIDeathsTag"_jrs, "{GDIDEATHS}"_jrs);
this->GDIVehicleKillsTag = config[configSection].get("GDIVehicleKillsTag"_jrs, "{GDIVEHICLEKILLS}"_jrs);
this->GDIDefenceKillsTag = config[configSection].get("GDIDefenceKillsTag"_jrs, "{GDIDEFENCEKILLS}"_jrs);
this->GDIBuildingKillsTag = config[configSection].get("GDIBuildingKillsTag"_jrs, "{GDIBUILDINGKILLS}"_jrs);
this->GDIKDRTag = config[configSection].get("GDIKDRTag"_jrs, "{GDIKDR}"_jrs);
this->GDIHeadshotsTag = config[configSection].get("GDIHeadshotsTag"_jrs, "{GDIHEADSHOTS}"_jrs);
this->GDIHeadshotKillRatioTag = config[configSection].get("GDIHeadshotKillRatioTag"_jrs, "{GDIHSKR}"_jrs);
this->NodScoreTag = config[configSection].get("NodScoreTag"_jrs, "{NODSCORE}"_jrs);
this->NodSPMTag = config[configSection].get("NodSPMTag"_jrs, "{NODSPM}"_jrs);
this->NodGameTimeTag = config[configSection].get("NodGameTimeTag"_jrs, "{NODGAMETIME}"_jrs);
this->NodTiesTag = config[configSection].get("NodTiesTag"_jrs, "{NODTIES}"_jrs);
this->NodBeaconPlacementsTag = config[configSection].get("NodBeaconPlacementsTag"_jrs, "{NODBEACONPLACEMENTS}"_jrs);
this->NodBeaconDisarmsTag = config[configSection].get("NodBeaconDisarmsTag"_jrs, "{NODBEACONDISARMS}"_jrs);
this->NodProxyPlacementsTag = config[configSection].get("NodProxyPlacementsTag"_jrs, "{NODPROXYPLACEMENTS}"_jrs);
this->NodProxyDisarmsTag = config[configSection].get("NodProxyDisarmsTag"_jrs, "{NODPROXYDISARMS}"_jrs);
this->NodKillsTag = config[configSection].get("NodKillsTag"_jrs, "{NODKILLS}"_jrs);
this->NodDeathsTag = config[configSection].get("NodDeathsTag"_jrs, "{NODDEATHS}"_jrs);
this->NodVehicleKillsTag = config[configSection].get("NodVehicleKillsTag"_jrs, "{NODVEHICLEKILLS}"_jrs);
this->NodDefenceKillsTag = config[configSection].get("NodDefenceKillsTag"_jrs, "{NODDEFENCEKILLS}"_jrs);
this->NodBuildingKillsTag = config[configSection].get("NodBuildingKillsTag"_jrs, "{NODBUILDINGKILLS}"_jrs);
this->NodKDRTag = config[configSection].get("NodKDRTag"_jrs, "{NODKDR}"_jrs);
this->NodHeadshotsTag = config[configSection].get("NodHeadshotsTag"_jrs, "{NODHEADSHOTS}"_jrs);
this->NodHeadshotKillRatioTag = config[configSection].get("NodHeadshotKillRatioTag"_jrs, "{NODHSKR}"_jrs);
/** Other tags */
this->weaponTag = config.get(configSection, "WeaponTag"_jrs, "{WEAPON}"_jrs);
this->objectTag = config.get(configSection, "ObjectTag"_jrs, "{OBJECT}"_jrs);
this->messageTag = config.get(configSection, "MessageTag"_jrs, "{MESSAGE}"_jrs);
this->newNameTag = config.get(configSection, "NewNameTag"_jrs, "{NNAME}"_jrs);
this->winScoreTag = config.get(configSection, "WinScoreTag"_jrs, "{WINSCORE}"_jrs);
this->loseScoreTag = config.get(configSection, "LoseScoreTag"_jrs, "{LOSESCORE}"_jrs);
this->weaponTag = config[configSection].get("WeaponTag"_jrs, "{WEAPON}"_jrs);
this->objectTag = config[configSection].get("ObjectTag"_jrs, "{OBJECT}"_jrs);
this->messageTag = config[configSection].get("MessageTag"_jrs, "{MESSAGE}"_jrs);
this->newNameTag = config[configSection].get("NewNameTag"_jrs, "{NNAME}"_jrs);
this->winScoreTag = config[configSection].get("WinScoreTag"_jrs, "{WINSCORE}"_jrs);
this->loseScoreTag = config[configSection].get("LoseScoreTag"_jrs, "{LOSESCORE}"_jrs);
return true;
}

1
RenX.Core/RenX_TeamInfo.h

@ -25,7 +25,6 @@
*/
#include "Jupiter/String.h"
#include "Jupiter/INIFile.h"
#include "RenX.h"
/** DLL Linkage Nagging */

11
RenX.ExcessiveHeadshots/ExcessiveHeadshots.cpp

@ -18,7 +18,6 @@
#include <ctime>
#include "Jupiter/IRC_Client.h"
#include "Jupiter/INIFile.h"
#include "ExcessiveHeadshots.h"
#include "RenX_Server.h"
#include "RenX_PlayerInfo.h"
@ -28,11 +27,11 @@ using namespace Jupiter::literals;
bool RenX_ExcessiveHeadshotsPlugin::initialize()
{
RenX_ExcessiveHeadshotsPlugin::ratio = this->config.getDouble(Jupiter::ReferenceString::empty, "HeadshotKillRatio"_jrs, 0.5);
RenX_ExcessiveHeadshotsPlugin::minKills = this->config.getInt(Jupiter::ReferenceString::empty, "Kills"_jrs, 10);
RenX_ExcessiveHeadshotsPlugin::minKD = this->config.getDouble(Jupiter::ReferenceString::empty, "KillDeathRatio"_jrs, 5.0);
RenX_ExcessiveHeadshotsPlugin::minKPS = this->config.getDouble(Jupiter::ReferenceString::empty, "KillsPerSecond"_jrs, 0.5);
RenX_ExcessiveHeadshotsPlugin::minFlags = this->config.getInt(Jupiter::ReferenceString::empty, "Flags"_jrs, 4);
RenX_ExcessiveHeadshotsPlugin::ratio = this->config.get<double>("HeadshotKillRatio"_jrs, 0.5);
RenX_ExcessiveHeadshotsPlugin::minKills = this->config.get<unsigned int>("Kills"_jrs, 10);
RenX_ExcessiveHeadshotsPlugin::minKD = this->config.get<double>("KillDeathRatio"_jrs, 5.0);
RenX_ExcessiveHeadshotsPlugin::minKPS = this->config.get<double>("KillsPerSecond"_jrs, 0.5);
RenX_ExcessiveHeadshotsPlugin::minFlags = this->config.get<unsigned int>("Flags"_jrs, 4);
return true;
}

13
RenX.ExtraLogging/RenX_ExtraLogging.cpp

@ -17,11 +17,12 @@
*/
#include "Jupiter/IRC_Client.h"
#include "Jupiter/INIFile.h"
#include "RenX_ExtraLogging.h"
#include "RenX_Server.h"
#include "RenX_Tags.h"
using namespace Jupiter::literals;
RenX_ExtraLoggingPlugin::RenX_ExtraLoggingPlugin()
{
RenX_ExtraLoggingPlugin::day = localtime(std::addressof<const time_t>(time(nullptr)))->tm_yday;
@ -45,11 +46,11 @@ int RenX_ExtraLoggingPlugin::OnRehash()
bool RenX_ExtraLoggingPlugin::initialize()
{
RenX_ExtraLoggingPlugin::filePrefix = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("FilePrefix"), Jupiter::StringS::Format("[%.*s] %.*s", RenX::tags->timeTag.size(), RenX::tags->timeTag.ptr(), RenX::tags->serverPrefixTag.size(), RenX::tags->serverPrefixTag.ptr()));
RenX_ExtraLoggingPlugin::consolePrefix = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("ConsolePrefix"), RenX_ExtraLoggingPlugin::filePrefix);
RenX_ExtraLoggingPlugin::newDayFmt = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("NewDayFormat"), Jupiter::StringS::Format("Time: %.*s %.*s", RenX::tags->timeTag.size(), RenX::tags->timeTag.ptr(), RenX::tags->dateTag.size(), RenX::tags->dateTag.ptr()));
RenX_ExtraLoggingPlugin::printToConsole = this->config.getBool(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("PrintToConsole"), true);
const Jupiter::CStringS logFile = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("LogFile"));
RenX_ExtraLoggingPlugin::filePrefix = this->config.get("FilePrefix"_jrs, Jupiter::StringS::Format("[%.*s] %.*s", RenX::tags->timeTag.size(), RenX::tags->timeTag.ptr(), RenX::tags->serverPrefixTag.size(), RenX::tags->serverPrefixTag.ptr()));
RenX_ExtraLoggingPlugin::consolePrefix = this->config.get("ConsolePrefix"_jrs, RenX_ExtraLoggingPlugin::filePrefix);
RenX_ExtraLoggingPlugin::newDayFmt = this->config.get("NewDayFormat"_jrs, Jupiter::StringS::Format("Time: %.*s %.*s", RenX::tags->timeTag.size(), RenX::tags->timeTag.ptr(), RenX::tags->dateTag.size(), RenX::tags->dateTag.ptr()));
RenX_ExtraLoggingPlugin::printToConsole = this->config.get<bool>("PrintToConsole"_jrs, true);
const Jupiter::CStringS logFile = this->config.get("LogFile"_jrs);
RenX::sanitizeTags(RenX_ExtraLoggingPlugin::filePrefix);
RenX::sanitizeTags(RenX_ExtraLoggingPlugin::consolePrefix);

11
RenX.Greetings/RenX_Greetings.cpp

@ -17,12 +17,13 @@
*/
#include "Jupiter/IRC_Client.h"
#include "Jupiter/INIFile.h"
#include "RenX_Greetings.h"
#include "RenX_PlayerInfo.h"
#include "RenX_Server.h"
#include "RenX_Tags.h"
using namespace Jupiter::literals;
void RenX_GreetingsPlugin::RenX_OnJoin(RenX::Server *server, const RenX::PlayerInfo *player)
{
auto sendMessage = [&](const Jupiter::ReadableString &m)
@ -70,11 +71,11 @@ int RenX_GreetingsPlugin::OnRehash()
bool RenX_GreetingsPlugin::initialize()
{
RenX_GreetingsPlugin::sendPrivate = this->config.getBool(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("SendPrivate"), true);
RenX_GreetingsPlugin::sendMode = this->config.getInt(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("SendMode"), 0);
RenX_GreetingsPlugin::greetingsFile.load(this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("GreetingsFile"), STRING_LITERAL_AS_REFERENCE("RenX.Greetings.txt")));
RenX_GreetingsPlugin::sendPrivate = this->config.get<bool>("SendPrivate"_jrs, true);
RenX_GreetingsPlugin::sendMode = this->config.get<unsigned int>("SendMode"_jrs, 0);
RenX_GreetingsPlugin::greetingsFile.load(this->config.get("GreetingsFile"_jrs, "RenX.Greetings.txt"_jrs));
if (RenX_GreetingsPlugin::greetingsFile.getLineCount() == 0)
RenX_GreetingsPlugin::greetingsFile.addData(STRING_LITERAL_AS_REFERENCE("Please notify the server administrator to properly configure or disable server greetings.\r\n"));
RenX_GreetingsPlugin::greetingsFile.addData("Please notify the server administrator to properly configure or disable server greetings.\r\n"_jrs);
RenX_GreetingsPlugin::lastLine = RenX_GreetingsPlugin::greetingsFile.getLineCount() - 1;
return true;

25
RenX.IRCJoin/RenX_IRCJoin.cpp

@ -17,25 +17,26 @@
*/
#include "Jupiter/IRC_Client.h"
#include "Jupiter/INIFile.h"
#include "Jupiter/String.h"
#include "RenX_Core.h"
#include "RenX_Server.h"
#include "RenX_IRCJoin.h"
using namespace Jupiter::literals;
bool RenX_IRCJoinPlugin::initialize()
{
RenX_IRCJoinPlugin::publicOnly = this->config.getBool(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("PublicOnly"), true);
RenX_IRCJoinPlugin::joinMsgAlways = this->config.getBool(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Join.MsgAlways"), false);
RenX_IRCJoinPlugin::partMsgAlways = this->config.getBool(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Part.MsgAlways"), false);
RenX_IRCJoinPlugin::minAccessPartMessage = this->config.getInt(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Part.MinAccess"), 0);
RenX_IRCJoinPlugin::maxAccessPartMessage = this->config.getInt(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Part.MaxAccess"), -1);
RenX_IRCJoinPlugin::nameTag = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("NameTag"), STRING_LITERAL_AS_REFERENCE("{NAME}"));
RenX_IRCJoinPlugin::chanTag = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("ChannelTag"), STRING_LITERAL_AS_REFERENCE("{CHAN}"));
RenX_IRCJoinPlugin::partReasonTag = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("PartReasonTag"), STRING_LITERAL_AS_REFERENCE("{REASON}"));
RenX_IRCJoinPlugin::joinFmt = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Join.Format"), STRING_LITERAL_AS_REFERENCE("{NAME} has joined {CHAN}!"));
RenX_IRCJoinPlugin::partFmt = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Part.Format"), STRING_LITERAL_AS_REFERENCE("{NAME} has left {CHAN} ({REASON})!"));
RenX_IRCJoinPlugin::partFmtNoReason = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Part.FormatNoReason"), STRING_LITERAL_AS_REFERENCE("{NAME} has left {CHAN}!"));
RenX_IRCJoinPlugin::publicOnly = this->config.get<bool>("PublicOnly"_jrs, true);
RenX_IRCJoinPlugin::joinMsgAlways = this->config.get<bool>("Join.MsgAlways"_jrs, false);
RenX_IRCJoinPlugin::partMsgAlways = this->config.get<bool>("Part.MsgAlways"_jrs, false);
RenX_IRCJoinPlugin::minAccessPartMessage = this->config.get<int>("Part.MinAccess"_jrs, 0);
RenX_IRCJoinPlugin::maxAccessPartMessage = this->config.get<int>("Part.MaxAccess"_jrs, -1);
RenX_IRCJoinPlugin::nameTag = this->config.get("NameTag"_jrs, "{NAME}"_jrs);
RenX_IRCJoinPlugin::chanTag = this->config.get("ChannelTag"_jrs, "{CHAN}"_jrs);
RenX_IRCJoinPlugin::partReasonTag = this->config.get("PartReasonTag"_jrs, "{REASON}"_jrs);
RenX_IRCJoinPlugin::joinFmt = this->config.get("Join.Format"_jrs, "{NAME} has joined {CHAN}!"_jrs);
RenX_IRCJoinPlugin::partFmt = this->config.get("Part.Format"_jrs, "{NAME} has left {CHAN} ({REASON})!"_jrs);
RenX_IRCJoinPlugin::partFmtNoReason = this->config.get("Part.FormatNoReason"_jrs, "{NAME} has left {CHAN}!"_jrs);
return true;
}

9
RenX.Ladder.All-Time/RenX_Ladder_All_Time.cpp

@ -16,7 +16,6 @@
* Written by Jessica James <jessica.aj@outlook.com>
*/
#include "Jupiter/INIFile.h"
#include "Jupiter/IRC_Client.h"
#include "RenX_Ladder_All_Time.h"
@ -25,12 +24,12 @@ using namespace Jupiter::literals;
bool RenX_Ladder_All_TimePlugin::initialize()
{
// Load database
this->database.process_file(this->config.get(Jupiter::ReferenceString::empty, "LadderDatabase"_jrs, "Ladder.db"_jrs));
this->database.setName(this->config.get(Jupiter::ReferenceString::empty, "DatabaseName"_jrs, "All-Time"_jrs));
this->database.setOutputTimes(this->config.getBool(Jupiter::ReferenceString::empty, "OutputTimes"_jrs, true));
this->database.process_file(this->config.get("LadderDatabase"_jrs, "Ladder.db"_jrs));
this->database.setName(this->config.get("DatabaseName"_jrs, "All-Time"_jrs));
this->database.setOutputTimes(this->config.get<bool>("OutputTimes"_jrs, true));
// Force database to default, if desired
if (this->config.getBool(Jupiter::ReferenceString::empty, "ForceDefault"_jrs, true))
if (this->config.get<bool>("ForceDefault"_jrs, true))
RenX::default_ladder_database = &this->database;
return true;

9
RenX.Ladder.Daily/RenX_Ladder_Daily.cpp

@ -17,7 +17,6 @@
*/
#include <ctime>
#include "Jupiter/INIFile.h"
#include "Jupiter/IRC_Client.h"
#include "RenX_Ladder_Daily.h"
@ -26,15 +25,15 @@ using namespace Jupiter::literals;
bool RenX_Ladder_Daily_TimePlugin::initialize()
{
// Load database
this->database.process_file(this->config.get(Jupiter::ReferenceString::empty, "LadderDatabase"_jrs, "Ladder.Daily.db"_jrs));
this->database.setName(this->config.get(Jupiter::ReferenceString::empty, "DatabaseName"_jrs, "Daily"_jrs));
this->database.setOutputTimes(this->config.getBool(Jupiter::ReferenceString::empty, "OutputTimes"_jrs, false));
this->database.process_file(this->config.get("LadderDatabase"_jrs, "Ladder.Daily.db"_jrs));
this->database.setName(this->config.get("DatabaseName"_jrs, "Daily"_jrs));
this->database.setOutputTimes(this->config.get<bool>("OutputTimes"_jrs, false));
this->last_sorted_day = gmtime(std::addressof<const time_t>(time(0)))->tm_wday;
this->database.OnPreUpdateLadder = OnPreUpdateLadder;
// Force database to default, if desired
if (this->config.getBool(Jupiter::ReferenceString::empty, "ForceDefault"_jrs, false))
if (this->config.get<bool>("ForceDefault"_jrs, false))
RenX::default_ladder_database = &this->database;
return true;

9
RenX.Ladder.Monthly/RenX_Ladder_Monthly.cpp

@ -17,7 +17,6 @@
*/
#include <ctime>
#include "Jupiter/INIFile.h"
#include "Jupiter/IRC_Client.h"
#include "RenX_Ladder_Monthly.h"
@ -26,15 +25,15 @@ using namespace Jupiter::literals;
bool RenX_Ladder_Monthly_TimePlugin::initialize()
{
// Load database
this->database.process_file(this->config.get(Jupiter::ReferenceString::empty, "LadderDatabase"_jrs, "Ladder.Monthly.db"_jrs));
this->database.setName(this->config.get(Jupiter::ReferenceString::empty, "DatabaseName"_jrs, "Monthly"_jrs));
this->database.setOutputTimes(this->config.getBool(Jupiter::ReferenceString::empty, "OutputTimes"_jrs, false));
this->database.process_file(this->config.get("LadderDatabase"_jrs, "Ladder.Monthly.db"_jrs));
this->database.setName(this->config.get("DatabaseName"_jrs, "Monthly"_jrs));
this->database.setOutputTimes(this->config.get<bool>("OutputTimes"_jrs, false));
this->last_sorted_month = gmtime(std::addressof<const time_t>(time(0)))->tm_mon;
this->database.OnPreUpdateLadder = OnPreUpdateLadder;
// Force database to default, if desired
if (this->config.getBool(Jupiter::ReferenceString::empty, "ForceDefault"_jrs, false))
if (this->config.get<bool>("ForceDefault"_jrs, false))
RenX::default_ladder_database = &this->database;
return true;

75
RenX.Ladder.Web/RenX_Ladder_Web.cpp

@ -17,7 +17,6 @@
*/
#include "Jupiter/IRC_Client.h"
#include "Jupiter/INIFile.h"
#include "Jupiter/HTTP.h"
#include "Jupiter/HTTP_QueryString.h"
#include "HTTPServer.h"
@ -28,11 +27,11 @@ using namespace Jupiter::literals;
bool RenX_Ladder_WebPlugin::initialize()
{
RenX_Ladder_WebPlugin::ladder_page_name = this->config.get(Jupiter::ReferenceString::empty, "LadderPageName"_jrs, ""_jrs);
RenX_Ladder_WebPlugin::search_page_name = this->config.get(Jupiter::ReferenceString::empty, "SearchPageName"_jrs, "search"_jrs);
RenX_Ladder_WebPlugin::profile_page_name = this->config.get(Jupiter::ReferenceString::empty, "ProfilePageName"_jrs, "profile"_jrs);
RenX_Ladder_WebPlugin::web_hostname = this->config.get(Jupiter::ReferenceString::empty, "Hostname"_jrs, ""_jrs);
RenX_Ladder_WebPlugin::web_path = this->config.get(Jupiter::ReferenceString::empty, "Path"_jrs, "/"_jrs);
RenX_Ladder_WebPlugin::ladder_page_name = this->config.get("LadderPageName"_jrs, ""_jrs);
RenX_Ladder_WebPlugin::search_page_name = this->config.get("SearchPageName"_jrs, "search"_jrs);
RenX_Ladder_WebPlugin::profile_page_name = this->config.get("ProfilePageName"_jrs, "profile"_jrs);
RenX_Ladder_WebPlugin::web_hostname = this->config.get("Hostname"_jrs, ""_jrs);
RenX_Ladder_WebPlugin::web_path = this->config.get("Path"_jrs, "/"_jrs);
this->init();
@ -73,17 +72,17 @@ void RenX_Ladder_WebPlugin::init()
FILE *file;
int chr;
RenX_Ladder_WebPlugin::web_header_filename = this->config.get(Jupiter::ReferenceString::empty, "HeaderFilename"_jrs, "RenX.Ladder.Web.Header.html"_jrs);
RenX_Ladder_WebPlugin::web_footer_filename = this->config.get(Jupiter::ReferenceString::empty, "FooterFilename"_jrs, "RenX.Ladder.Web.Footer.html"_jrs);
RenX_Ladder_WebPlugin::web_profile_filename = this->config.get(Jupiter::ReferenceString::empty, "ProfileFilename"_jrs, "RenX.Ladder.Web.Profile.html"_jrs);
RenX_Ladder_WebPlugin::web_ladder_table_header_filename = this->config.get(Jupiter::ReferenceString::empty, "LadderTableHeaderFilename"_jrs, "RenX.Ladder.Web.Ladder.Table.Header.html"_jrs);
RenX_Ladder_WebPlugin::web_ladder_table_footer_filename = this->config.get(Jupiter::ReferenceString::empty, "LadderTableFooterFilename"_jrs, "RenX.Ladder.Web.Ladder.Table.Footer.html"_jrs);
RenX_Ladder_WebPlugin::entries_per_page = this->config.getInt(Jupiter::ReferenceString::empty, "EntriesPerPage"_jrs, 50);
RenX_Ladder_WebPlugin::min_search_name_length = this->config.getInt(Jupiter::ReferenceString::empty, "MinSearchNameLength"_jrs, 3);
RenX_Ladder_WebPlugin::web_header_filename = this->config.get("HeaderFilename"_jrs, "RenX.Ladder.Web.Header.html"_jrs);
RenX_Ladder_WebPlugin::web_footer_filename = this->config.get("FooterFilename"_jrs, "RenX.Ladder.Web.Footer.html"_jrs);
RenX_Ladder_WebPlugin::web_profile_filename = this->config.get("ProfileFilename"_jrs, "RenX.Ladder.Web.Profile.html"_jrs);
RenX_Ladder_WebPlugin::web_ladder_table_header_filename = this->config.get("LadderTableHeaderFilename"_jrs, "RenX.Ladder.Web.Ladder.Table.Header.html"_jrs);
RenX_Ladder_WebPlugin::web_ladder_table_footer_filename = this->config.get("LadderTableFooterFilename"_jrs, "RenX.Ladder.Web.Ladder.Table.Footer.html"_jrs);
RenX_Ladder_WebPlugin::entries_per_page = this->config.get<size_t>("EntriesPerPage"_jrs, 50);
RenX_Ladder_WebPlugin::min_search_name_length = this->config.get<size_t>("MinSearchNameLength"_jrs, 3);
RenX_Ladder_WebPlugin::entry_table_row = this->config.get(Jupiter::ReferenceString::empty, "EntryTableRow"_jrs, R"html(<tr><td class="data-col-a">{RANK}</td><td class="data-col-b"><a href="profile?id={STEAM}&database={OBJECT}">{NAME}</a></td><td class="data-col-a">{SCORE}</td><td class="data-col-b">{SPM}</td><td class="data-col-a">{GAMES}</td><td class="data-col-b">{WINS}</td><td class="data-col-a">{LOSSES}</td><td class="data-col-b">{WLR}</td><td class="data-col-a">{KILLS}</td><td class="data-col-b">{DEATHS}</td><td class="data-col-a">{KDR}</td></tr>)html"_jrs);
RenX_Ladder_WebPlugin::entry_profile_previous = this->config.get(Jupiter::ReferenceString::empty, "EntryProfilePrevious"_jrs, R"html(<form class="profile-previous"><input type="hidden" name="database" value="{OBJECT}"/><input type="hidden" name="id" value="{WEAPON}"/><input class="profile-previous-submit" type="submit" value="&#x21A9 Previous" /></form>)html"_jrs);
RenX_Ladder_WebPlugin::entry_profile_next = this->config.get(Jupiter::ReferenceString::empty, "EntryProfileNext"_jrs, R"html(<form class="profile-next"><input type="hidden" name="database" value="{OBJECT}"/><input type="hidden" name="id" value="{VSTEAM}"/><input class="profile-next-submit" type="submit" value="Next &#x21AA" /></form>)html"_jrs);
RenX_Ladder_WebPlugin::entry_table_row = this->config.get("EntryTableRow"_jrs, R"html(<tr><td class="data-col-a">{RANK}</td><td class="data-col-b"><a href="profile?id={STEAM}&database={OBJECT}">{NAME}</a></td><td class="data-col-a">{SCORE}</td><td class="data-col-b">{SPM}</td><td class="data-col-a">{GAMES}</td><td class="data-col-b">{WINS}</td><td class="data-col-a">{LOSSES}</td><td class="data-col-b">{WLR}</td><td class="data-col-a">{KILLS}</td><td class="data-col-b">{DEATHS}</td><td class="data-col-a">{KDR}</td></tr>)html"_jrs);
RenX_Ladder_WebPlugin::entry_profile_previous = this->config.get("EntryProfilePrevious"_jrs, R"html(<form class="profile-previous"><input type="hidden" name="database" value="{OBJECT}"/><input type="hidden" name="id" value="{WEAPON}"/><input class="profile-previous-submit" type="submit" value="&#x21A9 Previous" /></form>)html"_jrs);
RenX_Ladder_WebPlugin::entry_profile_next = this->config.get("EntryProfileNext"_jrs, R"html(<form class="profile-next"><input type="hidden" name="database" value="{OBJECT}"/><input type="hidden" name="id" value="{VSTEAM}"/><input class="profile-next-submit" type="submit" value="Next &#x21AA" /></form>)html"_jrs);
RenX::sanitizeTags(RenX_Ladder_WebPlugin::entry_table_row);
RenX::sanitizeTags(RenX_Ladder_WebPlugin::entry_profile_previous);
@ -185,7 +184,7 @@ Jupiter::String generate_search(RenX::LadderDatabase *db)
}
/** Database selector */
Jupiter::String generate_database_selector(RenX::LadderDatabase *db, const Jupiter::INIFile::Section &query_params)
Jupiter::String generate_database_selector(RenX::LadderDatabase *db, const Jupiter::HashTable &query_params)
{
RenX::LadderDatabase *db_ptr;
Jupiter::String result(256);
@ -216,17 +215,13 @@ Jupiter::String generate_database_selector(RenX::LadderDatabase *db, const Jupit
}
}
Jupiter::INIFile::Section::KeyValuePair *pair;
for (size_t index = 0; index != query_params.size(); ++index)
{
pair = query_params.getPair(index);
if (pair->getKey().equalsi("id"))
const Jupiter::ReadableString *value = query_params.get("id"_jrs);
if (value != nullptr)
{
result += R"html(<input type="hidden" name="id" value=")html"_jrs;
result += pair->getValue();
result += *value;
result += R"html("/>)html"_jrs;
}
}
result += R"database-select(</select><input type="submit" class="leaderboard-button" value="Go"/></form>)database-select"_jrs;
return result;
@ -314,7 +309,7 @@ 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::INIFile::Section &query_params)
Jupiter::String *RenX_Ladder_WebPlugin::generate_ladder_page(RenX::LadderDatabase *db, uint8_t format, size_t index, size_t count, const Jupiter::HashTable &query_params)
{
Jupiter::String *result = new Jupiter::String(2048);
@ -339,7 +334,7 @@ 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, const Jupiter::ReadableString &name, const Jupiter::INIFile::Section &query_params)
Jupiter::String *RenX_Ladder_WebPlugin::generate_search_page(RenX::LadderDatabase *db, uint8_t format, size_t start_index, size_t count, const Jupiter::ReadableString &name, const Jupiter::HashTable &query_params)
{
Jupiter::String *result = new Jupiter::String(2048);
@ -390,7 +385,7 @@ Jupiter::String *RenX_Ladder_WebPlugin::generate_search_page(RenX::LadderDatabas
}
/** Profile page */
Jupiter::String *RenX_Ladder_WebPlugin::generate_profile_page(RenX::LadderDatabase *db, uint8_t format, uint64_t steam_id, const Jupiter::INIFile::Section &query_params)
Jupiter::String *RenX_Ladder_WebPlugin::generate_profile_page(RenX::LadderDatabase *db, uint8_t format, uint64_t steam_id, const Jupiter::HashTable &query_params)
{
Jupiter::String *result = new Jupiter::String(2048);
@ -457,7 +452,7 @@ Jupiter::String *RenX_Ladder_WebPlugin::generate_profile_page(RenX::LadderDataba
/** Content functions */
Jupiter::ReadableString *generate_no_db_page(const Jupiter::INIFile::Section &query_params)
Jupiter::ReadableString *generate_no_db_page(const Jupiter::HashTable &query_params)
{
Jupiter::String *result = new Jupiter::String(pluginInstance.header);
if (RenX::ladder_databases.size() != 0)
@ -481,11 +476,11 @@ Jupiter::ReadableString *handle_ladder_page(const Jupiter::ReadableString &query
if (html_form_response.table.size() != 0)
{
format = static_cast<uint8_t>(html_form_response.table.getInt("format"_jrs, format));
start_index = static_cast<size_t>(html_form_response.table.getInt("start"_jrs, start_index));
count = static_cast<size_t>(html_form_response.table.getInt("count"_jrs, count));
format = html_form_response.table.getCast<uint8_t>("format"_jrs, format);
start_index = html_form_response.table.getCast<size_t>("start"_jrs, start_index);
count = html_form_response.table.getCast<size_t>("count"_jrs, count);
const Jupiter::ReadableString &db_name = html_form_response.table.get("database"_jrs);
const Jupiter::ReadableString &db_name = html_form_response.table.get("database"_jrs, Jupiter::ReferenceString::empty);
if (db_name.isNotEmpty())
{
db = nullptr;
@ -514,12 +509,12 @@ Jupiter::ReadableString *handle_search_page(const Jupiter::ReadableString &query
if (html_form_response.table.size() != 0)
{
format = static_cast<uint8_t>(html_form_response.table.getInt("format"_jrs, format));
start_index = static_cast<size_t>(html_form_response.table.getInt("start"_jrs, start_index));
count = static_cast<size_t>(html_form_response.table.getInt("count"_jrs, count));
name = html_form_response.table.get("name"_jrs);
format = html_form_response.table.getCast<uint8_t>("format"_jrs, format);
start_index = html_form_response.table.getCast<size_t>("start"_jrs, start_index);
count = html_form_response.table.getCast<size_t>("count"_jrs, count);
name = html_form_response.table.get("name"_jrs, name);
const Jupiter::ReadableString &db_name = html_form_response.table.get("database"_jrs);
const Jupiter::ReadableString &db_name = html_form_response.table.get("database"_jrs, Jupiter::ReferenceString::empty);
if (db_name.isNotEmpty())
{
db = nullptr;
@ -550,10 +545,10 @@ Jupiter::ReadableString *handle_profile_page(const Jupiter::ReadableString &quer
if (html_form_response.table.size() != 0)
{
format = static_cast<uint8_t>(html_form_response.table.getInt("format"_jrs, format));
steam_id = html_form_response.table.getLongLong("id"_jrs);
format = html_form_response.table.getCast<uint8_t>("format"_jrs, format);
steam_id = html_form_response.table.getCast<uint64_t>("id"_jrs, steam_id);
const Jupiter::ReadableString &db_name = html_form_response.table.get("database"_jrs);
const Jupiter::ReadableString &db_name = html_form_response.table.get("database"_jrs, Jupiter::ReferenceString::empty);
if (db_name.isNotEmpty())
{
db = nullptr;

7
RenX.Ladder.Web/RenX_Ladder_Web.h

@ -22,7 +22,6 @@
#include "Jupiter/Plugin.h"
#include "Jupiter/Reference_String.h"
#include "Jupiter/CString.h"
#include "Jupiter/INIFile.h"
#include "RenX_Plugin.h"
class RenX_Ladder_WebPlugin : public RenX::Plugin
@ -40,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::INIFile::Section &query_params);
Jupiter::String *generate_search_page(RenX::LadderDatabase *db, uint8_t format, size_t start_index, size_t count, const Jupiter::ReadableString &name, const Jupiter::INIFile::Section &query_params);
Jupiter::String *generate_profile_page(RenX::LadderDatabase *db, uint8_t format, uint64_t steam_id, const Jupiter::INIFile::Section &query_params);
Jupiter::String *generate_ladder_page(RenX::LadderDatabase *db, uint8_t format, size_t start_index, size_t count, const Jupiter::HashTable &query_params);
Jupiter::String *generate_search_page(RenX::LadderDatabase *db, uint8_t format, size_t start_index, size_t count, const Jupiter::ReadableString &name, const Jupiter::HashTable &query_params);
Jupiter::String *generate_profile_page(RenX::LadderDatabase *db, uint8_t format, uint64_t steam_id, const Jupiter::HashTable &query_params);
inline size_t getEntriesPerPage() const { return this->entries_per_page; }
inline size_t getMinSearchNameLength() const { return this->min_search_name_length; };

11
RenX.Ladder.Weekly/RenX_Ladder_Weekly.cpp

@ -17,7 +17,6 @@
*/
#include <ctime>
#include "Jupiter/INIFile.h"
#include "Jupiter/IRC_Client.h"
#include "RenX_Ladder_Weekly.h"
@ -26,16 +25,16 @@ using namespace Jupiter::literals;
bool RenX_Ladder_Weekly_TimePlugin::initialize()
{
// Load database
this->database.process_file(this->config.get(Jupiter::ReferenceString::empty, "LadderDatabase"_jrs, "Ladder.Weekly.db"_jrs));
this->database.setName(this->config.get(Jupiter::ReferenceString::empty, "DatabaseName"_jrs, "Weekly"_jrs));
this->database.setOutputTimes(this->config.getBool(Jupiter::ReferenceString::empty, "OutputTimes"_jrs, false));
this->database.process_file(this->config.get("LadderDatabase"_jrs, "Ladder.Weekly.db"_jrs));
this->database.setName(this->config.get("DatabaseName"_jrs, "Weekly"_jrs));
this->database.setOutputTimes(this->config.get<bool>("OutputTimes"_jrs, false));
this->last_sorted_day = gmtime(std::addressof<const time_t>(time(0)))->tm_wday;
this->reset_day = this->config.getInt(Jupiter::ReferenceString::empty, "ResetDay"_jrs);
this->reset_day = this->config.get<int>("ResetDay"_jrs);
this->database.OnPreUpdateLadder = OnPreUpdateLadder;
// Force database to default, if desired
if (this->config.getBool(Jupiter::ReferenceString::empty, "ForceDefault"_jrs, false))
if (this->config.get<bool>("ForceDefault"_jrs, false))
RenX::default_ladder_database = &this->database;
return true;

9
RenX.Ladder.Yearly/RenX_Ladder_Yearly.cpp

@ -17,7 +17,6 @@
*/
#include <ctime>
#include "Jupiter/INIFile.h"
#include "Jupiter/IRC_Client.h"
#include "RenX_Ladder_Yearly.h"
@ -26,15 +25,15 @@ using namespace Jupiter::literals;
bool RenX_Ladder_Yearly_TimePlugin::initialize()
{
// Load database
this->database.process_file(this->config.get(Jupiter::ReferenceString::empty, "LadderDatabase"_jrs, "Ladder.Yearly.db"_jrs));
this->database.setName(this->config.get(Jupiter::ReferenceString::empty, "DatabaseName"_jrs, "Yearly"_jrs));
this->database.setOutputTimes(this->config.getBool(Jupiter::ReferenceString::empty, "OutputTimes"_jrs, false));
this->database.process_file(this->config.get("LadderDatabase"_jrs, "Ladder.Yearly.db"_jrs));
this->database.setName(this->config.get("DatabaseName"_jrs, "Yearly"_jrs));
this->database.setOutputTimes(this->config.get<bool>("OutputTimes"_jrs, false));
this->last_sorted_year = gmtime(std::addressof<const time_t>(time(0)))->tm_year;
this->database.OnPreUpdateLadder = OnPreUpdateLadder;
// Force database to default, if desired
if (this->config.getBool(Jupiter::ReferenceString::empty, "ForceDefault"_jrs, false))
if (this->config.get<bool>("ForceDefault"_jrs, false))
RenX::default_ladder_database = &this->database;
return true;

15
RenX.Ladder/RenX_Ladder.cpp

@ -17,7 +17,6 @@
*/
#include <cinttypes>
#include "Jupiter/INIFile.h"
#include "Console_Command.h"
#include "RenX_Ladder.h"
#include "RenX_Server.h"
@ -28,8 +27,8 @@ using namespace Jupiter::literals;
bool RenX_LadderPlugin::initialize()
{
RenX_LadderPlugin::only_pure = this->config.getBool(Jupiter::ReferenceString::empty, "OnlyPure"_jrs, false);
int mlcpno = this->config.getInt(Jupiter::ReferenceString::empty, "MaxLadderCommandPartNameOutput"_jrs, 5);
RenX_LadderPlugin::only_pure = this->config.get<bool>("OnlyPure"_jrs, false);
int mlcpno = this->config.get<int>("MaxLadderCommandPartNameOutput"_jrs, 5);
if (mlcpno < 0)
RenX_LadderPlugin::max_ladder_command_part_name_output = 0;
else
@ -59,8 +58,8 @@ void RenX_LadderPlugin::RenX_OnGameOver(RenX::Server *server, RenX::WinType winT
if (server->isRanked() && server->isReliable() && server->players.size() != server->getBotCount())
{
char chr = static_cast<char>(team);
server->varData.set(this->name, "t"_jrs, Jupiter::ReferenceString(&chr, 1));
server->varData.set(this->name, "w"_jrs, "1"_jrs);
server->varData[this->name].set("t"_jrs, Jupiter::ReferenceString(&chr, 1));
server->varData[this->name].set("w"_jrs, "1"_jrs);
server->updateClientList();
}
}
@ -69,10 +68,10 @@ void RenX_LadderPlugin::RenX_OnCommand(RenX::Server *server, const Jupiter::Read
{
if (server->getCurrentRCONCommand().equalsi("clientvarlist"_jrs))
{
if (server->varData.get(this->name, "w"_jrs, "0"_jrs).equals("1"))
if (server->varData[this->name].get("w"_jrs, "0"_jrs).equals("1"))
{
server->varData.set(this->name, "w"_jrs, "0"_jrs);
RenX::TeamType team = static_cast<RenX::TeamType>(server->varData.get(this->name, "t"_jrs, "\0"_jrs).get(0));
server->varData[this->name].set("w"_jrs, "0"_jrs);
RenX::TeamType team = static_cast<RenX::TeamType>(server->varData[this->name].get("t"_jrs, "\0"_jrs).get(0));
for (size_t index = 0; index != RenX::ladder_databases.size(); ++index)
RenX::ladder_databases.get(index)->updateLadder(server, team);
}

17
RenX.Listen/RenX_Listen.cpp

@ -17,12 +17,13 @@
*/
#include "Jupiter/IRC_Client.h"
#include "Jupiter/INIFile.h"
#include "Jupiter/CString.h"
#include "RenX_Listen.h"
#include "RenX_Core.h"
#include "RenX_Server.h"
using namespace Jupiter::literals;
RenX_ListenPlugin::~RenX_ListenPlugin()
{
RenX_ListenPlugin::socket.close();
@ -30,9 +31,10 @@ RenX_ListenPlugin::~RenX_ListenPlugin()
bool RenX_ListenPlugin::initialize()
{
uint16_t port = this->config.getInt(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Port"), 21337);
const Jupiter::ReadableString &address = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Address"), STRING_LITERAL_AS_REFERENCE("0.0.0.0"));
RenX_ListenPlugin::serverSection = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("ServerSection"), this->getName());
uint16_t port = this->config.get<uint16_t>("Port"_jrs, 21337);
const Jupiter::ReadableString &address = this->config.get("Address"_jrs, "0.0.0.0"_jrs);
RenX_ListenPlugin::serverSection = this->config.get("ServerSection"_jrs, this->getName());
return RenX_ListenPlugin::socket.bind(Jupiter::CStringS(address).c_str(), port, true) && RenX_ListenPlugin::socket.setBlocking(false);
}
@ -55,9 +57,10 @@ int RenX_ListenPlugin::OnRehash()
{
RenX::Plugin::OnRehash();
uint16_t port = this->config.getInt(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Port"), 21337);
const Jupiter::ReadableString &address = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Address"), STRING_LITERAL_AS_REFERENCE("0.0.0.0"));
RenX_ListenPlugin::serverSection = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("ServerSection"), this->getName());
uint16_t port = this->config.get<uint16_t>("Port"_jrs, 21337);
const Jupiter::ReadableString &address = this->config.get("Address"_jrs, "0.0.0.0"_jrs);
RenX_ListenPlugin::serverSection = this->config.get("ServerSection"_jrs, this->getName());
if (port != RenX_ListenPlugin::socket.getRemotePort() || address.equals(RenX_ListenPlugin::socket.getRemoteHostname()) == false)
{
puts("Notice: The Renegade-X listening socket has been changed!");

373
RenX.Logging/RenX_Logging.cpp

@ -16,7 +16,6 @@
* Written by Jessica James <jessica.aj@outlook.com>
*/
#include "Jupiter/INIFile.h"
#include "IRC_Bot.h"
#include "RenX_Logging.h"
#include "RenX_Core.h"
@ -29,404 +28,404 @@ using namespace Jupiter::literals;
bool RenX_LoggingPlugin::initialize()
{
RenX_LoggingPlugin::muteOwnExecute = this->config.getBool(Jupiter::ReferenceString::empty, "MuteOwnExecute"_jrs, true);
RenX_LoggingPlugin::playerRDNSPublic = this->config.getBool(Jupiter::ReferenceString::empty, "PlayerRDNSPublic"_jrs, false);
RenX_LoggingPlugin::playerIdentifyPublic = this->config.getBool(Jupiter::ReferenceString::empty, "PlayerIdentifyPublic"_jrs, false);
RenX_LoggingPlugin::joinPublic = this->config.getBool(Jupiter::ReferenceString::empty, "JoinPublic"_jrs, true);
RenX_LoggingPlugin::partPublic = this->config.getBool(Jupiter::ReferenceString::empty, "PartPublic"_jrs, true);
RenX_LoggingPlugin::kickPublic = this->config.getBool(Jupiter::ReferenceString::empty, "KickPublic"_jrs, true);
RenX_LoggingPlugin::nameChangePublic = this->config.getBool(Jupiter::ReferenceString::empty, "NameChangePublic"_jrs, true);
RenX_LoggingPlugin::teamChangePublic = this->config.getBool(Jupiter::ReferenceString::empty, "TeamChangePublic"_jrs, true);
RenX_LoggingPlugin::speedHackPublic = this->config.getBool(Jupiter::ReferenceString::empty, "SpeedHackPublic"_jrs, false);
RenX_LoggingPlugin::playerPublic = this->config.getBool(Jupiter::ReferenceString::empty, "PlayerPublic"_jrs, false);
RenX_LoggingPlugin::chatPublic = this->config.getBool(Jupiter::ReferenceString::empty, "ChatPublic"_jrs, true);
RenX_LoggingPlugin::teamChatPublic = this->config.getBool(Jupiter::ReferenceString::empty, "TeamChatPublic"_jrs, false);
RenX_LoggingPlugin::radioChatPublic = this->config.getBool(Jupiter::ReferenceString::empty, "RadioChatPublic"_jrs, false);
RenX_LoggingPlugin::hostChatPublic = this->config.getBool(Jupiter::ReferenceString::empty, "HostChatPublic"_jrs, true);
RenX_LoggingPlugin::hostPagePublic = this->config.getBool(Jupiter::ReferenceString::empty, "HostPagePublic"_jrs, false);
RenX_LoggingPlugin::otherChatPublic = this->config.getBool(Jupiter::ReferenceString::empty, "OtherChatPublic"_jrs, false);
RenX_LoggingPlugin::deployPublic = this->config.getBool(Jupiter::ReferenceString::empty, "DeployPublic"_jrs, true);
RenX_LoggingPlugin::mineDeployPublic = this->config.getBool(Jupiter::ReferenceString::empty, "MineDeployPublic"_jrs, false);
RenX_LoggingPlugin::overMinePublic = this->config.getBool(Jupiter::ReferenceString::empty, "OverMinePublic"_jrs, false);
RenX_LoggingPlugin::disarmPublic = this->config.getBool(Jupiter::ReferenceString::empty, "DisarmPublic"_jrs, true);
RenX_LoggingPlugin::mineDisarmPublic = this->config.getBool(Jupiter::ReferenceString::empty, "MineDisarmPublic"_jrs, false);
RenX_LoggingPlugin::explodePublic = this->config.getBool(Jupiter::ReferenceString::empty, "ExplodePublic"_jrs, false);
RenX_LoggingPlugin::suicidePublic = this->config.getBool(Jupiter::ReferenceString::empty, "SuicidePublic"_jrs, true);
RenX_LoggingPlugin::killPublic = this->config.getBool(Jupiter::ReferenceString::empty, "KillPublic"_jrs, true);
RenX_LoggingPlugin::diePublic = this->config.getBool(Jupiter::ReferenceString::empty, "DiePublic"_jrs, true);
RenX_LoggingPlugin::destroyPublic = this->config.getBool(Jupiter::ReferenceString::empty, "DestroyPublic"_jrs, true);
RenX_LoggingPlugin::capturePublic = this->config.getBool(Jupiter::ReferenceString::empty, "CapturePublic"_jrs, true);
RenX_LoggingPlugin::neutralizePublic = this->config.getBool(Jupiter::ReferenceString::empty, "NeutralizePublic"_jrs, true);
RenX_LoggingPlugin::characterPurchasePublic = this->config.getBool(Jupiter::ReferenceString::empty, "CharacterPurchasePublic"_jrs, false);
RenX_LoggingPlugin::itemPurchasePublic = this->config.getBool(Jupiter::ReferenceString::empty, "ItemPurchasePublic"_jrs, false);
RenX_LoggingPlugin::weaponPurchasePublic = this->config.getBool(Jupiter::ReferenceString::empty, "WeaponPurchasePublic"_jrs, false);
RenX_LoggingPlugin::refillPurchasePublic = this->config.getBool(Jupiter::ReferenceString::empty, "RefillPurchasePublic"_jrs, false);
RenX_LoggingPlugin::vehiclePurchasePublic = this->config.getBool(Jupiter::ReferenceString::empty, "VehiclePurchasePublic"_jrs, false);
RenX_LoggingPlugin::vehicleSpawnPublic = this->config.getBool(Jupiter::ReferenceString::empty, "VehicleSpawnPublic"_jrs, true);
RenX_LoggingPlugin::spawnPublic = this->config.getBool(Jupiter::ReferenceString::empty, "SpawnPublic"_jrs, true);
RenX_LoggingPlugin::botJoinPublic = this->config.getBool(Jupiter::ReferenceString::empty, "BotJoinPublic"_jrs, true);
RenX_LoggingPlugin::vehicleCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "VehicleCratePublic"_jrs, false);
RenX_LoggingPlugin::TSVehicleCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "TSVehicleCratePublic"_jrs, RenX_LoggingPlugin::vehicleCratePublic);
RenX_LoggingPlugin::RAVehicleCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "RAVehicleCratePublic"_jrs, RenX_LoggingPlugin::vehicleCratePublic);
RenX_LoggingPlugin::deathCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "DeathCratePublic"_jrs, true);
RenX_LoggingPlugin::moneyCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "MoneyCratePublic"_jrs, false);
RenX_LoggingPlugin::characterCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "CharacterCratePublic"_jrs, false);
RenX_LoggingPlugin::spyCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "SpyCratePublic"_jrs, false);
RenX_LoggingPlugin::refillCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "RefillCratePublic"_jrs, false);
RenX_LoggingPlugin::timeBombCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "TimeBombCratePublic"_jrs, false);
RenX_LoggingPlugin::speedCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "SpeedCratePublic"_jrs, false);
RenX_LoggingPlugin::nukeCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "NukeCratePublic"_jrs, true);
RenX_LoggingPlugin::abductionCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "AbductionCratePublic"_jrs, true);
RenX_LoggingPlugin::unspecifiedCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "UnspecifiedCratePublic"_jrs, false);
RenX_LoggingPlugin::otherCratePublic = this->config.getBool(Jupiter::ReferenceString::empty, "OtherCratePublic"_jrs, false);
RenX_LoggingPlugin::stealPublic = this->config.getBool(Jupiter::ReferenceString::empty, "StealPublic"_jrs, true);
RenX_LoggingPlugin::donatePublic = this->config.getBool(Jupiter::ReferenceString::empty, "DonatePublic"_jrs, true);
RenX_LoggingPlugin::gamePublic = this->config.getBool(Jupiter::ReferenceString::empty, "GamePublic"_jrs, true);
RenX_LoggingPlugin::gameOverPublic = this->config.getBool(Jupiter::ReferenceString::empty, "GameOverPublic"_jrs, true);
RenX_LoggingPlugin::executePublic = this->config.getBool(Jupiter::ReferenceString::empty, "ExecutePublic"_jrs, false);
RenX_LoggingPlugin::playerCommandPublic = this->config.getBool(Jupiter::ReferenceString::empty, "PlayerCommandPublic"_jrs, false);
RenX_LoggingPlugin::subscribePublic = this->config.getBool(Jupiter::ReferenceString::empty, "SubscribePublic"_jrs, false);
RenX_LoggingPlugin::RCONPublic = this->config.getBool(Jupiter::ReferenceString::empty, "RCONPublic"_jrs, false);
RenX_LoggingPlugin::adminLoginPublic = this->config.getBool(Jupiter::ReferenceString::empty, "AdminLoginPublic"_jrs, true);
RenX_LoggingPlugin::adminGrantPublic = this->config.getBool(Jupiter::ReferenceString::empty, "AdminGrantPublic"_jrs, true);
RenX_LoggingPlugin::adminLogoutPublic = this->config.getBool(Jupiter::ReferenceString::empty, "AdminLogoutPublic"_jrs, true);
RenX_LoggingPlugin::adminPublic = this->config.getBool(Jupiter::ReferenceString::empty, "AdminPublic"_jrs, false);
RenX_LoggingPlugin::voteCallPublic = this->config.getBool(Jupiter::ReferenceString::empty, "VoteCallPublic"_jrs, true);
RenX_LoggingPlugin::voteOverPublic = this->config.getBool(Jupiter::ReferenceString::empty, "VoteOverPublic"_jrs, true);
RenX_LoggingPlugin::voteCancelPublic = this->config.getBool(Jupiter::ReferenceString::empty, "VoteCancelPublic"_jrs, true);
RenX_LoggingPlugin::votePublic = this->config.getBool(Jupiter::ReferenceString::empty, "VotePublic"_jrs, false);
RenX_LoggingPlugin::mapChangePublic = this->config.getBool(Jupiter::ReferenceString::empty, "MapChangePublic"_jrs, true);
RenX_LoggingPlugin::mapLoadPublic = this->config.getBool(Jupiter::ReferenceString::empty, "MapLoadPublic"_jrs, true);
RenX_LoggingPlugin::mapStartPublic = this->config.getBool(Jupiter::ReferenceString::empty, "MapStartPublic"_jrs, true);
RenX_LoggingPlugin::mapPublic = this->config.getBool(Jupiter::ReferenceString::empty, "MapPublic"_jrs, false);
RenX_LoggingPlugin::demoRecordPublic = this->config.getBool(Jupiter::ReferenceString::empty, "DemoRecordPublic"_jrs, true);
RenX_LoggingPlugin::demoRecordStopPublic = this->config.getBool(Jupiter::ReferenceString::empty, "DemoRecordStopPublic"_jrs, true);
RenX_LoggingPlugin::demoPublic = this->config.getBool(Jupiter::ReferenceString::empty, "DemoPublic"_jrs, false);
RenX_LoggingPlugin::logPublic = this->config.getBool(Jupiter::ReferenceString::empty, "LogPublic"_jrs, false);
RenX_LoggingPlugin::commandPublic = this->config.getBool(Jupiter::ReferenceString::empty, "CommandPublic"_jrs, false);
RenX_LoggingPlugin::errorPublic = this->config.getBool(Jupiter::ReferenceString::empty, "ErrorPublic"_jrs, false);
RenX_LoggingPlugin::versionPublic = this->config.getBool(Jupiter::ReferenceString::empty, "VersionPublic"_jrs, true);
RenX_LoggingPlugin::authorizedPublic = this->config.getBool(Jupiter::ReferenceString::empty, "AuthorizedPublic"_jrs, true);
RenX_LoggingPlugin::otherPublic = this->config.getBool(Jupiter::ReferenceString::empty, "OtherPublic"_jrs, false);
RenX_LoggingPlugin::muteOwnExecute = this->config.get<bool>("MuteOwnExecute"_jrs, true);
RenX_LoggingPlugin::playerRDNSPublic = this->config.get<bool>("PlayerRDNSPublic"_jrs, false);
RenX_LoggingPlugin::playerIdentifyPublic = this->config.get<bool>("PlayerIdentifyPublic"_jrs, false);
RenX_LoggingPlugin::joinPublic = this->config.get<bool>("JoinPublic"_jrs, true);
RenX_LoggingPlugin::partPublic = this->config.get<bool>("PartPublic"_jrs, true);
RenX_LoggingPlugin::kickPublic = this->config.get<bool>("KickPublic"_jrs, true);
RenX_LoggingPlugin::nameChangePublic = this->config.get<bool>("NameChangePublic"_jrs, true);
RenX_LoggingPlugin::teamChangePublic = this->config.get<bool>("TeamChangePublic"_jrs, true);
RenX_LoggingPlugin::speedHackPublic = this->config.get<bool>("SpeedHackPublic"_jrs, false);
RenX_LoggingPlugin::playerPublic = this->config.get<bool>("PlayerPublic"_jrs, false);
RenX_LoggingPlugin::chatPublic = this->config.get<bool>("ChatPublic"_jrs, true);
RenX_LoggingPlugin::teamChatPublic = this->config.get<bool>("TeamChatPublic"_jrs, false);
RenX_LoggingPlugin::radioChatPublic = this->config.get<bool>("RadioChatPublic"_jrs, false);
RenX_LoggingPlugin::hostChatPublic = this->config.get<bool>("HostChatPublic"_jrs, true);
RenX_LoggingPlugin::hostPagePublic = this->config.get<bool>("HostPagePublic"_jrs, false);
RenX_LoggingPlugin::otherChatPublic = this->config.get<bool>("OtherChatPublic"_jrs, false);
RenX_LoggingPlugin::deployPublic = this->config.get<bool>("DeployPublic"_jrs, true);
RenX_LoggingPlugin::mineDeployPublic = this->config.get<bool>("MineDeployPublic"_jrs, false);
RenX_LoggingPlugin::overMinePublic = this->config.get<bool>("OverMinePublic"_jrs, false);
RenX_LoggingPlugin::disarmPublic = this->config.get<bool>("DisarmPublic"_jrs, true);
RenX_LoggingPlugin::mineDisarmPublic = this->config.get<bool>("MineDisarmPublic"_jrs, false);
RenX_LoggingPlugin::explodePublic = this->config.get<bool>("ExplodePublic"_jrs, false);
RenX_LoggingPlugin::suicidePublic = this->config.get<bool>("SuicidePublic"_jrs, true);
RenX_LoggingPlugin::killPublic = this->config.get<bool>("KillPublic"_jrs, true);
RenX_LoggingPlugin::diePublic = this->config.get<bool>("DiePublic"_jrs, true);
RenX_LoggingPlugin::destroyPublic = this->config.get<bool>("DestroyPublic"_jrs, true);
RenX_LoggingPlugin::capturePublic = this->config.get<bool>("CapturePublic"_jrs, true);
RenX_LoggingPlugin::neutralizePublic = this->config.get<bool>("NeutralizePublic"_jrs, true);
RenX_LoggingPlugin::characterPurchasePublic = this->config.get<bool>("CharacterPurchasePublic"_jrs, false);
RenX_LoggingPlugin::itemPurchasePublic = this->config.get<bool>("ItemPurchasePublic"_jrs, false);
RenX_LoggingPlugin::weaponPurchasePublic = this->config.get<bool>("WeaponPurchasePublic"_jrs, false);
RenX_LoggingPlugin::refillPurchasePublic = this->config.get<bool>("RefillPurchasePublic"_jrs, false);
RenX_LoggingPlugin::vehiclePurchasePublic = this->config.get<bool>("VehiclePurchasePublic"_jrs, false);
RenX_LoggingPlugin::vehicleSpawnPublic = this->config.get<bool>("VehicleSpawnPublic"_jrs, true);
RenX_LoggingPlugin::spawnPublic = this->config.get<bool>("SpawnPublic"_jrs, true);
RenX_LoggingPlugin::botJoinPublic = this->config.get<bool>("BotJoinPublic"_jrs, true);
RenX_LoggingPlugin::vehicleCratePublic = this->config.get<bool>("VehicleCratePublic"_jrs, false);
RenX_LoggingPlugin::TSVehicleCratePublic = this->config.get<bool>("TSVehicleCratePublic"_jrs, RenX_LoggingPlugin::vehicleCratePublic);
RenX_LoggingPlugin::RAVehicleCratePublic = this->config.get<bool>("RAVehicleCratePublic"_jrs, RenX_LoggingPlugin::vehicleCratePublic);
RenX_LoggingPlugin::deathCratePublic = this->config.get<bool>("DeathCratePublic"_jrs, true);
RenX_LoggingPlugin::moneyCratePublic = this->config.get<bool>("MoneyCratePublic"_jrs, false);
RenX_LoggingPlugin::characterCratePublic = this->config.get<bool>("CharacterCratePublic"_jrs, false);
RenX_LoggingPlugin::spyCratePublic = this->config.get<bool>("SpyCratePublic"_jrs, false);
RenX_LoggingPlugin::refillCratePublic = this->config.get<bool>("RefillCratePublic"_jrs, false);
RenX_LoggingPlugin::timeBombCratePublic = this->config.get<bool>("TimeBombCratePublic"_jrs, false);
RenX_LoggingPlugin::speedCratePublic = this->config.get<bool>("SpeedCratePublic"_jrs, false);
RenX_LoggingPlugin::nukeCratePublic = this->config.get<bool>("NukeCratePublic"_jrs, true);
RenX_LoggingPlugin::abductionCratePublic = this->config.get<bool>("AbductionCratePublic"_jrs, true);
RenX_LoggingPlugin::unspecifiedCratePublic = this->config.get<bool>("UnspecifiedCratePublic"_jrs, false);
RenX_LoggingPlugin::otherCratePublic = this->config.get<bool>("OtherCratePublic"_jrs, false);
RenX_LoggingPlugin::stealPublic = this->config.get<bool>("StealPublic"_jrs, true);
RenX_LoggingPlugin::donatePublic = this->config.get<bool>("DonatePublic"_jrs, true);
RenX_LoggingPlugin::gamePublic = this->config.get<bool>("GamePublic"_jrs, true);
RenX_LoggingPlugin::gameOverPublic = this->config.get<bool>("GameOverPublic"_jrs, true);
RenX_LoggingPlugin::executePublic = this->config.get<bool>("ExecutePublic"_jrs, false);
RenX_LoggingPlugin::playerCommandPublic = this->config.get<bool>("PlayerCommandPublic"_jrs, false);
RenX_LoggingPlugin::subscribePublic = this->config.get<bool>("SubscribePublic"_jrs, false);
RenX_LoggingPlugin::RCONPublic = this->config.get<bool>("RCONPublic"_jrs, false);
RenX_LoggingPlugin::adminLoginPublic = this->config.get<bool>("AdminLoginPublic"_jrs, true);
RenX_LoggingPlugin::adminGrantPublic = this->config.get<bool>("AdminGrantPublic"_jrs, true);
RenX_LoggingPlugin::adminLogoutPublic = this->config.get<bool>("AdminLogoutPublic"_jrs, true);
RenX_LoggingPlugin::adminPublic = this->config.get<bool>("AdminPublic"_jrs, false);
RenX_LoggingPlugin::voteCallPublic = this->config.get<bool>("VoteCallPublic"_jrs, true);
RenX_LoggingPlugin::voteOverPublic = this->config.get<bool>("VoteOverPublic"_jrs, true);
RenX_LoggingPlugin::voteCancelPublic = this->config.get<bool>("VoteCancelPublic"_jrs, true);
RenX_LoggingPlugin::votePublic = this->config.get<bool>("VotePublic"_jrs, false);
RenX_LoggingPlugin::mapChangePublic = this->config.get<bool>("MapChangePublic"_jrs, true);
RenX_LoggingPlugin::mapLoadPublic = this->config.get<bool>("MapLoadPublic"_jrs, true);
RenX_LoggingPlugin::mapStartPublic = this->config.get<bool>("MapStartPublic"_jrs, true);
RenX_LoggingPlugin::mapPublic = this->config.get<bool>("MapPublic"_jrs, false);
RenX_LoggingPlugin::demoRecordPublic = this->config.get<bool>("DemoRecordPublic"_jrs, true);
RenX_LoggingPlugin::demoRecordStopPublic = this->config.get<bool>("DemoRecordStopPublic"_jrs, true);
RenX_LoggingPlugin::demoPublic = this->config.get<bool>("DemoPublic"_jrs, false);
RenX_LoggingPlugin::logPublic = this->config.get<bool>("LogPublic"_jrs, false);
RenX_LoggingPlugin::commandPublic = this->config.get<bool>("CommandPublic"_jrs, false);
RenX_LoggingPlugin::errorPublic = this->config.get<bool>("ErrorPublic"_jrs, false);
RenX_LoggingPlugin::versionPublic = this->config.get<bool>("VersionPublic"_jrs, true);
RenX_LoggingPlugin::authorizedPublic = this->config.get<bool>("AuthorizedPublic"_jrs, true);
RenX_LoggingPlugin::otherPublic = this->config.get<bool>("OtherPublic"_jrs, false);
/** Event formats */
RenX_LoggingPlugin::playerRDNSFmt = this->config.get(Jupiter::ReferenceString::empty, "PlayerRDNSFormat"_jrs,
RenX_LoggingPlugin::playerRDNSFmt = this->config.get("PlayerRDNSFormat"_jrs,
Jupiter::ReferenceString::empty);
RenX_LoggingPlugin::playerIdentifyFmt = this->config.get(Jupiter::ReferenceString::empty, "PlayerIdentifyFormat"_jrs,
RenX_LoggingPlugin::playerIdentifyFmt = this->config.get("PlayerIdentifyFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "12[Join] " IRCBOLD "%.*s" IRCBOLD " (" IRCBOLD "%.*s" IRCBOLD ") joined the game fighting for the %.*s from " IRCBOLD "%.*s" IRCBOLD " (" IRCBOLD "%.*s" IRCBOLD ") with HWID " IRCBOLD "%.*s" IRCBOLD ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->steamTag.size(), RenX::tags->steamTag.ptr(), RenX::tags->teamLongTag.size(), RenX::tags->teamLongTag.ptr(), RenX::tags->ipTag.size(), RenX::tags->ipTag.ptr(), RenX::tags->rdnsTag.size(), RenX::tags->rdnsTag.ptr(), RenX::tags->hwidTag.size(), RenX::tags->hwidTag.ptr()));
RenX_LoggingPlugin::joinPublicFmt = this->config.get(Jupiter::ReferenceString::empty, "JoinPublicFormat"_jrs,
RenX_LoggingPlugin::joinPublicFmt = this->config.get("JoinPublicFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "12[Join] " IRCBOLD "%.*s" IRCBOLD " joined the game fighting for the %.*s!", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->teamLongTag.size(), RenX::tags->teamLongTag.ptr()));
RenX_LoggingPlugin::joinAdminFmt = this->config.get(Jupiter::ReferenceString::empty, "JoinAdminFormat"_jrs,
RenX_LoggingPlugin::joinAdminFmt = this->config.get("JoinAdminFormat"_jrs,
Jupiter::ReferenceString::empty);
RenX_LoggingPlugin::joinNoSteamAdminFmt = this->config.get(Jupiter::ReferenceString::empty, "JoinNoSteamAdminFormat"_jrs,
RenX_LoggingPlugin::joinNoSteamAdminFmt = this->config.get("JoinNoSteamAdminFormat"_jrs,
Jupiter::ReferenceString::empty);
RenX_LoggingPlugin::partFmt = this->config.get(Jupiter::ReferenceString::empty, "PartFormat"_jrs,
RenX_LoggingPlugin::partFmt = this->config.get("PartFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "12[Part] " IRCBOLD "%.*s" IRCBOLD " left the %.*s.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->teamLongTag.size(), RenX::tags->teamLongTag.ptr()));
RenX_LoggingPlugin::kickFmt = this->config.get(Jupiter::ReferenceString::empty, "KickFormat"_jrs,
RenX_LoggingPlugin::kickFmt = this->config.get("KickFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "04[Kick] " IRCBOLD "%.*s" IRCCOLOR IRCBOLD " was " IRCBOLD IRCCOLOR "04kicked" IRCCOLOR IRCBOLD " (" IRCCOLOR "04%.*s" IRCCOLOR ")", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
RenX_LoggingPlugin::playerExecuteFmt = this->config.get(Jupiter::ReferenceString::empty, "PlayerExecuteFormat"_jrs,
RenX_LoggingPlugin::playerExecuteFmt = this->config.get("PlayerExecuteFormat"_jrs,
Jupiter::StringS::Format("%.*s" IRCCOLOR "07 executed: %.*s", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
RenX_LoggingPlugin::playerCommandSuccessFmt = this->config.get(Jupiter::ReferenceString::empty, "PlayerCommandSuccessFormat"_jrs,
RenX_LoggingPlugin::playerCommandSuccessFmt = this->config.get("PlayerCommandSuccessFormat"_jrs,
Jupiter::StringS::Format("%.*s" IRCCOLOR ": " IRCCOLOR "10%.*s", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
RenX_LoggingPlugin::playerCommandFailFmt = this->config.get(Jupiter::ReferenceString::empty, "PlayerCommandFailFormat"_jrs);
RenX_LoggingPlugin::playerCommandFailFmt = this->config.get("PlayerCommandFailFormat"_jrs);
RenX_LoggingPlugin::playerFmt = this->config.get(Jupiter::ReferenceString::empty, "PlayerFormat"_jrs,
RenX_LoggingPlugin::playerFmt = this->config.get("PlayerFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "12[Player]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
RenX_LoggingPlugin::nameChangeFmt = this->config.get(Jupiter::ReferenceString::empty, "NameChangeFormat"_jrs,
RenX_LoggingPlugin::nameChangeFmt = this->config.get("NameChangeFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCBOLD " changed their name to " IRCBOLD "%.*s" IRCBOLD ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->newNameTag.size(), RenX::tags->newNameTag.ptr()));
RenX_LoggingPlugin::teamChangeFmt = this->config.get(Jupiter::ReferenceString::empty, "TeamChangeFormat"_jrs,
RenX_LoggingPlugin::teamChangeFmt = this->config.get("TeamChangeFormat"_jrs,
Jupiter::StringS::Format("%.*s" IRCCOLOR " switched teams!", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr()));
RenX_LoggingPlugin::speedHackFmt = this->config.get(Jupiter::ReferenceString::empty, "SpeedHackFormat"_jrs,
RenX_LoggingPlugin::speedHackFmt = this->config.get("SpeedHackFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "04[SpeedHack] " IRCBOLD "%.*s" IRCBOLD " has thrown a Speed Hack warning!", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr()));
RenX_LoggingPlugin::chatFmt = this->config.get(Jupiter::ReferenceString::empty, "ChatFormat"_jrs,
RenX_LoggingPlugin::chatFmt = this->config.get("ChatFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD ": %.*s", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
RenX_LoggingPlugin::teamChatFmt = this->config.get(Jupiter::ReferenceString::empty, "TeamChatFormat"_jrs,
RenX_LoggingPlugin::teamChatFmt = this->config.get("TeamChatFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCBOLD ": %.*s", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
RenX_LoggingPlugin::radioChatFmt = this->config.get(Jupiter::ReferenceString::empty, "RadioChatFormat"_jrs,
RenX_LoggingPlugin::radioChatFmt = this->config.get("RadioChatFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCBOLD ": \x1D%.*s", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
RenX_LoggingPlugin::hostChatFmt = this->config.get(Jupiter::ReferenceString::empty, "HostChatFormat"_jrs,
RenX_LoggingPlugin::hostChatFmt = this->config.get("HostChatFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "12Host" IRCCOLOR "0: %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
RenX_LoggingPlugin::hostPageFmt = this->config.get(Jupiter::ReferenceString::empty, "HostPageFormat"_jrs,
RenX_LoggingPlugin::hostPageFmt = this->config.get("HostPageFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "12(Host -> %.*s): %.*s", RenX::tags->rawNameTag.size(), RenX::tags->rawNameTag.ptr(), RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
RenX_LoggingPlugin::otherChatFmt = this->config.get(Jupiter::ReferenceString::empty, "OtherChatFormat"_jrs,
RenX_LoggingPlugin::otherChatFmt = this->config.get("OtherChatFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "06[Other Chat]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
RenX_LoggingPlugin::deployFmt = this->config.get(Jupiter::ReferenceString::empty, "DeployFormat"_jrs,
RenX_LoggingPlugin::deployFmt = this->config.get("DeployFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " deployed a " IRCBOLD IRCCOLOR "12%.*s" IRCBOLD, RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr()));
RenX_LoggingPlugin::mineDeployFmt = this->config.get(Jupiter::ReferenceString::empty, "MineDeployFormat"_jrs,
RenX_LoggingPlugin::mineDeployFmt = this->config.get("MineDeployFormat"_jrs,
RenX_LoggingPlugin::deployFmt);
RenX_LoggingPlugin::overMineFmt = this->config.get(Jupiter::ReferenceString::empty, "OverMineFormat"_jrs,
RenX_LoggingPlugin::overMineFmt = this->config.get("OverMineFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " is " IRCCOLOR "04over-mining" IRCCOLOR ": " IRCBOLD IRCCOLOR "12%.*s" IRCBOLD, RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr()));
RenX_LoggingPlugin::disarmFmt = this->config.get(Jupiter::ReferenceString::empty, "DisarmFormat"_jrs,
RenX_LoggingPlugin::disarmFmt = this->config.get("DisarmFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " disarmed %.*s" IRCBOLD IRCCOLOR "'s " IRCCOLOR "12%.*s" IRCBOLD, RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimNameTag.size(), RenX::tags->victimNameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr()));
RenX_LoggingPlugin::mineDisarmFmt = this->config.get(Jupiter::ReferenceString::empty, "MineDisarmFormat"_jrs,
RenX_LoggingPlugin::mineDisarmFmt = this->config.get("MineDisarmFormat"_jrs,
RenX_LoggingPlugin::disarmFmt);
RenX_LoggingPlugin::disarmNoOwnerFmt = this->config.get(Jupiter::ReferenceString::empty, "DisarmNoOwnerFormat"_jrs,
RenX_LoggingPlugin::disarmNoOwnerFmt = this->config.get("DisarmNoOwnerFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCBOLD " disarmed a " IRCBOLD "%.*s" IRCBOLD, RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr()));
RenX_LoggingPlugin::mineDisarmNoOwnerFmt = this->config.get(Jupiter::ReferenceString::empty, "MineDisarmNoOwnerFormat"_jrs,
RenX_LoggingPlugin::mineDisarmNoOwnerFmt = this->config.get("MineDisarmNoOwnerFormat"_jrs,
RenX_LoggingPlugin::disarmNoOwnerFmt);
RenX_LoggingPlugin::explodeFmt = this->config.get(Jupiter::ReferenceString::empty, "ExplodeFormat"_jrs,
RenX_LoggingPlugin::explodeFmt = this->config.get("ExplodeFormat"_jrs,
Jupiter::StringS::Format("%.*s" IRCCOLOR " detonated a " IRCCOLOR "07%.*s" IRCCOLOR ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr()));
RenX_LoggingPlugin::explodeNoOwnerFmt = this->config.get(Jupiter::ReferenceString::empty, "ExplodeNoOwnerFormat"_jrs,
RenX_LoggingPlugin::explodeNoOwnerFmt = this->config.get("ExplodeNoOwnerFormat"_jrs,
Jupiter::StringS::Format("A " IRCCOLOR "07%.*s" IRCCOLOR " detonated.", RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr()));
RenX_LoggingPlugin::suicideFmt = this->config.get(Jupiter::ReferenceString::empty, "SuicideFormat"_jrs,
RenX_LoggingPlugin::suicideFmt = this->config.get("SuicideFormat"_jrs,
Jupiter::StringS::Format("%.*s" IRCCOLOR " suicided (" IRCCOLOR "12%.*s" IRCCOLOR ").", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr()));
RenX_LoggingPlugin::killFmt = this->config.get(Jupiter::ReferenceString::empty, "KillFormat"_jrs,
RenX_LoggingPlugin::killFmt = this->config.get("KillFormat"_jrs,
Jupiter::StringS::Format("%.*s" IRCCOLOR " killed %.*s" IRCCOLOR " (" IRCCOLOR "%.*s%.*s/%.*s" IRCCOLOR " vs " IRCCOLOR "%.*s%.*s" IRCCOLOR ").", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimNameTag.size(), RenX::tags->victimNameTag.ptr(), RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->characterTag.size(), RenX::tags->characterTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->victimCharacterTag.size(), RenX::tags->victimCharacterTag.ptr()));
RenX_LoggingPlugin::killFmt2 = this->config.get(Jupiter::ReferenceString::empty, "KillFormat2"_jrs,
RenX_LoggingPlugin::killFmt2 = this->config.get("KillFormat2"_jrs,
Jupiter::StringS::Format(IRCCOLOR "%.*s%.*s" IRCCOLOR " killed %.*s" IRCCOLOR " (" IRCCOLOR "12%.*s" IRCCOLOR ").", RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimNameTag.size(), RenX::tags->victimNameTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr()));
RenX_LoggingPlugin::dieFmt = this->config.get(Jupiter::ReferenceString::empty, "DieFormat"_jrs,
RenX_LoggingPlugin::dieFmt = this->config.get("DieFormat"_jrs,
Jupiter::StringS::Format("%.*s" IRCCOLOR " died (" IRCCOLOR "12%.*s" IRCCOLOR ").", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr()));
RenX_LoggingPlugin::dieFmt2 = this->config.get(Jupiter::ReferenceString::empty, "DieFormat2"_jrs,
RenX_LoggingPlugin::dieFmt2 = this->config.get("DieFormat2"_jrs,
Jupiter::StringS::Format(IRCCOLOR "%.*s%.*s" IRCCOLOR " died (" IRCCOLOR "12%.*s" IRCCOLOR ").", RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr()));
RenX_LoggingPlugin::destroyBuildingFmt = this->config.get(Jupiter::ReferenceString::empty, "DestroyBuildingFormat"_jrs,
RenX_LoggingPlugin::destroyBuildingFmt = this->config.get("DestroyBuildingFormat"_jrs,
Jupiter::StringS::Format("%.*s" IRCCOLOR " destroyed the " IRCCOLOR "%.*s%.*s" IRCCOLOR " (" IRCCOLOR "12%.*s" IRCCOLOR ").", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr()));
RenX_LoggingPlugin::destroyBuildingFmt2 = this->config.get(Jupiter::ReferenceString::empty, "DestroyBuildingFormat2"_jrs,
RenX_LoggingPlugin::destroyBuildingFmt2 = this->config.get("DestroyBuildingFormat2"_jrs,
Jupiter::StringS::Format(IRCCOLOR "%.*s%.*s" IRCCOLOR " destroyed the " IRCCOLOR "%.*s%.*s" IRCCOLOR " (" IRCCOLOR "12%.*s" IRCCOLOR ").", RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr()));
RenX_LoggingPlugin::destroyDefenceFmt = this->config.get(Jupiter::ReferenceString::empty, "DestroyDefenceFormat"_jrs,
RenX_LoggingPlugin::destroyDefenceFmt = this->config.get("DestroyDefenceFormat"_jrs,
Jupiter::StringS::Format("%.*s" IRCCOLOR " destroyed a " IRCCOLOR "%.*s%.*s" IRCCOLOR " (" IRCCOLOR "12%.*s" IRCCOLOR ").", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr()));
RenX_LoggingPlugin::destroyDefenceFmt2 = this->config.get(Jupiter::ReferenceString::empty, "DestroyDefenceFormat2"_jrs,
RenX_LoggingPlugin::destroyDefenceFmt2 = this->config.get("DestroyDefenceFormat2"_jrs,
Jupiter::StringS::Format(IRCCOLOR "%.*s%.*s" IRCCOLOR " destroyed a " IRCCOLOR "%.*s%.*s" IRCCOLOR " (" IRCCOLOR "12%.*s" IRCCOLOR ").", RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr()));
RenX_LoggingPlugin::destroyVehicleFmt = this->config.get(Jupiter::ReferenceString::empty, "DestroyVehicleFormat"_jrs,
RenX_LoggingPlugin::destroyVehicleFmt = this->config.get("DestroyVehicleFormat"_jrs,
Jupiter::StringS::Format("%.*s" IRCCOLOR " destroyed a " IRCCOLOR "%.*s%.*s" IRCCOLOR " (" IRCCOLOR "12%.*s" IRCCOLOR ").", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr()));
RenX_LoggingPlugin::destroyVehicleFmt2 = this->config.get(Jupiter::ReferenceString::empty, "DestroyVehicleFormat2"_jrs,
RenX_LoggingPlugin::destroyVehicleFmt2 = this->config.get("DestroyVehicleFormat2"_jrs,
Jupiter::StringS::Format(IRCCOLOR "%.*s%.*s" IRCCOLOR " destroyed a " IRCCOLOR "%.*s%.*s" IRCCOLOR " (" IRCCOLOR "12%.*s" IRCCOLOR ").", RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr()));
RenX_LoggingPlugin::captureFmt = this->config.get(Jupiter::ReferenceString::empty, "CaptureFormat"_jrs,
RenX_LoggingPlugin::captureFmt = this->config.get("CaptureFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " captured the " IRCBOLD IRCCOLOR "%.*s%.*s" IRCCOLOR IRCBOLD ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr()));
RenX_LoggingPlugin::neutralizeFmt = this->config.get(Jupiter::ReferenceString::empty, "NeutralizeFormat"_jrs,
RenX_LoggingPlugin::neutralizeFmt = this->config.get("NeutralizeFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " neutralized the " IRCBOLD IRCCOLOR "%.*s%.*s" IRCCOLOR IRCBOLD ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr()));
RenX_LoggingPlugin::characterPurchaseFmt = this->config.get(Jupiter::ReferenceString::empty, "CharacterPurchaseFormat"_jrs,
RenX_LoggingPlugin::characterPurchaseFmt = this->config.get("CharacterPurchaseFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " purchased a " IRCBOLD IRCCOLOR "%.*s%.*s" IRCCOLOR IRCBOLD ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->victimCharacterTag.size(), RenX::tags->victimCharacterTag.ptr()));
RenX_LoggingPlugin::itemPurchaseFmt = this->config.get(Jupiter::ReferenceString::empty, "ItemPurchaseFormat"_jrs,
RenX_LoggingPlugin::itemPurchaseFmt = this->config.get("ItemPurchaseFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " purchased a " IRCBOLD IRCCOLOR "%.*s%.*s" IRCCOLOR IRCBOLD ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr()));
RenX_LoggingPlugin::weaponPurchaseFmt = this->config.get(Jupiter::ReferenceString::empty, "WeaponPurchaseFormat"_jrs,
RenX_LoggingPlugin::weaponPurchaseFmt = this->config.get("WeaponPurchaseFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " purchased a " IRCBOLD IRCCOLOR "%.*s%.*s" IRCCOLOR IRCBOLD ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr()));
RenX_LoggingPlugin::refillPurchaseFmt = this->config.get(Jupiter::ReferenceString::empty, "RefillPurchaseFormat"_jrs,
RenX_LoggingPlugin::refillPurchaseFmt = this->config.get("RefillPurchaseFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " purchased a " IRCBOLD IRCCOLOR "%.*srefill" IRCCOLOR IRCBOLD ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr()));
RenX_LoggingPlugin::vehiclePurchaseFmt = this->config.get(Jupiter::ReferenceString::empty, "VehiclePurchaseFormat"_jrs,
RenX_LoggingPlugin::vehiclePurchaseFmt = this->config.get("VehiclePurchaseFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " purchased a " IRCBOLD IRCCOLOR "%.*s%.*s" IRCCOLOR IRCBOLD ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->victimVehicleTag.size(), RenX::tags->victimVehicleTag.ptr()));
RenX_LoggingPlugin::vehicleSpawnFmt = this->config.get(Jupiter::ReferenceString::empty, "VehicleSpawnFormat"_jrs,
RenX_LoggingPlugin::vehicleSpawnFmt = this->config.get("VehicleSpawnFormat"_jrs,
Jupiter::StringS::Format("A " IRCBOLD IRCCOLOR "%.*s%.*s" IRCCOLOR IRCBOLD " has spawned.", RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->vehicleTag.size(), RenX::tags->vehicleTag.ptr()));
RenX_LoggingPlugin::spawnFmt = this->config.get(Jupiter::ReferenceString::empty, "SpawnFormat"_jrs,
RenX_LoggingPlugin::spawnFmt = this->config.get("SpawnFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " spawned as a " IRCCOLOR "%.*s%.*s.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->victimCharacterTag.size(), RenX::tags->victimCharacterTag.ptr()));
RenX_LoggingPlugin::botJoinFmt = this->config.get(Jupiter::ReferenceString::empty, "BotJoinFormat"_jrs,
RenX_LoggingPlugin::botJoinFmt = this->config.get("BotJoinFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " online.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr()));
RenX_LoggingPlugin::vehicleCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "VehicleCrateFormat"_jrs,
RenX_LoggingPlugin::vehicleCrateFmt = this->config.get("VehicleCrateFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " picked up a " IRCCOLOR "12%.*s" IRCCOLOR " vehicle crate.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr()));
RenX_LoggingPlugin::TSVehicleCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "TSVehicleCrateFormat"_jrs,
RenX_LoggingPlugin::TSVehicleCrateFmt = this->config.get("TSVehicleCrateFormat"_jrs,
RenX_LoggingPlugin::vehicleCrateFmt);
RenX_LoggingPlugin::RAVehicleCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "RAVehicleCrateFormat"_jrs,
RenX_LoggingPlugin::RAVehicleCrateFmt = this->config.get("RAVehicleCrateFormat"_jrs,
RenX_LoggingPlugin::vehicleCrateFmt);
RenX_LoggingPlugin::deathCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "DeathCrateFormat"_jrs,
RenX_LoggingPlugin::deathCrateFmt = this->config.get("DeathCrateFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " picked up a " IRCCOLOR "12death" IRCCOLOR " crate.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr()));
RenX_LoggingPlugin::moneyCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "MoneyCrateFormat"_jrs,
RenX_LoggingPlugin::moneyCrateFmt = this->config.get("MoneyCrateFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " picked up " IRCCOLOR "09%.*s credits" IRCCOLOR " from a " IRCCOLOR "12money" IRCCOLOR " crate.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr()));
RenX_LoggingPlugin::characterCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "CharacterCrateFormat"_jrs,
RenX_LoggingPlugin::characterCrateFmt = this->config.get("CharacterCrateFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " picked up a " IRCCOLOR "%.*s%.*s" IRCCOLOR " " IRCCOLOR "12character" IRCCOLOR " crate.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->victimCharacterTag.size(), RenX::tags->victimCharacterTag.ptr()));
RenX_LoggingPlugin::spyCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "SpyCrateFormat"_jrs,
RenX_LoggingPlugin::spyCrateFmt = this->config.get("SpyCrateFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " picked up a " IRCCOLOR "%.*s%.*s" IRCCOLOR " " IRCCOLOR "12spy" IRCCOLOR " crate.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->victimCharacterTag.size(), RenX::tags->victimCharacterTag.ptr()));
RenX_LoggingPlugin::refillCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "RefillCrateFormat"_jrs,
RenX_LoggingPlugin::refillCrateFmt = this->config.get("RefillCrateFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " picked up a " IRCCOLOR "%.*srefill" IRCCOLOR " crate.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr()));
RenX_LoggingPlugin::timeBombCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "TimeBombCrateFormat"_jrs,
RenX_LoggingPlugin::timeBombCrateFmt = this->config.get("TimeBombCrateFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " picked up a " IRCCOLOR "11time-bomb" IRCCOLOR " crate.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr()));
RenX_LoggingPlugin::speedCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "SpeedCrateFormat"_jrs,
RenX_LoggingPlugin::speedCrateFmt = this->config.get("SpeedCrateFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " picked up a " IRCCOLOR "11speed" IRCCOLOR " crate.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr()));
RenX_LoggingPlugin::nukeCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "NukeCrateFormat"_jrs,
RenX_LoggingPlugin::nukeCrateFmt = this->config.get("NukeCrateFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " picked up a " IRCCOLOR "04nuke" IRCCOLOR " crate.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr()));
RenX_LoggingPlugin::abductionCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "AbductionCrateFormat"_jrs,
RenX_LoggingPlugin::abductionCrateFmt = this->config.get("AbductionCrateFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " has been " IRCBOLD IRCCOLOR "06abducted" IRCCOLOR IRCBOLD " by the " IRCBOLD IRCCOLOR "06Scrin" IRCCOLOR IRCBOLD "!", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr()));
RenX_LoggingPlugin::unspecifiedCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "UnspecifiedCrateFormat"_jrs,
RenX_LoggingPlugin::unspecifiedCrateFmt = this->config.get("UnspecifiedCrateFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " picked up an " IRCCOLOR "13unspecified" IRCCOLOR " crate.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr()));
RenX_LoggingPlugin::otherCrateFmt = this->config.get(Jupiter::ReferenceString::empty, "OtherCrateFormat"_jrs,
RenX_LoggingPlugin::otherCrateFmt = this->config.get("OtherCrateFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " picked up a " IRCCOLOR "13%.*s" IRCCOLOR " crate.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr()));
RenX_LoggingPlugin::stealFmt = this->config.get(Jupiter::ReferenceString::empty, "StealFormat"_jrs,
RenX_LoggingPlugin::stealFmt = this->config.get("StealFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " stole " IRCBOLD "%.*s" IRCBOLD "'s " IRCBOLD "%.*s" IRCBOLD "!", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimNameTag.size(), RenX::tags->victimNameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr()));
RenX_LoggingPlugin::stealNoOwnerFmt = this->config.get(Jupiter::ReferenceString::empty, "StealNoOwnerFormat"_jrs,
RenX_LoggingPlugin::stealNoOwnerFmt = this->config.get("StealNoOwnerFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " stole a " IRCBOLD IRCCOLOR "12%.*s" IRCBOLD "!", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr()));
RenX_LoggingPlugin::donateFmt = this->config.get(Jupiter::ReferenceString::empty, "DonateFormat"_jrs,
RenX_LoggingPlugin::donateFmt = this->config.get("DonateFormat"_jrs,
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " donated " IRCCOLOR "09%.*s credits" IRCCOLOR " to " IRCBOLD "%.*s" IRCBOLD ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr(), RenX::tags->victimNameTag.size(), RenX::tags->victimNameTag.ptr()));
RenX_LoggingPlugin::gameOverFmt = this->config.get(Jupiter::ReferenceString::empty, "GameOverFormat"_jrs,
RenX_LoggingPlugin::gameOverFmt = this->config.get("GameOverFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "03[Game]" IRCCOLOR "%.*s The " IRCBOLD "%.*s" IRCBOLD " won by " IRCBOLD "%.*s" IRCBOLD, RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->teamLongTag.size(), RenX::tags->teamLongTag.ptr(), RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
RenX_LoggingPlugin::gameOverTieFmt = this->config.get(Jupiter::ReferenceString::empty, "GameOverTieNoWinFormat"_jrs,
RenX_LoggingPlugin::gameOverTieFmt = this->config.get("GameOverTieNoWinFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "03[Game]" IRCCOLOR "10 The battle ended in a " IRCBOLD "%.*s" IRCBOLD " - Victory handed to " IRCBOLD IRCCOLOR "%.*s%.*s" IRCBOLD, RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr(), RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->teamLongTag.size(), RenX::tags->teamLongTag.ptr()));
RenX_LoggingPlugin::gameOverTieNoWinFmt = this->config.get(Jupiter::ReferenceString::empty, "GameOverTieFormat"_jrs,
RenX_LoggingPlugin::gameOverTieNoWinFmt = this->config.get("GameOverTieFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "03[Game]" IRCCOLOR "10 The battle ended in a " IRCBOLD "%.*s" IRCBOLD, RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
RenX_LoggingPlugin::gameOverScoreFmt = this->config.get(Jupiter::ReferenceString::empty, "GameOverScoreFormat"_jrs,
RenX_LoggingPlugin::gameOverScoreFmt = this->config.get("GameOverScoreFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "03[Game]" IRCCOLOR "%.*s %.*s" IRCCOLOR ": %.*s | " IRCCOLOR "%.*s%.*s" IRCCOLOR ": %.*s", RenX::tags->teamColorTag.size(), RenX::tags->teamColorTag.ptr(), RenX::tags->teamLongTag.size(), RenX::tags->teamLongTag.ptr(), RenX::tags->winScoreTag.size(), RenX::tags->winScoreTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->victimTeamLongTag.size(), RenX::tags->victimTeamLongTag.ptr(), RenX::tags->loseScoreTag.size(), RenX::tags->loseScoreTag.ptr()));
RenX_LoggingPlugin::gameFmt = this->config.get(Jupiter::ReferenceString::empty, "GameFormat"_jrs,
RenX_LoggingPlugin::gameFmt = this->config.get("GameFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "03[Game]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
RenX_LoggingPlugin::executeFmt = this->config.get(Jupiter::ReferenceString::empty, "ExecuteFormat"_jrs,
RenX_LoggingPlugin::executeFmt = this->config.get("ExecuteFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "07%.*s executed: %.*s", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
RenX_LoggingPlugin::devBotExecuteFmt = this->config.get(Jupiter::ReferenceString::empty, "DevBotExecuteFormat"_jrs);
RenX_LoggingPlugin::devBotExecuteFmt = this->config.get("DevBotExecuteFormat"_jrs);
RenX_LoggingPlugin::subscribeFmt = this->config.get(Jupiter::ReferenceString::empty, "SubscribeFormat"_jrs,
RenX_LoggingPlugin::subscribeFmt = this->config.get("SubscribeFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "03%.*s subscribed to the RCON data stream.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr()));
RenX_LoggingPlugin::rconFmt = this->config.get(Jupiter::ReferenceString::empty, "RCONFormat"_jrs,
RenX_LoggingPlugin::rconFmt = this->config.get("RCONFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "05[RCON]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
RenX_LoggingPlugin::adminLoginFmt = this->config.get(Jupiter::ReferenceString::empty, "AdminLoginFormat"_jrs,
RenX_LoggingPlugin::adminLoginFmt = this->config.get("AdminLoginFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "07[Admin] " IRCBOLD "%.*s" IRCBOLD IRCCOLOR " logged in with " IRCCOLOR "07" IRCBOLD "%.*s" IRCBOLD IRCNORMAL " privledges.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->adminTag.size(), RenX::tags->adminTag.ptr()));
RenX_LoggingPlugin::adminGrantFmt = this->config.get(Jupiter::ReferenceString::empty, "AdminGrantFormat"_jrs,
RenX_LoggingPlugin::adminGrantFmt = this->config.get("AdminGrantFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "07[Admin] " IRCBOLD "%.*s" IRCBOLD IRCCOLOR " was granted " IRCCOLOR "07" IRCBOLD "%.*s" IRCBOLD IRCNORMAL " privledges.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->adminTag.size(), RenX::tags->adminTag.ptr()));
RenX_LoggingPlugin::adminLogoutFmt = this->config.get(Jupiter::ReferenceString::empty, "AdminLogoutFormat"_jrs,
RenX_LoggingPlugin::adminLogoutFmt = this->config.get("AdminLogoutFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "07[Admin] " IRCBOLD "%.*s" IRCBOLD IRCCOLOR " logged out of their " IRCCOLOR "07" IRCBOLD "%.*s" IRCBOLD IRCNORMAL " privledges.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->adminTag.size(), RenX::tags->adminTag.ptr()));
RenX_LoggingPlugin::adminFmt = this->config.get(Jupiter::ReferenceString::empty, "AdminFormat"_jrs,
RenX_LoggingPlugin::adminFmt = this->config.get("AdminFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "07[Admin]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
RenX_LoggingPlugin::voteAddBotsFmt = this->config.get(Jupiter::ReferenceString::empty, "VoteAddBotsFormat"_jrs,
RenX_LoggingPlugin::voteAddBotsFmt = this->config.get("VoteAddBotsFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "[Vote] " IRCBOLD "%.*s" IRCNORMAL " has called for adding " IRCCOLOR "12%.*s" IRCCOLOR " bots to %.*s, with skill level " IRCCOLOR "07%.*s" IRCCOLOR ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr(), RenX::tags->victimTeamShortTag.size(), RenX::tags->victimTeamShortTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr()));
RenX_LoggingPlugin::voteChangeMapFmt = this->config.get(Jupiter::ReferenceString::empty, "VoteChangeMapFormat"_jrs,
RenX_LoggingPlugin::voteChangeMapFmt = this->config.get("VoteChangeMapFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "[Vote] " IRCBOLD "%.*s" IRCNORMAL " has called for a Map Change.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr()));
RenX_LoggingPlugin::voteKickFmt = this->config.get(Jupiter::ReferenceString::empty, "VoteKickFormat"_jrs,
RenX_LoggingPlugin::voteKickFmt = this->config.get("VoteKickFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "[Vote] " IRCBOLD "%.*s" IRCNORMAL " has called for a kick against %.*s" IRCNORMAL ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimNameTag.size(), RenX::tags->victimNameTag.ptr()));
RenX_LoggingPlugin::voteMineBanFmt = this->config.get(Jupiter::ReferenceString::empty, "VoteMineBanFormat"_jrs,
RenX_LoggingPlugin::voteMineBanFmt = this->config.get("VoteMineBanFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "%.*s[Vote] " IRCBOLD "%.*s" IRCBOLD " has called for a Mine Ban against %.*s" IRCNORMAL ".", RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr()));
RenX_LoggingPlugin::voteRemoveBotsFmt = this->config.get(Jupiter::ReferenceString::empty, "VoteRemoveBotsFormat"_jrs,
RenX_LoggingPlugin::voteRemoveBotsFmt = this->config.get("VoteRemoveBotsFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "[Vote] " IRCBOLD "%.*s" IRCNORMAL " has called a vote to remove " IRCCOLOR "12%.*s" IRCCOLOR " bots from " IRCCOLOR "%.*s%.*s" IRCNORMAL ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->victimTeamShortTag.size(), RenX::tags->victimTeamShortTag.ptr()));
RenX_LoggingPlugin::voteRestartMapFmt = this->config.get(Jupiter::ReferenceString::empty, "VoteRestartMapFormat"_jrs,
RenX_LoggingPlugin::voteRestartMapFmt = this->config.get("VoteRestartMapFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "[Vote] " IRCBOLD "%.*s" IRCNORMAL " has called for a Map Restart.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr()));
RenX_LoggingPlugin::voteSurrenderFmt = this->config.get(Jupiter::ReferenceString::empty, "VoteSurrenderFormat"_jrs,
RenX_LoggingPlugin::voteSurrenderFmt = this->config.get("VoteSurrenderFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "%.*s[Vote] " IRCBOLD "%.*s" IRCBOLD " has called for a Surrender.", RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr()));
RenX_LoggingPlugin::voteSurveyFmt = this->config.get(Jupiter::ReferenceString::empty, "VoteSurveyFormat"_jrs,
RenX_LoggingPlugin::voteSurveyFmt = this->config.get("VoteSurveyFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "%.*s[Vote] " IRCBOLD "%.*s" IRCBOLD IRCCOLOR "%.*s has started a Survey: " IRCCOLOR "12%.*s", RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
RenX_LoggingPlugin::voteOtherFmt = this->config.get(Jupiter::ReferenceString::empty, "VoteOtherFormat"_jrs,
RenX_LoggingPlugin::voteOtherFmt = this->config.get("VoteOtherFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "%.*s[Vote] " IRCBOLD "%.*s" IRCBOLD IRCCOLOR "%.*s has called a \"%.*s\" vote.", RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr()));
RenX_LoggingPlugin::voteOverSuccessFmt = this->config.get(Jupiter::ReferenceString::empty, "VoteOverSuccessFormat"_jrs,
RenX_LoggingPlugin::voteOverSuccessFmt = this->config.get("VoteOverSuccessFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "%.*s[Vote] A vote for \"%.*s\" " IRCBOLD IRCCOLOR "09passed" IRCBOLD IRCCOLOR "%.*s (Votes Yes: %.*s | Votes No: %.*s).", RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->winScoreTag.size(), RenX::tags->winScoreTag.ptr(), RenX::tags->loseScoreTag.size(), RenX::tags->loseScoreTag.ptr()));
RenX_LoggingPlugin::voteOverFailFmt = this->config.get(Jupiter::ReferenceString::empty, "VoteOverFailFormat"_jrs,
RenX_LoggingPlugin::voteOverFailFmt = this->config.get("VoteOverFailFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "%.*s[Vote] A vote for \"%.*s\" " IRCBOLD IRCCOLOR "04failed" IRCBOLD IRCCOLOR "%.*s (Votes Yes: %.*s | Votes No: %.*s).", RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->winScoreTag.size(), RenX::tags->winScoreTag.ptr(), RenX::tags->loseScoreTag.size(), RenX::tags->loseScoreTag.ptr()));
RenX_LoggingPlugin::voteCancelFmt = this->config.get(Jupiter::ReferenceString::empty, "VoteCancelFormat"_jrs,
RenX_LoggingPlugin::voteCancelFmt = this->config.get("VoteCancelFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "%.*s[Vote] A vote for \"%.*s\" was " IRCBOLD IRCCOLOR "07cancelled" IRCCOLOR IRCBOLD ".", RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr()));
RenX_LoggingPlugin::voteFmt = this->config.get(Jupiter::ReferenceString::empty, "VoteFormat"_jrs,
RenX_LoggingPlugin::voteFmt = this->config.get("VoteFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "06[Vote]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
RenX_LoggingPlugin::mapChangeFmt = this->config.get(Jupiter::ReferenceString::empty, "MapChangeFormat"_jrs,
RenX_LoggingPlugin::mapChangeFmt = this->config.get("MapChangeFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "03Loading %.*s...", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
RenX_LoggingPlugin::mapLoadFmt = this->config.get(Jupiter::ReferenceString::empty, "MapLoadFormat"_jrs,
RenX_LoggingPlugin::mapLoadFmt = this->config.get("MapLoadFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "03%.*s loaded.", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
RenX_LoggingPlugin::mapStartFmt = this->config.get(Jupiter::ReferenceString::empty, "MapStartFormat"_jrs,
RenX_LoggingPlugin::mapStartFmt = this->config.get("MapStartFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "03%.*s started.", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
RenX_LoggingPlugin::mapFmt = this->config.get(Jupiter::ReferenceString::empty, "MapFormat"_jrs,
RenX_LoggingPlugin::mapFmt = this->config.get("MapFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "06[Map]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
RenX_LoggingPlugin::demoRecordFmt = this->config.get(Jupiter::ReferenceString::empty, "DemoRecordFormat"_jrs,
RenX_LoggingPlugin::demoRecordFmt = this->config.get("DemoRecordFormat"_jrs,
Jupiter::StringS::Format("%.*s has started a demo recording.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr()));
RenX_LoggingPlugin::rconDemoRecordFmt = this->config.get(Jupiter::ReferenceString::empty, "RCONDemoRecordFormat"_jrs,
RenX_LoggingPlugin::rconDemoRecordFmt = this->config.get("RCONDemoRecordFormat"_jrs,
IRCCOLOR "07A demo recording has started."_jrs);
RenX_LoggingPlugin::demoRecordStopFmt = this->config.get(Jupiter::ReferenceString::empty, "DemoRecordStopFormat"_jrs,
RenX_LoggingPlugin::demoRecordStopFmt = this->config.get("DemoRecordStopFormat"_jrs,
IRCCOLOR "07The demo recording has stopped."_jrs);
RenX_LoggingPlugin::demoFmt = this->config.get(Jupiter::ReferenceString::empty, "DemoFormat"_jrs,
RenX_LoggingPlugin::demoFmt = this->config.get("DemoFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "06[Demo]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
RenX_LoggingPlugin::logFmt = this->config.get(Jupiter::ReferenceString::empty, "LogFormat"_jrs,
RenX_LoggingPlugin::logFmt = this->config.get("LogFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "07[Log]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
RenX_LoggingPlugin::commandFmt = this->config.get(Jupiter::ReferenceString::empty, "CommandFormat"_jrs,
RenX_LoggingPlugin::commandFmt = this->config.get("CommandFormat"_jrs,
Jupiter::StringS::Format("")); // Disabled by default.
RenX_LoggingPlugin::errorFmt = this->config.get(Jupiter::ReferenceString::empty, "ErrorFormat"_jrs,
RenX_LoggingPlugin::errorFmt = this->config.get("ErrorFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "04[Error]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
RenX_LoggingPlugin::versionFmt = this->config.get(Jupiter::ReferenceString::empty, "VersionFormat"_jrs,
RenX_LoggingPlugin::versionFmt = this->config.get("VersionFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "03Renegade X RCON connection established; using RCON verison " IRCBOLD "%.*s" IRCBOLD " for game version " IRCBOLD "%.*s" IRCBOLD, RenX::tags->rconVersionTag.size(), RenX::tags->rconVersionTag.ptr(), RenX::tags->gameVersionTag.size(), RenX::tags->gameVersionTag.ptr()));
RenX_LoggingPlugin::authorizedFmt = this->config.get(Jupiter::ReferenceString::empty, "AuthorizedFormat"_jrs,
RenX_LoggingPlugin::authorizedFmt = this->config.get("AuthorizedFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "03RCON authorization completed."));
RenX_LoggingPlugin::otherFmt = this->config.get(Jupiter::ReferenceString::empty, "OtherFormat"_jrs,
RenX_LoggingPlugin::otherFmt = this->config.get("OtherFormat"_jrs,
Jupiter::StringS::Format(IRCCOLOR "06[Other]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
/** Sanitize tags */

135
RenX.Medals/RenX_Medals.cpp

@ -55,13 +55,13 @@ RenX_MedalsPlugin::~RenX_MedalsPlugin()
player = n->data;
if (player->uuid.isNotEmpty() && player->isBot == false)
{
RenX_MedalsPlugin::medalsFile.set(player->uuid, STRING_LITERAL_AS_REFERENCE("Recs"), player->varData.get(this->getName(), STRING_LITERAL_AS_REFERENCE("Recs")));
RenX_MedalsPlugin::medalsFile.set(player->uuid, STRING_LITERAL_AS_REFERENCE("Noobs"), player->varData.get(this->getName(), STRING_LITERAL_AS_REFERENCE("Noobs")));
RenX_MedalsPlugin::medalsFile[player->uuid].set("Recs"_jrs, player->varData[this->getName()].get("Recs"_jrs));
RenX_MedalsPlugin::medalsFile[player->uuid].set("Noobs"_jrs, player->varData[this->getName()].get("Noobs"_jrs));
}
}
}
}
RenX_MedalsPlugin::medalsFile.sync(RenX_MedalsPlugin::medalsFileName);
RenX_MedalsPlugin::medalsFile.write(RenX_MedalsPlugin::medalsFileName);
}
struct CongratPlayerData
@ -109,8 +109,8 @@ void RenX_MedalsPlugin::RenX_ProcessTags(Jupiter::StringType &msg, const RenX::S
{
if (player != nullptr)
{
const Jupiter::ReadableString &recs = RenX_MedalsPlugin::medalsFile.get(player->uuid, STRING_LITERAL_AS_REFERENCE("Recs"));
const Jupiter::ReadableString &noobs = RenX_MedalsPlugin::medalsFile.get(player->uuid, STRING_LITERAL_AS_REFERENCE("Noobs"));
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);
@ -122,8 +122,8 @@ void RenX_MedalsPlugin::RenX_OnPlayerCreate(RenX::Server *server, const RenX::Pl
{
if (player->uuid.isNotEmpty() && player->isBot == false)
{
player->varData.set(this->getName(), STRING_LITERAL_AS_REFERENCE("Recs"), RenX_MedalsPlugin::medalsFile.get(player->uuid, STRING_LITERAL_AS_REFERENCE("Recs")));
player->varData.set(this->getName(), STRING_LITERAL_AS_REFERENCE("Noobs"), RenX_MedalsPlugin::medalsFile.get(player->uuid, STRING_LITERAL_AS_REFERENCE("Noobs")));
player->varData[this->getName()].set("Recs"_jrs, RenX_MedalsPlugin::medalsFile.get(player->uuid, "Recs"_jrs));
player->varData[this->getName()].set("Noobs"_jrs, RenX_MedalsPlugin::medalsFile.get(player->uuid, "Noobs"_jrs));
}
}
@ -131,8 +131,8 @@ void RenX_MedalsPlugin::RenX_OnPlayerDelete(RenX::Server *server, const RenX::Pl
{
if (player->uuid.isNotEmpty() && player->isBot == false)
{
RenX_MedalsPlugin::medalsFile.set(player->uuid, STRING_LITERAL_AS_REFERENCE("Recs"), player->varData.get(this->getName(), STRING_LITERAL_AS_REFERENCE("Recs")));
RenX_MedalsPlugin::medalsFile.set(player->uuid, STRING_LITERAL_AS_REFERENCE("Noobs"), player->varData.get(this->getName(), STRING_LITERAL_AS_REFERENCE("Noobs")));
RenX_MedalsPlugin::medalsFile[player->uuid].set("Recs"_jrs, player->varData[this->getName()].get("Recs"_jrs));
RenX_MedalsPlugin::medalsFile[player->uuid].set("Noobs"_jrs, player->varData[this->getName()].get("Noobs"_jrs));
}
}
@ -141,32 +141,29 @@ void RenX_MedalsPlugin::RenX_OnJoin(RenX::Server *server, const RenX::PlayerInfo
if (player->uuid.isNotEmpty() && player->isBot == false && server->isMatchInProgress())
{
int worth = getWorth(player);
Jupiter::INIFile::Section *section = RenX_MedalsPlugin::config.getSection(RenX_MedalsPlugin::firstSection);
Jupiter::Config *section = RenX_MedalsPlugin::config.getSection(RenX_MedalsPlugin::firstSection);
if (section != nullptr)
{
while (section->hasKey(STRING_LITERAL_AS_REFERENCE("MaxRecs")) && section->get(STRING_LITERAL_AS_REFERENCE("MaxRecs")).asInt() < worth)
if ((section = RenX_MedalsPlugin::config.getSection(section->get(STRING_LITERAL_AS_REFERENCE("NextSection")))) == nullptr)
while (section->get<int>("MaxRecs"_jrs, INT_MAX) < worth)
if ((section = RenX_MedalsPlugin::config.getSection(section->get("NextSection"_jrs))) == nullptr)
return; // No matching section found.
if (section->hasKey(STRING_LITERAL_AS_REFERENCE("1")))
{
int r;
Jupiter::INIFile::Section::KeyValuePair *pair;
do
size_t table_size = section->getTable().size();
if (table_size != 0)
{
r = rand() % section->size();
pair = section->getPair(r);
} while (pair->getKey().asInt() == 0);
Jupiter::StringS msg = section->get(Jupiter::StringS::Format("%u", (rand() % table_size) + 1));
Jupiter::StringS msg = pair->getValue();
if (msg.isNotEmpty())
{
RenX::sanitizeTags(msg);
RenX::processTags(msg, server, player);
server->sendMessage(msg);
}
}
}
}
}
void RenX_MedalsPlugin::RenX_OnGameOver(RenX::Server *server, RenX::WinType winType, const RenX::TeamType &team, int gScore, int nScore)
{
@ -248,7 +245,7 @@ void RenX_MedalsPlugin::RenX_OnGameOver(RenX::Server *server, RenX::WinType winT
}
}
RenX_MedalsPlugin::medalsFile.sync(medalsFileName);
RenX_MedalsPlugin::medalsFile.write(medalsFileName);
}
void RenX_MedalsPlugin::RenX_OnDestroy(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &objectName, const RenX::TeamType &objectTeam, const Jupiter::ReadableString &damageType, RenX::ObjectType type)
@ -266,23 +263,23 @@ int RenX_MedalsPlugin::OnRehash()
{
RenX::Plugin::OnRehash();
RenX_MedalsPlugin::medalsFile.sync(RenX_MedalsPlugin::medalsFileName);
RenX_MedalsPlugin::medalsFile.flushData();
RenX_MedalsPlugin::medalsFile.write(RenX_MedalsPlugin::medalsFileName);
RenX_MedalsPlugin::medalsFile.erase();
init();
return 0;
}
void RenX_MedalsPlugin::init()
{
RenX_MedalsPlugin::killCongratDelay = this->config.getInt(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("KillCongratDelay"), 60);
RenX_MedalsPlugin::vehicleKillCongratDelay = this->config.getInt(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("VehicleKillCongratDelay"), 60);
RenX_MedalsPlugin::kdrCongratDelay = this->config.getInt(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("KDRCongratDelay"), 60);
RenX_MedalsPlugin::medalsFileName = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("MedalsFile"), STRING_LITERAL_AS_REFERENCE("Medals.ini"));
RenX_MedalsPlugin::medalsFile.readFile(RenX_MedalsPlugin::medalsFileName);
RenX_MedalsPlugin::firstSection = RenX_MedalsPlugin::config.get(Jupiter::StringS::empty, STRING_LITERAL_AS_REFERENCE("FirstSection"));
RenX_MedalsPlugin::recsTag = RenX_MedalsPlugin::config.get(Jupiter::String::empty, STRING_LITERAL_AS_REFERENCE("RecsTag"), STRING_LITERAL_AS_REFERENCE("{RECS}"));
RenX_MedalsPlugin::noobTag = RenX_MedalsPlugin::config.get(Jupiter::String::empty, STRING_LITERAL_AS_REFERENCE("NoobsTag"), STRING_LITERAL_AS_REFERENCE("{NOOBS}"));
RenX_MedalsPlugin::worthTag = RenX_MedalsPlugin::config.get(Jupiter::String::empty, STRING_LITERAL_AS_REFERENCE("WorthTag"), STRING_LITERAL_AS_REFERENCE("{WORTH}"));
RenX_MedalsPlugin::killCongratDelay = std::chrono::seconds(this->config.get<long long>("KillCongratDelay"_jrs, 60));
RenX_MedalsPlugin::vehicleKillCongratDelay = std::chrono::seconds(this->config.get<long long>("VehicleKillCongratDelay"_jrs, 60));
RenX_MedalsPlugin::kdrCongratDelay = std::chrono::seconds(this->config.get<long long>("KDRCongratDelay"_jrs, 60));
RenX_MedalsPlugin::medalsFileName = this->config.get("MedalsFile"_jrs, "Medals.ini"_jrs);
RenX_MedalsPlugin::medalsFile.read(RenX_MedalsPlugin::medalsFileName);
RenX_MedalsPlugin::firstSection = RenX_MedalsPlugin::config.get("FirstSection"_jrs);
RenX_MedalsPlugin::recsTag = RenX_MedalsPlugin::config.get("RecsTag"_jrs, "{RECS}"_jrs);
RenX_MedalsPlugin::noobTag = RenX_MedalsPlugin::config.get("NoobsTag"_jrs, "{NOOBS}"_jrs);
RenX_MedalsPlugin::worthTag = RenX_MedalsPlugin::config.get("WorthTag"_jrs, "{WORTH}"_jrs);
RenX::Core *core = RenX::getCore();
unsigned int sCount = core->getServerCount();
@ -296,8 +293,8 @@ void RenX_MedalsPlugin::init()
for (Jupiter::DLList<RenX::PlayerInfo>::Node *n = server->players.getNode(0); n != nullptr; n = n->next)
{
player = n->data;
player->varData.set(this->getName(), STRING_LITERAL_AS_REFERENCE("Recs"), RenX_MedalsPlugin::medalsFile.get(player->name, STRING_LITERAL_AS_REFERENCE("Recs")));
player->varData.set(this->getName(), STRING_LITERAL_AS_REFERENCE("Noobs"), RenX_MedalsPlugin::medalsFile.get(player->name, STRING_LITERAL_AS_REFERENCE("Noobs")));
player->varData[this->getName()].set("Recs"_jrs, RenX_MedalsPlugin::medalsFile[player->name].get("Recs"_jrs));
player->varData[this->getName()].set("Noobs"_jrs, RenX_MedalsPlugin::medalsFile[player->name].get("Noobs"_jrs));
}
}
}
@ -312,11 +309,11 @@ RenX_MedalsPlugin pluginInstance;
void RecsGameCommand::create()
{
this->addTrigger(STRING_LITERAL_AS_REFERENCE("recs"));
this->addTrigger(STRING_LITERAL_AS_REFERENCE("recommends"));
this->addTrigger(STRING_LITERAL_AS_REFERENCE("recommendations"));
this->addTrigger(STRING_LITERAL_AS_REFERENCE("noobs"));
this->addTrigger(STRING_LITERAL_AS_REFERENCE("n00bs"));
this->addTrigger("recs"_jrs);
this->addTrigger("recommends"_jrs);
this->addTrigger("recommendations"_jrs);
this->addTrigger("noobs"_jrs);
this->addTrigger("n00bs"_jrs);
}
void RecsGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, const Jupiter::ReadableString &parameters)
@ -326,26 +323,26 @@ void RecsGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, co
RenX::PlayerInfo *target = source->getPlayerByPartName(parameters);
if (target == nullptr)
{
Jupiter::INIFile::Section *section = pluginInstance.medalsFile.getSection(parameters);
Jupiter::Config *section = pluginInstance.medalsFile.getSection(parameters);
if (section == nullptr)
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Player not found! Syntax: recs [player]"));
source->sendMessage(player, "Error: Player not found! Syntax: recs [player]"_jrs);
else
{
unsigned int recs = section->get(STRING_LITERAL_AS_REFERENCE("Recs")).asUnsignedInt();
unsigned int noobs = section->get(STRING_LITERAL_AS_REFERENCE("Noobs")).asUnsignedInt();
unsigned int recs = section->get<unsigned int>("Recs"_jrs);
unsigned int noobs = section->get<unsigned int>("Noobs"_jrs);
source->sendMessage(player, Jupiter::StringS::Format("[Archive] %.*s has %u and %u n00bs. Their worth: %d", section->getName().size(), section->getName().ptr(), recs, noobs, recs - noobs));
}
}
else if (target->uuid.isEmpty())
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Player is not using steam."));
source->sendMessage(player, "Error: Player is not using steam."_jrs);
else if (target->isBot)
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Bots do not have any recommendations."));
source->sendMessage(player, "Error: Bots do not have any recommendations."_jrs);
else if (target == player)
RecsGameCommand::trigger(source, player, Jupiter::ReferenceString::empty);
else source->sendMessage(player, Jupiter::StringS::Format("%.*s has %lu and %lu n00bs. Their worth: %d", target->name.size(), target->name.ptr(), getRecs(target), getNoobs(target), getWorth(target)));
}
else if (player->uuid.isEmpty())
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: You are not using steam."));
source->sendMessage(player, "Error: You are not using steam."_jrs);
else source->sendMessage(player, Jupiter::StringS::Format("%.*s, you have %lu recs and %lu n00bs. Your worth: %d", player->name.size(), player->name.ptr(), getRecs(player), getNoobs(player), getWorth(player)));
}
@ -361,8 +358,8 @@ GAME_COMMAND_INIT(RecsGameCommand)
void RecGameCommand::create()
{
this->addTrigger(STRING_LITERAL_AS_REFERENCE("rec"));
this->addTrigger(STRING_LITERAL_AS_REFERENCE("recommend"));
this->addTrigger("rec"_jrs);
this->addTrigger("recommend"_jrs);
}
void RecGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, const Jupiter::ReadableString &parameters)
@ -373,23 +370,23 @@ void RecGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, con
if (target == nullptr)
target = source->getPlayerByPartName(Jupiter::ReferenceString::getWord(parameters, 0, WHITESPACE));
if (target == nullptr)
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Player not found! Syntax: rec <player>"));
source->sendMessage(player, "Error: Player not found! Syntax: rec <player>"_jrs);
else if (target->uuid.isEmpty())
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Player is not using steam."));
source->sendMessage(player, "Error: Player is not using steam."_jrs);
else if (target->isBot)
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Bots can not receive recommendations."));
source->sendMessage(player, "Error: Bots can not receive recommendations."_jrs);
else if (target == player)
{
addNoob(player);
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("You can't recommend yourself, you noob! (+1 noob)"));
source->sendMessage(player, "You can't recommend yourself, you noob! (+1 noob)"_jrs);
}
else if (player->varData.get(STRING_LITERAL_AS_REFERENCE("RenX.Medals"), STRING_LITERAL_AS_REFERENCE("gr")) != nullptr && player->adminType.isEmpty())
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("You can only give one recommendation per game."));
else if (player->varData["RenX.Medals"_jrs].get("gr"_jrs) != nullptr && player->adminType.isEmpty())
source->sendMessage(player, "You can only give one recommendation per game."_jrs);
else
{
addRec(target);
source->sendMessage(Jupiter::StringS::Format("%.*s has recommended %.*s!", player->name.size(), player->name.ptr(), target->name.size(), target->name.ptr()));
player->varData.set(STRING_LITERAL_AS_REFERENCE("RenX.Medals"), STRING_LITERAL_AS_REFERENCE("gr"), STRING_LITERAL_AS_REFERENCE("1"));
player->varData["RenX.Medals"_jrs].set("gr"_jrs, "1"_jrs);
}
}
else RecsGameCommand_instance.trigger(source, player, parameters);
@ -407,8 +404,8 @@ GAME_COMMAND_INIT(RecGameCommand)
void NoobGameCommand::create()
{
this->addTrigger(STRING_LITERAL_AS_REFERENCE("noob"));
this->addTrigger(STRING_LITERAL_AS_REFERENCE("n00b"));
this->addTrigger("noob"_jrs);
this->addTrigger("n00b"_jrs);
}
void NoobGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, const Jupiter::ReadableString &parameters)
@ -419,18 +416,18 @@ void NoobGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, co
if (target == nullptr)
target = source->getPlayerByPartName(Jupiter::ReferenceString::getWord(parameters, 0, WHITESPACE));
if (target == nullptr)
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Player not found! Syntax: noob [player]"));
source->sendMessage(player, "Error: Player not found! Syntax: noob [player]"_jrs);
else if (target->uuid.isEmpty())
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Player is not using steam."));
source->sendMessage(player, "Error: Player is not using steam."_jrs);
else if (target->isBot)
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Bots can not receive n00bs."));
else if (player->varData.get(STRING_LITERAL_AS_REFERENCE("RenX.Medals"), STRING_LITERAL_AS_REFERENCE("gn")) != nullptr && player->adminType.isEmpty())
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("You can only give one noob per game."));
source->sendMessage(player, "Error: Bots can not receive n00bs."_jrs);
else if (player->varData["RenX.Medals"_jrs].get("gn"_jrs) != nullptr && player->adminType.isEmpty())
source->sendMessage(player, "You can only give one noob per game."_jrs);
else
{
addNoob(target);
source->sendMessage(Jupiter::StringS::Format("%.*s has noob'd %.*s!", player->name.size(), player->name.ptr(), target->name.size(), target->name.ptr()));
player->varData.set(STRING_LITERAL_AS_REFERENCE("RenX.Medals"), STRING_LITERAL_AS_REFERENCE("gn"), STRING_LITERAL_AS_REFERENCE("1"));
player->varData["RenX.Medals"_jrs].set("gn"_jrs, "1"_jrs);
}
}
else RecsGameCommand_instance.trigger(source, player, parameters);
@ -447,23 +444,23 @@ GAME_COMMAND_INIT(NoobGameCommand)
void addRec(const RenX::PlayerInfo *player, int amount)
{
if (player->uuid.matchi("Player*") == false && player->isBot == false)
player->varData.set(pluginInstance.getName(), STRING_LITERAL_AS_REFERENCE("Recs"), Jupiter::StringS::Format("%u", getRecs(player) + amount));
player->varData[pluginInstance.getName()].set("Recs"_jrs, Jupiter::StringS::Format("%u", getRecs(player) + amount));
}
void addNoob(const RenX::PlayerInfo *player, int amount)
{
if (player->uuid.matchi("Player*") == false && player->isBot == false)
player->varData.set(pluginInstance.getName(), STRING_LITERAL_AS_REFERENCE("Noobs"), Jupiter::StringS::Format("%u", getNoobs(player) + amount));
player->varData[pluginInstance.getName()].set("Noobs"_jrs, Jupiter::StringS::Format("%u", getNoobs(player) + amount));
}
unsigned long getRecs(const RenX::PlayerInfo *player)
{
return player->varData.getInt(pluginInstance.getName(), STRING_LITERAL_AS_REFERENCE("Recs"));
return player->varData[pluginInstance.getName()].get<unsigned long>("Recs"_jrs);
}
unsigned long getNoobs(const RenX::PlayerInfo *player)
{
return player->varData.getInt(pluginInstance.getName(), STRING_LITERAL_AS_REFERENCE("Noobs"));
return player->varData[pluginInstance.getName()].get<unsigned long>("Noobs"_jrs);
}
int getWorth(const RenX::PlayerInfo *player)

10
RenX.Medals/RenX_Medals.h

@ -19,8 +19,8 @@
#if !defined _RENX_MEDALS_H_HEADER
#define _RENX_MEDALS_H_HEADER
#include <chrono>
#include "Jupiter/Plugin.h"
#include "Jupiter/INIFile.h"
#include "Jupiter/String.h"
#include "RenX_Plugin.h"
#include "RenX_GameCommand.h"
@ -57,15 +57,15 @@ public: // Jupiter::Plugin
int OnRehash() override;
public:
time_t killCongratDelay;
time_t vehicleKillCongratDelay;
time_t kdrCongratDelay;
std::chrono::milliseconds killCongratDelay;
std::chrono::milliseconds vehicleKillCongratDelay;
std::chrono::milliseconds kdrCongratDelay;
Jupiter::StringS recsTag;
Jupiter::StringS noobTag;
Jupiter::StringS worthTag;
Jupiter::StringS firstSection;
Jupiter::StringS medalsFileName;
Jupiter::INIFile medalsFile;
Jupiter::INIConfig medalsFile;
private:
Jupiter::StringS INTERNAL_RECS_TAG;

3
RenX.MinPlayers/RenX_MinPlayers.cpp

@ -17,7 +17,6 @@
*/
#include "Jupiter/IRC_Client.h"
#include "Jupiter/INIFile.h"
#include "RenX_Server.h"
#include "RenX_PlayerInfo.h"
#include "RenX_MinPlayers.h"
@ -26,7 +25,7 @@ using namespace Jupiter::literals;
bool RenX_MinPlayersPlugin::initialize()
{
RenX_MinPlayersPlugin::player_threshold = this->config.getInt(Jupiter::ReferenceString::empty, "PlayerThreshold"_jrs, 20);
RenX_MinPlayersPlugin::player_threshold = this->config.get<size_t>("PlayerThreshold"_jrs, 20);
return true;
}

338
RenX.ModSystem/RenX_ModSystem.cpp

@ -28,15 +28,15 @@ using namespace Jupiter::literals;
bool RenX_ModSystemPlugin::initialize()
{
RenX_ModSystemPlugin::lockSteam = this->config.getBool(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("LockSteam"), true);
RenX_ModSystemPlugin::lockIP = this->config.getBool(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("LockIP"), false);
RenX_ModSystemPlugin::lockName = this->config.getBool(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("LockName"), false);
RenX_ModSystemPlugin::kickLockMismatch = this->config.getBool(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("KickLockMismatch"), true);
RenX_ModSystemPlugin::autoAuthSteam = this->config.getBool(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("AutoAuthSteam"), true);
RenX_ModSystemPlugin::autoAuthIP = this->config.getBool(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("AutoAuthIP"), false);
RenX_ModSystemPlugin::atmDefault = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("ATMDefault"));
RenX_ModSystemPlugin::moderatorGroup = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Moderator"), STRING_LITERAL_AS_REFERENCE("Moderator"));
RenX_ModSystemPlugin::administratorGroup = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Administrator"), STRING_LITERAL_AS_REFERENCE("Administrator"));
RenX_ModSystemPlugin::lockSteam = this->config.get<bool>("LockSteam"_jrs, true);
RenX_ModSystemPlugin::lockIP = this->config.get<bool>("LockIP"_jrs, false);
RenX_ModSystemPlugin::lockName = this->config.get<bool>("LockName"_jrs, false);
RenX_ModSystemPlugin::kickLockMismatch = this->config.get<bool>("KickLockMismatch"_jrs, true);
RenX_ModSystemPlugin::autoAuthSteam = this->config.get<bool>("AutoAuthSteam"_jrs, true);
RenX_ModSystemPlugin::autoAuthIP = this->config.get<bool>("AutoAuthIP"_jrs, false);
RenX_ModSystemPlugin::atmDefault = this->config.get("ATMDefault"_jrs);
RenX_ModSystemPlugin::moderatorGroup = this->config.get("Moderator"_jrs, "Moderator"_jrs);
RenX_ModSystemPlugin::administratorGroup = this->config.get("Administrator"_jrs, "Administrator"_jrs);
ModGroup *group;
Jupiter::ReferenceString dotLockSteam = ".LockSteam";
@ -50,7 +50,7 @@ bool RenX_ModSystemPlugin::initialize()
Jupiter::ReferenceString dotPrefix = ".Prefix";
Jupiter::ReferenceString dotGamePrefix = ".GamePrefix";
Jupiter::String groupName = this->config.get(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("Default"));
Jupiter::String groupName = this->config.get("Default"_jrs);
while (groupName.isNotEmpty())
{
@ -58,45 +58,45 @@ bool RenX_ModSystemPlugin::initialize()
group->name = groupName;
groupName += dotLockSteam;
group->lockSteam = this->config.getBool(Jupiter::ReferenceString::empty, groupName, RenX_ModSystemPlugin::lockSteam);
group->lockSteam = this->config.get<bool>(groupName, RenX_ModSystemPlugin::lockSteam);
groupName.truncate(dotLockSteam.size());
groupName += dotLockIP;
group->lockIP = this->config.getBool(Jupiter::ReferenceString::empty, groupName, RenX_ModSystemPlugin::lockIP);
group->lockIP = this->config.get<bool>(groupName, RenX_ModSystemPlugin::lockIP);
groupName.truncate(dotLockIP.size());
groupName += dotLockName;
group->lockName = this->config.getBool(Jupiter::ReferenceString::empty, groupName, RenX_ModSystemPlugin::lockName);
group->lockName = this->config.get<bool>(groupName, RenX_ModSystemPlugin::lockName);
groupName.truncate(dotLockName.size());
groupName += dotKickLockMismatch;
group->kickLockMismatch = this->config.getBool(Jupiter::ReferenceString::empty, groupName, RenX_ModSystemPlugin::kickLockMismatch);
group->kickLockMismatch = this->config.get<bool>(groupName, RenX_ModSystemPlugin::kickLockMismatch);
groupName.truncate(dotKickLockMismatch.size());
groupName += dotAutoAuthSteam;
group->autoAuthSteam = this->config.getBool(Jupiter::ReferenceString::empty, groupName, RenX_ModSystemPlugin::autoAuthSteam);
group->autoAuthSteam = this->config.get<bool>(groupName, RenX_ModSystemPlugin::autoAuthSteam);
groupName.truncate(dotAutoAuthSteam.size());
groupName += dotAutoAuthIP;
group->autoAuthIP = this->config.getBool(Jupiter::ReferenceString::empty, groupName, RenX_ModSystemPlugin::autoAuthIP);
group->autoAuthIP = this->config.get<bool>(groupName, RenX_ModSystemPlugin::autoAuthIP);
groupName.truncate(dotAutoAuthIP.size());
groupName += dotAccess;
group->access = this->config.getInt(Jupiter::ReferenceString::empty, groupName);
group->access = this->config.get<int>(groupName);
groupName.truncate(dotAccess.size());
groupName += dotPrefix;
group->prefix = this->config.get(Jupiter::ReferenceString::empty, groupName);
group->prefix = this->config.get(groupName);
groupName.truncate(dotPrefix.size());
groupName += dotGamePrefix;
group->gamePrefix = this->config.get(Jupiter::ReferenceString::empty, groupName);
group->gamePrefix = this->config.get(groupName);
groupName.truncate(dotGamePrefix.size());
RenX_ModSystemPlugin::groups.add(group);
groupName += dotNext;
groupName = this->config.get(Jupiter::ReferenceString::empty, groupName);
groupName = this->config.get(groupName);
}
RenX::Core *core = RenX::getCore();
@ -159,10 +159,10 @@ int RenX_ModSystemPlugin::auth(RenX::Server *server, const RenX::PlayerInfo *pla
ModGroup *group;
if (player->uuid.isNotEmpty())
{
Jupiter::INIFile::Section *section = this->config.getSection(player->uuid);
Jupiter::Config *section = this->config.getSection(player->uuid);
if (section != nullptr)
{
const Jupiter::ReadableString &groupName = section->get(STRING_LITERAL_AS_REFERENCE("Group"));
const Jupiter::ReadableString &groupName = section->get("Group"_jrs);
if (groupName.isEmpty())
group = RenX_ModSystemPlugin::groups.get(0);
else
@ -174,10 +174,10 @@ int RenX_ModSystemPlugin::auth(RenX::Server *server, const RenX::PlayerInfo *pla
auto sectionAuth = [&]
{
player->varData.set(this->name, STRING_LITERAL_AS_REFERENCE("Group"), group->name);
player->formatNamePrefix = section->get(STRING_LITERAL_AS_REFERENCE("Prefix"), group->prefix);
player->gamePrefix = section->get(STRING_LITERAL_AS_REFERENCE("GamePrefix"), group->gamePrefix);
player->access = section->getInt(STRING_LITERAL_AS_REFERENCE("Access"), group->access);
player->varData[this->name].set("Group"_jrs, group->name);
player->formatNamePrefix = section->get("Prefix"_jrs, group->prefix);
player->gamePrefix = section->get("GamePrefix"_jrs, group->gamePrefix);
player->access = section->get<int>("Access"_jrs, group->access);
if (player->access != 0)
{
server->sendMessage(player, Jupiter::StringS::Format("You are now authenticated with access level %d; group: %.*s.", player->access, group->name.size(), group->name.ptr()));
@ -197,16 +197,16 @@ int RenX_ModSystemPlugin::auth(RenX::Server *server, const RenX::PlayerInfo *pla
if (forceAuth)
return sectionAuth();
bool lockSteam_l = section->getBool(STRING_LITERAL_AS_REFERENCE("LockSteam"), group->lockSteam);
bool lockIP_l = section->getBool(STRING_LITERAL_AS_REFERENCE("LockIP"), group->lockIP);
bool lockName_l = section->getBool(STRING_LITERAL_AS_REFERENCE("LockName"), group->lockName);
bool kickLockMismatch_l = section->getBool(STRING_LITERAL_AS_REFERENCE("KickLockMismatch"), group->kickLockMismatch);
bool autoAuthSteam_l = section->getBool(STRING_LITERAL_AS_REFERENCE("AutoAuthSteam"), group->autoAuthSteam);
bool autoAuthIP_l = section->getBool(STRING_LITERAL_AS_REFERENCE("AutoAuthIP"), group->autoAuthIP);
bool lockSteam_l = section->get<bool>("LockSteam"_jrs, group->lockSteam);
bool lockIP_l = section->get<bool>("LockIP"_jrs, group->lockIP);
bool lockName_l = section->get<bool>("LockName"_jrs, group->lockName);
bool kickLockMismatch_l = section->get<bool>("KickLockMismatch"_jrs, group->kickLockMismatch);
bool autoAuthSteam_l = section->get<bool>("AutoAuthSteam"_jrs, group->autoAuthSteam);
bool autoAuthIP_l = section->get<bool>("AutoAuthIP"_jrs, group->autoAuthIP);
uint64_t steamid = section->get(STRING_LITERAL_AS_REFERENCE("SteamID")).asUnsignedLongLong();
const Jupiter::ReadableString &ip = section->get(STRING_LITERAL_AS_REFERENCE("LastIP"));
const Jupiter::ReadableString &name = section->get(STRING_LITERAL_AS_REFERENCE("Name"));
uint64_t steamid = section->get("SteamID"_jrs).asUnsignedLongLong();
const Jupiter::ReadableString &ip = section->get("LastIP"_jrs);
const Jupiter::ReadableString &name = section->get("Name"_jrs);
if ((lockSteam_l == false || player->steamid == steamid) && (lockIP_l == false || player->ip.equalsi(ip)) && (lockName_l == false || player->name.equalsi(name)))
{
@ -215,14 +215,14 @@ int RenX_ModSystemPlugin::auth(RenX::Server *server, const RenX::PlayerInfo *pla
}
else if (kickLockMismatch_l)
{
server->kickPlayer(player, STRING_LITERAL_AS_REFERENCE("Moderator entry lock mismatch"));
server->kickPlayer(player, "Moderator entry lock mismatch"_jrs);
return -1;
}
}
}
group = this->getDefaultGroup();
player->varData.set(this->name, STRING_LITERAL_AS_REFERENCE("Group"), group->name);
player->varData[this->name].set("Group"_jrs, group->name);
player->formatNamePrefix = group->prefix;
player->gamePrefix = group->gamePrefix;
return player->access = group->access;
@ -232,7 +232,7 @@ void RenX_ModSystemPlugin::tempAuth(RenX::Server *server, const RenX::PlayerInfo
{
if (group == nullptr)
group = this->getDefaultGroup();
player->varData.set(name, STRING_LITERAL_AS_REFERENCE("Group"), group->name);
player->varData[name].set("Group"_jrs, group->name);
player->formatNamePrefix = group->prefix;
player->gamePrefix = group->gamePrefix;
player->access = group->access;
@ -242,11 +242,11 @@ void RenX_ModSystemPlugin::tempAuth(RenX::Server *server, const RenX::PlayerInfo
bool RenX_ModSystemPlugin::set(RenX::PlayerInfo *player, RenX_ModSystemPlugin::ModGroup *group)
{
bool r = this->config.set(player->uuid, STRING_LITERAL_AS_REFERENCE("Group"), group->name);
this->config.set(player->uuid, STRING_LITERAL_AS_REFERENCE("SteamID"), Jupiter::StringS::Format("%llu", player->steamid));
this->config.set(player->uuid, STRING_LITERAL_AS_REFERENCE("LastIP"), player->ip);
this->config.set(player->uuid, STRING_LITERAL_AS_REFERENCE("Name"), player->name);
this->config.sync();
bool r = this->config[player->uuid].set("Group"_jrs, group->name);
this->config[player->uuid].set("SteamID"_jrs, Jupiter::StringS::Format("%llu", player->steamid));
this->config[player->uuid].set("LastIP"_jrs, player->ip);
this->config[player->uuid].set("Name"_jrs, player->name);
this->config.write();
return r;
}
@ -279,11 +279,11 @@ RenX_ModSystemPlugin::ModGroup *RenX_ModSystemPlugin::getGroupByIndex(size_t ind
int RenX_ModSystemPlugin::getConfigAccess(const Jupiter::ReadableString &uuid) const
{
Jupiter::INIFile::Section *section = this->config.getSection(uuid);
Jupiter::Config *section = this->config.getSection(uuid);
if (section == nullptr)
return RenX_ModSystemPlugin::groups.get(0)->access;
RenX_ModSystemPlugin::ModGroup *group = RenX_ModSystemPlugin::getGroupByName(section->get(STRING_LITERAL_AS_REFERENCE("Group")), groups.get(0));
return section->getInt(STRING_LITERAL_AS_REFERENCE("Access"), group->access);
RenX_ModSystemPlugin::ModGroup *group = RenX_ModSystemPlugin::getGroupByName(section->get("Group"_jrs), groups.get(0));
return section->get<int>("Access"_jrs, group->access);
}
size_t RenX_ModSystemPlugin::getGroupCount() const
@ -326,7 +326,7 @@ RenX_ModSystemPlugin::~RenX_ModSystemPlugin()
player = n->data;
if (player->isBot == false)
{
player->varData.remove(RenX_ModSystemPlugin::name, STRING_LITERAL_AS_REFERENCE("Group"));
player->varData[RenX_ModSystemPlugin::name].remove("Group"_jrs);
player->gamePrefix.truncate(player->gamePrefix.size());
player->formatNamePrefix.truncate(player->formatNamePrefix.size());
if (player->adminType.equals("administrator"))
@ -352,12 +352,12 @@ void RenX_ModSystemPlugin::RenX_OnPlayerDelete(RenX::Server *server, const RenX:
{
if (RenX_ModSystemPlugin::groups.size() != 0 && player->isBot == false && player->uuid.isNotEmpty())
{
Jupiter::INIFile::Section *section = this->config.getSection(player->uuid);
Jupiter::Config *section = this->config.getSection(player->uuid);
if (section != nullptr)
{
section->set(STRING_LITERAL_AS_REFERENCE("SteamID"), Jupiter::StringS::Format("%llu", player->steamid));
section->set(STRING_LITERAL_AS_REFERENCE("LastIP"), player->ip);
section->set(STRING_LITERAL_AS_REFERENCE("Name"), player->name);
section->set("SteamID"_jrs, Jupiter::StringS::Format("%llu", player->steamid));
section->set("LastIP"_jrs, player->ip);
section->set("Name"_jrs, player->name);
}
}
}
@ -430,7 +430,7 @@ RenX_ModSystemPlugin pluginInstance;
void AuthIRCCommand::create()
{
this->addTrigger(STRING_LITERAL_AS_REFERENCE("auth"));
this->addTrigger("auth"_jrs);
this->setAccessLevel(3);
}
@ -453,32 +453,32 @@ void AuthIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &cha
serverMatch = true;
player = server->getPlayerByPartName(parameters);
if (player == nullptr)
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Player not found."));
source->sendNotice(nick, "Error: Player not found."_jrs);
else
{
int uAccess = source->getAccessLevel(channel, nick);
int cAccess = pluginInstance.getConfigAccess(player->uuid);
if (cAccess > uAccess && uAccess < static_cast<int>(source->getPrefixes().size()))
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Can't authenticate higher level moderators."));
source->sendNotice(nick, "Error: Can't authenticate higher level moderators."_jrs);
else if (player->access == cAccess)
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Player is already authenticated"));
source->sendNotice(nick, "Error: Player is already authenticated"_jrs);
else if (player->access > cAccess)
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Player is already temporarily authenticated."));
source->sendNotice(nick, "Error: Player is already temporarily authenticated."_jrs);
else
{
RenX_ModSystemPlugin::ModGroup *defaultGroup = pluginInstance.getDefaultGroup();
if (pluginInstance.auth(server, player) == -1)
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Player failed to pass strict lock checks. Player kicked."));
else if (defaultGroup->name.equals(player->varData.get(pluginInstance.getName(), STRING_LITERAL_AS_REFERENCE("Group"))))
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Failed to authenticate player."));
source->sendNotice(nick, "Error: Player failed to pass strict lock checks. Player kicked."_jrs);
else if (defaultGroup->name.equals(player->varData[pluginInstance.getName()].get("Group"_jrs)))
source->sendNotice(nick, "Error: Failed to authenticate player."_jrs);
else
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Player authenticated successfully."));
source->sendNotice(nick, "Player authenticated successfully."_jrs);
}
}
}
}
if (serverMatch == false)
source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Channel not attached to any connected Renegade X servers."));
source->sendMessage(channel, "Error: Channel not attached to any connected Renegade X servers."_jrs);
}
}
else
@ -497,10 +497,10 @@ IRC_COMMAND_INIT(AuthIRCCommand)
void DeAuthIRCCommand::create()
{
this->addTrigger(STRING_LITERAL_AS_REFERENCE("unauth"));
this->addTrigger(STRING_LITERAL_AS_REFERENCE("deauth"));
this->addTrigger(STRING_LITERAL_AS_REFERENCE("demod"));
this->addTrigger(STRING_LITERAL_AS_REFERENCE("dtm"));
this->addTrigger("unauth"_jrs);
this->addTrigger("deauth"_jrs);
this->addTrigger("demod"_jrs);
this->addTrigger("dtm"_jrs);
this->setAccessLevel(3);
}
@ -523,22 +523,22 @@ void DeAuthIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &c
serverMatch = true;
player = server->getPlayerByPartName(parameters);
if (player == nullptr)
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Player not found."));
source->sendNotice(nick, "Error: Player not found."_jrs);
else
{
int uAccess = source->getAccessLevel(channel, nick);
int cAccess = pluginInstance.getConfigAccess(player->uuid);
if (cAccess > uAccess && uAccess < static_cast<int>(source->getPrefixes().size()))
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Can't unauthenticate higher level moderators."));
source->sendNotice(nick, "Error: Can't unauthenticate higher level moderators."_jrs);
else if (pluginInstance.resetAccess(player))
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Player unauthenticated successfully."));
source->sendNotice(nick, "Player unauthenticated successfully."_jrs);
else
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Player not authenticated."));
source->sendNotice(nick, "Error: Player not authenticated."_jrs);
}
}
}
if (serverMatch == false)
source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Channel not attached to any connected Renegade X servers."));
source->sendMessage(channel, "Error: Channel not attached to any connected Renegade X servers."_jrs);
}
}
else
@ -557,7 +557,7 @@ IRC_COMMAND_INIT(DeAuthIRCCommand)
void ATMIRCCommand::create()
{
this->addTrigger(STRING_LITERAL_AS_REFERENCE("atm"));
this->addTrigger("atm"_jrs);
this->setAccessLevel(3);
}
@ -581,10 +581,10 @@ void ATMIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &chan
int index = parameters.asInt();
if (index < 0 || index >= static_cast<int>(pluginInstance.groups.size()))
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Warning: Invalid group index. Ingoring parameter..."));
source->sendNotice(nick, "Warning: Invalid group index. Ingoring parameter..."_jrs);
else if (index == 0)
{
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Default group is not valid for this command. Use \"deauth\" to deauthorize a player."));
source->sendNotice(nick, "Error: Default group is not valid for this command. Use \"deauth\" to deauthorize a player."_jrs);
return;
}
else
@ -593,7 +593,7 @@ void ATMIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &chan
if (group->access > source->getAccessLevel(channel, nick))
{
group = pluginInstance.getDefaultATMGroup();
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Warning: You can not authorize an access level higher than yourself. Ignoring parameter..."));
source->sendNotice(nick, "Warning: You can not authorize an access level higher than yourself. Ignoring parameter..."_jrs);
}
playerName = playerName.gotoWord(1, WHITESPACE);
if (playerName.isEmpty())
@ -601,7 +601,7 @@ void ATMIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &chan
}
}
if (group == nullptr)
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Invalid group."));
source->sendNotice(nick, "Error: Invalid group."_jrs);
else
{
for (unsigned int i = 0; i != RenX::getCore()->getServerCount(); i++)
@ -612,18 +612,18 @@ void ATMIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &chan
serverMatch = true;
player = server->getPlayerByPartName(playerName);
if (player == nullptr)
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Player not found."));
source->sendNotice(nick, "Error: Player not found."_jrs);
else if (player->access > group->access)
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: This command can not lower a player's access level."));
source->sendNotice(nick, "Error: This command can not lower a player's access level."_jrs);
else
{
pluginInstance.tempAuth(server, player, group);
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Player successfully temporarily authenticated."));
source->sendNotice(nick, "Player successfully temporarily authenticated."_jrs);
}
}
}
if (serverMatch == false)
source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Channel not attached to any connected Renegade X servers."));
source->sendMessage(channel, "Error: Channel not attached to any connected Renegade X servers."_jrs);
}
}
}
@ -641,16 +641,16 @@ IRC_COMMAND_INIT(ATMIRCCommand)
void AddIRCCommand::create()
{
this->addTrigger(STRING_LITERAL_AS_REFERENCE("addmod"));
this->addTrigger(STRING_LITERAL_AS_REFERENCE("add"));
this->addTrigger(STRING_LITERAL_AS_REFERENCE("set"));
this->addTrigger("addmod"_jrs);
this->addTrigger("add"_jrs);
this->addTrigger("set"_jrs);
this->setAccessLevel(5);
}
void AddIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.wordCount(WHITESPACE) < 2)
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Too few parameters. Syntax: add <level> <player>"));
source->sendNotice(nick, "Error: Too few parameters. Syntax: add <level> <player>"_jrs);
else
{
Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
@ -667,7 +667,7 @@ void AddIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &chan
int index = parameters.asInt();
if (index < 0 || index >= static_cast<int>(pluginInstance.groups.size()))
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Invalid group index."));
source->sendNotice(nick, "Error: Invalid group index."_jrs);
else
{
group = pluginInstance.groups.get(index);
@ -675,7 +675,7 @@ void AddIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &chan
}
}
if (group == nullptr)
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Invalid group."));
source->sendNotice(nick, "Error: Invalid group."_jrs);
else
{
for (unsigned int i = 0; i != RenX::getCore()->getServerCount(); i++)
@ -686,11 +686,11 @@ void AddIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &chan
serverMatch = true;
player = server->getPlayerByPartName(playerName);
if (player == nullptr)
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Player not found."));
source->sendNotice(nick, "Error: Player not found."_jrs);
else if (player->isBot)
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: A bot can not be a moderator."));
source->sendNotice(nick, "Error: A bot can not be a moderator."_jrs);
else if (player->uuid.isEmpty())
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Player has no UUID."));
source->sendNotice(nick, "Error: Player has no UUID."_jrs);
else
{
pluginInstance.resetAccess(player);
@ -703,7 +703,7 @@ void AddIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &chan
}
}
if (serverMatch == false)
source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Channel not attached to any connected Renegade X servers."));
source->sendMessage(channel, "Error: Channel not attached to any connected Renegade X servers."_jrs);
}
}
}
@ -721,17 +721,17 @@ IRC_COMMAND_INIT(AddIRCCommand)
void DelIRCCommand::create()
{
this->addTrigger(STRING_LITERAL_AS_REFERENCE("delmod"));
this->addTrigger(STRING_LITERAL_AS_REFERENCE("remmod"));
this->addTrigger(STRING_LITERAL_AS_REFERENCE("del"));
this->addTrigger(STRING_LITERAL_AS_REFERENCE("rem"));
this->addTrigger("delmod"_jrs);
this->addTrigger("remmod"_jrs);
this->addTrigger("del"_jrs);
this->addTrigger("rem"_jrs);
this->setAccessLevel(5);
}
void DelIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.isEmpty())
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Too few parameters. Syntax: del <player>"));
source->sendNotice(nick, "Error: Too few parameters. Syntax: del <player>"_jrs);
else
{
Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
@ -751,40 +751,44 @@ void DelIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &chan
if (player == nullptr)
{
if (pluginInstance.modsFile.remove(parameters))
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Player has been removed from the moderator list."));
source->sendNotice(nick, "Player has been removed from the moderator list."_jrs);
else
{
size_t index = pluginInstance.modsFile.getSections();
Jupiter::INIFile::Section *section;
auto bucket_itr = pluginInstance.modsFile.getSections().begin();
auto bucket_end = pluginInstance.modsFile.getSections().end();
DelIRCCommand_trigger_loop:
if (index != 0)
while (bucket_itr != bucket_end)
{
section = pluginInstance.modsFile.getSection(--index);
if (section->get(STRING_LITERAL_AS_REFERENCE("Name")).equalsi(parameters))
for (auto entry_itr = bucket_itr->m_entries.getHead(); entry_itr != nullptr; entry_itr = entry_itr->next)
{
if (pluginInstance.modsFile.remove(index))
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Player has been removed from the moderator list."));
if (entry_itr->data->value.get("Name"_jrs).equalsi(parameters))
{
if (pluginInstance.modsFile.remove(entry_itr->data->key))
source->sendNotice(nick, "Player has been removed from the moderator list."_jrs);
else
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Unknown error occurred."));
source->sendNotice(nick, "Error: Unknown error occurred."_jrs);
bucket_itr = bucket_end;
return;
}
else
goto DelIRCCommand_trigger_loop;
}
else
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Player not found."));
}
source->sendNotice(nick, "Error: Player not found."_jrs);
}
}
else if (player->isBot)
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: A bot can not be a moderator."));
source->sendNotice(nick, "Error: A bot can not be a moderator."_jrs);
else if (pluginInstance.modsFile.remove(player->uuid))
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Player has been removed from the moderator list."));
source->sendNotice(nick, "Player has been removed from the moderator list."_jrs);
else
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Player is not in the moderator list."));
source->sendNotice(nick, "Player is not in the moderator list."_jrs);
break;
}
}
if (serverMatch == false)
source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Channel not attached to any connected Renegade X servers."));
source->sendMessage(channel, "Error: Channel not attached to any connected Renegade X servers."_jrs);
}
}
}
@ -801,8 +805,8 @@ IRC_COMMAND_INIT(DelIRCCommand)
void ForceAuthIRCCommand::create()
{
this->addTrigger(STRING_LITERAL_AS_REFERENCE("fauth"));
this->addTrigger(STRING_LITERAL_AS_REFERENCE("forceauth"));
this->addTrigger("fauth"_jrs);
this->addTrigger("forceauth"_jrs);
this->setAccessLevel(4);
}
@ -825,31 +829,31 @@ void ForceAuthIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString
serverMatch = true;
player = server->getPlayerByPartName(parameters);
if (player == nullptr)
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Player not found."));
source->sendNotice(nick, "Error: Player not found."_jrs);
else
{
int uAccess = source->getAccessLevel(channel, nick);
int cAccess = pluginInstance.getConfigAccess(player->uuid);
if (cAccess > uAccess && uAccess < static_cast<int>(source->getPrefixes().size()))
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Can't authenticate higher level moderators."));
source->sendNotice(nick, "Error: Can't authenticate higher level moderators."_jrs);
else if (player->access == cAccess)
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Player is already authenticated"));
source->sendNotice(nick, "Error: Player is already authenticated"_jrs);
else if (player->access > cAccess)
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Player is already temporarily authenticated."));
source->sendNotice(nick, "Error: Player is already temporarily authenticated."_jrs);
else
{
RenX_ModSystemPlugin::ModGroup *defaultGroup = pluginInstance.getDefaultGroup();
pluginInstance.auth(server, player, false, true);
if (defaultGroup->name.equals(player->varData.get(pluginInstance.getName(), STRING_LITERAL_AS_REFERENCE("Group"))))
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Failed to authenticate player."));
if (defaultGroup->name.equals(player->varData[pluginInstance.getName()].get("Group"_jrs)))
source->sendNotice(nick, "Error: Failed to authenticate player."_jrs);
else
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Player authenticated successfully."));
source->sendNotice(nick, "Player authenticated successfully."_jrs);
}
}
}
}
if (serverMatch == false)
source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Channel not attached to any connected Renegade X servers."));
source->sendMessage(channel, "Error: Channel not attached to any connected Renegade X servers."_jrs);
}
}
else
@ -868,35 +872,37 @@ IRC_COMMAND_INIT(ForceAuthIRCCommand)
void ModListIRCCommand::create()
{
this->addTrigger(STRING_LITERAL_AS_REFERENCE("modlist"));
this->addTrigger(STRING_LITERAL_AS_REFERENCE("mlist"));
this->addTrigger("modlist"_jrs);
this->addTrigger("mlist"_jrs);
}
void ModListIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
RenX_ModSystemPlugin::ModGroup *group;
Jupiter::INIFile::Section *section;
size_t i;
Jupiter::String msg;
size_t msgBaseSize;
bool haveMods = false;
for (Jupiter::DLList<RenX_ModSystemPlugin::ModGroup>::Node *n = pluginInstance.groups.getNode(0); n != nullptr; n = n->next)
for (Jupiter::DLList<RenX_ModSystemPlugin::ModGroup>::Node *n = pluginInstance.groups.getHead(); n != nullptr; n = n->next)
{
group = n->data;
msg = group->prefix;
msg += group->name;
msg.aformat(IRCNORMAL " (Access: %d): ", group->access);
msgBaseSize = msg.size();
i = pluginInstance.modsFile.getSections();
while (i != 0)
auto bucket_itr = pluginInstance.modsFile.getSections().begin();
auto bucket_end = pluginInstance.modsFile.getSections().end();
auto entry_callback = [&msg, group](Jupiter::Config::SectionHashTable::Bucket::Entry &in_entry)
{
section = pluginInstance.modsFile.getSection(--i);
if (section->get(STRING_LITERAL_AS_REFERENCE("Group")).equalsi(group->name))
if (in_entry.value.get("Group"_jrs).equalsi(group->name))
{
msg += section->get(STRING_LITERAL_AS_REFERENCE("Name"), section->getName());
msg += STRING_LITERAL_AS_REFERENCE(", ");
}
msg += in_entry.value.get("Name"_jrs, in_entry.value.getName());
msg += ", "_jrs;
}
};
pluginInstance.modsFile.getSections().callback(entry_callback);
if (msg.size() != msgBaseSize)
{
msg.truncate(2);
@ -905,7 +911,7 @@ void ModListIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &
}
}
if (!haveMods)
source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("There are no configured moderators."));
source->sendMessage(channel, "There are no configured moderators."_jrs);
}
const Jupiter::ReadableString &ModListIRCCommand::getHelp(const Jupiter::ReadableString &)
@ -922,7 +928,7 @@ IRC_COMMAND_INIT(ModListIRCCommand)
void AuthGameCommand::create()
{
this->addTrigger(STRING_LITERAL_AS_REFERENCE("auth"));
this->addTrigger("auth"_jrs);
this->setAccessLevel(3);
}
@ -932,32 +938,32 @@ void AuthGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, co
{
RenX::PlayerInfo *target = source->getPlayerByPartName(parameters);
if (target == nullptr)
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Player not found."));
source->sendMessage(player, "Error: Player not found."_jrs);
else if (target == player)
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: You can not authenticate yourself."));
source->sendMessage(player, "Error: You can not authenticate yourself."_jrs);
else
{
int cAccess = pluginInstance.getConfigAccess(target->uuid);
if (cAccess > player->access)
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Can't authenticate higher level moderators."));
source->sendMessage(player, "Error: Can't authenticate higher level moderators."_jrs);
else if (target->access == cAccess)
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Player is already authenticated"));
source->sendMessage(player, "Error: Player is already authenticated"_jrs);
else if (target->access > cAccess)
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Player is already temporarily authenticated."));
source->sendMessage(player, "Error: Player is already temporarily authenticated."_jrs);
else
{
RenX_ModSystemPlugin::ModGroup *defaultGroup = pluginInstance.getDefaultGroup();
if (pluginInstance.auth(source, player) == -1)
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Player failed to pass strict lock checks. Player kicked."));
else if (defaultGroup->name.equals(player->varData.get(pluginInstance.getName(), STRING_LITERAL_AS_REFERENCE("Group"))))
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Failed to authenticate player."));
source->sendMessage(player, "Error: Player failed to pass strict lock checks. Player kicked."_jrs);
else if (defaultGroup->name.equals(player->varData[pluginInstance.getName()].get("Group"_jrs)))
source->sendMessage(player, "Error: Failed to authenticate player."_jrs);
else
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Player authenticated successfully."));
source->sendMessage(player, "Player authenticated successfully."_jrs);
}
}
}
else
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Too few parameters. Syntax: auth <player>"));
source->sendMessage(player, "Error: Too few parameters. Syntax: auth <player>"_jrs);
}
const Jupiter::ReadableString &AuthGameCommand::getHelp(const Jupiter::ReadableString &)
@ -972,7 +978,7 @@ GAME_COMMAND_INIT(AuthGameCommand)
void ATMGameCommand::create()
{
this->addTrigger(STRING_LITERAL_AS_REFERENCE("atm"));
this->addTrigger("atm"_jrs);
this->setAccessLevel(3);
}
@ -988,10 +994,10 @@ void ATMGameCommand::trigger(RenX::Server *server, RenX::PlayerInfo *player, con
int index = parameters.asInt();
if (index < 0 || index >= static_cast<int>(pluginInstance.groups.size()))
server->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Warning: Invalid group index. Ingoring parameter..."));
server->sendMessage(player, "Warning: Invalid group index. Ingoring parameter..."_jrs);
else if (index == 0)
{
server->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Default group is not valid for this command. Use \"deauth\" to deauthorize a player."));
server->sendMessage(player, "Error: Default group is not valid for this command. Use \"deauth\" to deauthorize a player."_jrs);
return;
}
else
@ -1000,7 +1006,7 @@ void ATMGameCommand::trigger(RenX::Server *server, RenX::PlayerInfo *player, con
if (group->access > player->access)
{
group = pluginInstance.getDefaultATMGroup();
server->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Warning: You can not authorize an access level higher than yourself. Ignoring parameter..."));
server->sendMessage(player, "Warning: You can not authorize an access level higher than yourself. Ignoring parameter..."_jrs);
}
playerName = playerName.gotoWord(1, WHITESPACE);
}
@ -1009,20 +1015,20 @@ void ATMGameCommand::trigger(RenX::Server *server, RenX::PlayerInfo *player, con
{
target = server->getPlayerByPartName(playerName);
if (target == nullptr)
server->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Player not found."));
server->sendMessage(player, "Error: Player not found."_jrs);
else if (target->access > group->access)
server->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: This command can not lower a player's access level."));
server->sendMessage(player, "Error: This command can not lower a player's access level."_jrs);
else
{
pluginInstance.tempAuth(server, target, group);
server->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Player successfully temporarily authenticated."));
server->sendMessage(player, "Player successfully temporarily authenticated."_jrs);
}
}
else
server->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Invalid group."));
server->sendMessage(player, "Error: Invalid group."_jrs);
}
else
server->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Too few parameters. Syntax: auth <player>"));
server->sendMessage(player, "Error: Too few parameters. Syntax: auth <player>"_jrs);
}
const Jupiter::ReadableString &ATMGameCommand::getHelp(const Jupiter::ReadableString &)
@ -1037,8 +1043,8 @@ GAME_COMMAND_INIT(ATMGameCommand)
void ForceAuthGameCommand::create()
{
this->addTrigger(STRING_LITERAL_AS_REFERENCE("fauth"));
this->addTrigger(STRING_LITERAL_AS_REFERENCE("forceauth"));
this->addTrigger("fauth"_jrs);
this->addTrigger("forceauth"_jrs);
this->setAccessLevel(4);
}
@ -1048,31 +1054,31 @@ void ForceAuthGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *playe
{
RenX::PlayerInfo *target = source->getPlayerByPartName(parameters);
if (target == nullptr)
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Player not found."));
source->sendMessage(player, "Error: Player not found."_jrs);
else if (target == player)
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: You can not force-authenticate yourself."));
source->sendMessage(player, "Error: You can not force-authenticate yourself."_jrs);
else
{
int cAccess = pluginInstance.getConfigAccess(target->uuid);
if (cAccess > player->access)
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Can't authenticate higher level moderators."));
source->sendMessage(player, "Error: Can't authenticate higher level moderators."_jrs);
else if (target->access == cAccess)
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Player is already authenticated"));
source->sendMessage(player, "Error: Player is already authenticated"_jrs);
else if (target->access > cAccess)
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Player is already temporarily authenticated."));
source->sendMessage(player, "Error: Player is already temporarily authenticated."_jrs);
else
{
RenX_ModSystemPlugin::ModGroup *defaultGroup = pluginInstance.getDefaultGroup();
pluginInstance.auth(source, player, false, true);
if (defaultGroup->name.equals(player->varData.get(pluginInstance.getName(), STRING_LITERAL_AS_REFERENCE("Group"))))
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Failed to authenticate player."));
if (defaultGroup->name.equals(player->varData[pluginInstance.getName()].get("Group"_jrs)))
source->sendMessage(player, "Error: Failed to authenticate player."_jrs);
else
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Player authenticated successfully."));
source->sendMessage(player, "Player authenticated successfully."_jrs);
}
}
}
else
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Too few parameters. Syntax: fauth <player>"));
source->sendMessage(player, "Error: Too few parameters. Syntax: fauth <player>"_jrs);
}
const Jupiter::ReadableString &ForceAuthGameCommand::getHelp(const Jupiter::ReadableString &)

3
RenX.ModSystem/RenX_ModSystem.h

@ -22,7 +22,6 @@
#include "Jupiter/Plugin.h"
#include "Jupiter/Reference_String.h"
#include "Jupiter/String.h"
#include "Jupiter/INIFile.h"
#include "Jupiter/DLList.h"
#include "IRC_Command.h"
#include "RenX_Plugin.h"
@ -104,7 +103,7 @@ public: // RenX::Plugin
public: // Jupiter::Plugin
int OnRehash() override;
Jupiter::INIFile &modsFile = Jupiter::Plugin::config;
Jupiter::Config &modsFile = Jupiter::Plugin::config;
private:
bool lockSteam;
bool lockIP;

21
RenX.ServerList/RenX_ServerList.cpp

@ -17,7 +17,6 @@
*/
#include "Jupiter/IRC_Client.h"
#include "Jupiter/INIFile.h"
#include "Jupiter/HTTP.h"
#include "Jupiter/HTTP_QueryString.h"
#include "HTTPServer.h"
@ -146,12 +145,12 @@ Jupiter::String sanitize_game(const Jupiter::ReadableString &in_str)
bool RenX_ServerListPlugin::initialize()
{
RenX_ServerListPlugin::web_hostname = this->config.get(Jupiter::ReferenceString::empty, "Hostname"_jrs, ""_jrs);
RenX_ServerListPlugin::web_path = this->config.get(Jupiter::ReferenceString::empty, "Path"_jrs, "/"_jrs);
RenX_ServerListPlugin::server_list_page_name = this->config.get(Jupiter::ReferenceString::empty, "ServersPageName"_jrs, "servers.jsp"_jrs);
RenX_ServerListPlugin::server_list_long_page_name = this->config.get(Jupiter::ReferenceString::empty, "HumanServersPageName"_jrs, "servers_long.jsp"_jrs);
RenX_ServerListPlugin::server_page_name = this->config.get(Jupiter::ReferenceString::empty, "ServerPageName"_jrs, "server.jsp"_jrs);
RenX_ServerListPlugin::game_server_list_page_name = this->config.get(Jupiter::ReferenceString::empty, "ServersGamePageName"_jrs, "browser.jsp"_jrs);
RenX_ServerListPlugin::web_hostname = this->config.get("Hostname"_jrs, ""_jrs);
RenX_ServerListPlugin::web_path = this->config.get("Path"_jrs, "/"_jrs);
RenX_ServerListPlugin::server_list_page_name = this->config.get("ServersPageName"_jrs, "servers.jsp"_jrs);
RenX_ServerListPlugin::server_list_long_page_name = this->config.get("HumanServersPageName"_jrs, "servers_long.jsp"_jrs);
RenX_ServerListPlugin::server_page_name = this->config.get("ServerPageName"_jrs, "server.jsp"_jrs);
RenX_ServerListPlugin::game_server_list_page_name = this->config.get("ServersGamePageName"_jrs, "browser.jsp"_jrs);
/** Initialize content */
Jupiter::HTTP::Server &server = getHTTPServer();
@ -559,7 +558,7 @@ void RenX_ServerListPlugin::addServerToServerList(RenX::Server *server)
server_json_block += '}';
server->varData.set(this->name, "j"_jrs, server_json_block);
server->varData[this->name].set("j"_jrs, server_json_block);
}
void RenX_ServerListPlugin::updateServerList()
@ -613,7 +612,7 @@ void RenX_ServerListPlugin::RenX_OnServerDisconnect(RenX::Server *server, RenX::
this->updateServerList();
// remove from individual listing
server->varData.remove(this->name, "j"_jrs);
server->varData[this->name].remove("j"_jrs);
}
void RenX_ServerListPlugin::RenX_OnJoin(RenX::Server *, const RenX::PlayerInfo *)
@ -694,7 +693,7 @@ Jupiter::ReadableString *handle_server_page(const Jupiter::ReadableString &query
if (html_form_response.table.size() != 0)
{
address = html_form_response.table.get("ip"_jrs, address);
port = html_form_response.table.getInt("port"_jrs, port);
port = html_form_response.table.getCast<int>("port"_jrs, port);
}
// search for server
@ -714,7 +713,7 @@ Jupiter::ReadableString *handle_server_page(const Jupiter::ReadableString &query
}
// return server data
return new Jupiter::ReferenceString(server->varData.get(pluginInstance.getName(), "j"_jrs));
return new Jupiter::ReferenceString(server->varData[pluginInstance.getName()].get("j"_jrs));
}
Jupiter::ReadableString *handle_game_server_list_page(const Jupiter::ReadableString &query_string)

13
RenX.SetJoin/RenX_SetJoin.cpp

@ -17,7 +17,6 @@
*/
#include "Jupiter/IRC_Client.h"
#include "Jupiter/INIFile.h"
#include "RenX_PlayerInfo.h"
#include "RenX_Server.h"
#include "RenX_SetJoin.h"
@ -28,7 +27,7 @@ void RenX_SetJoinPlugin::RenX_OnJoin(RenX::Server *server, const RenX::PlayerInf
{
if (player->uuid.isNotEmpty() && server->isMatchInProgress())
{
const Jupiter::ReadableString &setjoin = RenX_SetJoinPlugin::setjoin_file.get(Jupiter::ReferenceString::empty, player->uuid);
const Jupiter::ReadableString &setjoin = RenX_SetJoinPlugin::setjoin_file.get(player->uuid);
if (setjoin.isNotEmpty())
server->sendMessage(Jupiter::StringS::Format("[%.*s] %.*s", player->name.size(), player->name.ptr(), setjoin.size(), setjoin.ptr()));
}
@ -49,7 +48,7 @@ void ViewJoinGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player
{
if (player->uuid.isNotEmpty())
{
const Jupiter::ReadableString &setjoin = pluginInstance.setjoin_file.get(Jupiter::ReferenceString::empty, player->uuid);
const Jupiter::ReadableString &setjoin = pluginInstance.setjoin_file.get(player->uuid);
if (setjoin.isNotEmpty())
source->sendMessage(player, Jupiter::StringS::Format("[%.*s] %.*s", player->name.size(), player->name.ptr(), setjoin.size(), setjoin.ptr()));
else source->sendMessage(player, "Error: No setjoin found."_jrs);
@ -77,7 +76,7 @@ void ShowJoinGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player
{
if (player->uuid.isNotEmpty())
{
const Jupiter::ReadableString &setjoin = pluginInstance.setjoin_file.get(Jupiter::ReferenceString::empty, player->uuid);
const Jupiter::ReadableString &setjoin = pluginInstance.setjoin_file.get(player->uuid);
if (setjoin.isNotEmpty())
source->sendMessage(Jupiter::StringS::Format("[%.*s] %.*s", player->name.size(), player->name.ptr(), setjoin.size(), setjoin.ptr()));
else source->sendMessage(player, "Error: No setjoin found."_jrs);
@ -107,7 +106,7 @@ void DelJoinGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player,
{
if (player->uuid.isNotEmpty())
{
if (pluginInstance.setjoin_file.remove(Jupiter::ReferenceString::empty, player->uuid))
if (pluginInstance.setjoin_file.remove(player->uuid))
source->sendMessage(player, Jupiter::StringS::Format("%.*s, your join message has been removed.", player->name.size(), player->name.ptr()));
else source->sendMessage(player, "Error: Setjoin not found."_jrs);
}
@ -136,8 +135,8 @@ void SetJoinGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player,
{
if (parameters.isNotEmpty())
{
pluginInstance.setjoin_file.set(Jupiter::ReferenceString::empty, player->uuid, parameters);
pluginInstance.setjoin_file.sync();
pluginInstance.setjoin_file.set(player->uuid, parameters);
pluginInstance.setjoin_file.write();
source->sendMessage(player, Jupiter::StringS::Format("%.*s, your join message is now: %.*s", player->name.size(), player->name.ptr(), parameters.size(), parameters.ptr()));
}
else DelJoinGameCommand_instance.trigger(source, player, parameters);

3
RenX.SetJoin/RenX_SetJoin.h

@ -20,14 +20,13 @@
#define _RENX_SETJOIN_H_HEADER
#include "Jupiter/Plugin.h"
#include "Jupiter/INIFile.h"
#include "RenX_Plugin.h"
#include "RenX_GameCommand.h"
class RenX_SetJoinPlugin : public RenX::Plugin
{
public:
Jupiter::INIFile &setjoin_file = Jupiter::Plugin::config;
Jupiter::Config &setjoin_file = Jupiter::Plugin::config;
public: // RenX::Plugin
void RenX_OnJoin(RenX::Server *server, const RenX::PlayerInfo *player) override;

50
RenX.Warn/RenX_Warn.cpp

@ -21,10 +21,12 @@
#include "RenX_PlayerInfo.h"
#include "RenX_Warn.h"
using namespace Jupiter::literals;
bool RenX_WarnPlugin::initialize()
{
RenX_WarnPlugin::maxWarns = this->config.getInt(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("MaxWarns"), 3);
RenX_WarnPlugin::warnAction = this->config.getInt(Jupiter::ReferenceString::empty, STRING_LITERAL_AS_REFERENCE("MaxAction"), -1);
RenX_WarnPlugin::maxWarns = this->config.get<int>("MaxWarns"_jrs, 3);
RenX_WarnPlugin::warnAction = this->config.get<int>("MaxAction"_jrs, -1);
return true;
}
@ -43,8 +45,8 @@ STRING_LITERAL_AS_NAMED_REFERENCE(WARNS_KEY, "w");
void WarnIRCCommand::create()
{
this->addTrigger(STRING_LITERAL_AS_REFERENCE("warn"));
this->addTrigger(STRING_LITERAL_AS_REFERENCE("w"));
this->addTrigger("warn"_jrs);
this->addTrigger("w"_jrs);
this->setAccessLevel(2);
}
@ -68,7 +70,7 @@ void WarnIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &cha
player = server->getPlayerByPartName(parameters);
if (player != nullptr)
{
int warns = player->varData.getInt(pluginInstance.getName(), WARNS_KEY) + 1;
int warns = player->varData[pluginInstance.getName()].get<int>(WARNS_KEY) + 1;
if (warns > pluginInstance.maxWarns)
{
switch (pluginInstance.warnAction)
@ -78,14 +80,14 @@ void WarnIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &cha
source->sendNotice(nick, Jupiter::StringS::Format("%.*s has been kicked from the server for exceeding the warning limit (%d warnings).", player->name.size(), player->name.ptr(), warns));
break;
default:
server->banPlayer(player, STRING_LITERAL_AS_REFERENCE("Jupiter Bot/RenX.Warn"), Jupiter::StringS::Format("Warning limit reached (%d warnings)", warns), std::chrono::seconds(pluginInstance.warnAction));
server->banPlayer(player, "Jupiter Bot/RenX.Warn"_jrs, Jupiter::StringS::Format("Warning limit reached (%d warnings)", warns), std::chrono::seconds(pluginInstance.warnAction));
source->sendNotice(nick, Jupiter::StringS::Format("%.*s has been banned from the server for exceeding the warning limit (%d warnings).", player->name.size(), player->name.ptr(), warns));
break;
}
}
else
{
player->varData.set(pluginInstance.getName(), WARNS_KEY, Jupiter::StringS::Format("%d", warns));
player->varData[pluginInstance.getName()].set(WARNS_KEY, Jupiter::StringS::Format("%d", warns));
server->sendMessage(player, Jupiter::StringS::Format("You have been warned by %.*s@IRC; improve your behavior, or you will be disciplined. You have %d warnings.", nick.size(), nick.ptr(), warns));
source->sendNotice(nick, Jupiter::StringS::Format("%.*s has been warned; they now have %d warnings.", player->name.size(), player->name.ptr(), warns));
}
@ -94,11 +96,11 @@ void WarnIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &cha
}
}
else
source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Channel not attached to any connected Renegade X servers."));
source->sendMessage(channel, "Error: Channel not attached to any connected Renegade X servers."_jrs);
}
}
else
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Too Few Parameters. Syntax: Warn <Player>"));
source->sendNotice(nick, "Error: Too Few Parameters. Syntax: Warn <Player>"_jrs);
}
const Jupiter::ReadableString &WarnIRCCommand::getHelp(const Jupiter::ReadableString &)
@ -113,9 +115,9 @@ IRC_COMMAND_INIT(WarnIRCCommand)
void PardonIRCCommand::create()
{
this->addTrigger(STRING_LITERAL_AS_REFERENCE("pardon"));
this->addTrigger(STRING_LITERAL_AS_REFERENCE("forgive"));
this->addTrigger(STRING_LITERAL_AS_REFERENCE("unwarn"));
this->addTrigger("pardon"_jrs);
this->addTrigger("forgive"_jrs);
this->addTrigger("unwarn"_jrs);
this->setAccessLevel(2);
}
@ -139,7 +141,7 @@ void PardonIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &c
player = server->getPlayerByPartName(parameters);
if (player != nullptr)
{
player->varData.remove(pluginInstance.getName(), WARNS_KEY);
player->varData[pluginInstance.getName()].remove(WARNS_KEY);
server->sendMessage(player, Jupiter::StringS::Format("You have been pardoned by %.*s@IRC; your warnings have been reset.", nick.size(), nick.ptr()));
source->sendNotice(nick, Jupiter::StringS::Format("%.*s has been pardoned; their warnings have been reset.", player->name.size(), player->name.ptr()));
}
@ -147,7 +149,7 @@ void PardonIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &c
}
}
else
source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Channel not attached to any connected Renegade X servers."));
source->sendMessage(channel, "Error: Channel not attached to any connected Renegade X servers."_jrs);
}
}
else
@ -166,8 +168,8 @@ IRC_COMMAND_INIT(PardonIRCCommand)
void WarnGameCommand::create()
{
this->addTrigger(STRING_LITERAL_AS_REFERENCE("warn"));
this->addTrigger(STRING_LITERAL_AS_REFERENCE("w"));
this->addTrigger("warn"_jrs);
this->addTrigger("w"_jrs);
this->setAccessLevel(1);
}
@ -178,7 +180,7 @@ void WarnGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, co
RenX::PlayerInfo *target = source->getPlayerByPartName(parameters);
if (target != nullptr)
{
int warns = target->varData.getInt(pluginInstance.getName(), WARNS_KEY) + 1;
int warns = target->varData[pluginInstance.getName()].get<int>(WARNS_KEY) + 1;
if (warns > pluginInstance.maxWarns)
{
switch (pluginInstance.warnAction)
@ -188,21 +190,21 @@ void WarnGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, co
source->sendMessage(player, Jupiter::StringS::Format("%.*s has been kicked from the server for exceeding the warning limit (%d warnings).", target->name.size(), target->name.ptr(), warns));
break;
default:
source->banPlayer(target, STRING_LITERAL_AS_REFERENCE("Jupiter Bot/RenX.Warn"), Jupiter::StringS::Format("Warning limit reached (%d warnings)", warns), std::chrono::seconds(pluginInstance.warnAction));
source->banPlayer(target, "Jupiter Bot/RenX.Warn"_jrs, Jupiter::StringS::Format("Warning limit reached (%d warnings)", warns), std::chrono::seconds(pluginInstance.warnAction));
source->sendMessage(player, Jupiter::StringS::Format("%.*s has been banned from the server for exceeding the warning limit (%d warnings).", target->name.size(), target->name.ptr(), warns));
break;
}
}
else
{
target->varData.set(pluginInstance.getName(), WARNS_KEY, Jupiter::StringS::Format("%d", warns));
target->varData[pluginInstance.getName()].set(WARNS_KEY, Jupiter::StringS::Format("%d", warns));
source->sendMessage(target, Jupiter::StringS::Format("You have been warned by %.*s; improve your behavior, or you will be disciplined. You have %d warnings.", player->name.size(), player->name.ptr(), warns));
source->sendMessage(player, Jupiter::StringS::Format("%.*s has been warned; they now have %d warnings.", target->name.size(), target->name.ptr(), warns));
}
}
}
else
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: Too few parameters. Syntax: Warn <Player>"));
source->sendMessage(player, "Error: Too few parameters. Syntax: Warn <Player>"_jrs);
}
const Jupiter::ReadableString &WarnGameCommand::getHelp(const Jupiter::ReadableString &)
@ -217,9 +219,9 @@ GAME_COMMAND_INIT(WarnGameCommand)
void PardonGameCommand::create()
{
this->addTrigger(STRING_LITERAL_AS_REFERENCE("pardon"));
this->addTrigger(STRING_LITERAL_AS_REFERENCE("forgive"));
this->addTrigger(STRING_LITERAL_AS_REFERENCE("unwarn"));
this->addTrigger("pardon"_jrs);
this->addTrigger("forgive"_jrs);
this->addTrigger("unwarn"_jrs);
this->setAccessLevel(1);
}
@ -230,7 +232,7 @@ void PardonGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player,
RenX::PlayerInfo *target = source->getPlayerByPartName(parameters);
if (target != nullptr)
{
target->varData.remove(pluginInstance.getName(), WARNS_KEY);
target->varData[pluginInstance.getName()].remove(WARNS_KEY);
source->sendMessage(target, Jupiter::StringS::Format("You have been pardoned by %.*s@IRC; your warnings have been reset.", player->name.size(), player->name.ptr()));
source->sendMessage(player, Jupiter::StringS::Format("%.*s has been pardoned; their warnings have been reset.", target->name.size(), target->name.ptr()));
}

33
SetJoin/SetJoin.cpp

@ -17,18 +17,19 @@
*/
#include <cstring>
#include "Jupiter/INIFile.h"
#include "Jupiter/Functions.h"
#include "SetJoin.h"
#include "IRC_Bot.h"
using namespace Jupiter::literals;
void SetJoinPlugin::OnJoin(Jupiter::IRC::Client *server, const Jupiter::ReadableString &chan, const Jupiter::ReadableString &nick)
{
const Jupiter::ReadableString &setjoin = this->config.get(server->getConfigSection(), nick);
const Jupiter::ReadableString &setjoin = this->config[server->getConfigSection()].get(nick);
if (setjoin.isNotEmpty())
{
if (setjoin == nullptr)
server->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("No setjoin has been set for you. To set one, use the !setjoin command"));
server->sendNotice(nick, "No setjoin has been set for you. To set one, use the !setjoin command"_jrs);
else
server->sendMessage(chan, Jupiter::StringS::Format(IRCBOLD IRCCOLOR "07[%.*s]" IRCCOLOR IRCBOLD ": %.*s", nick.size(), nick.ptr(), setjoin.size(), setjoin.ptr()));
}
@ -40,18 +41,18 @@ SetJoinPlugin pluginInstance;
void SetJoinIRCCommand::create()
{
this->addTrigger(STRING_LITERAL_AS_REFERENCE("setJoin"));
this->addTrigger("setJoin"_jrs);
}
void SetJoinIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (parameters.isNotEmpty())
{
pluginInstance.setjoin_file.set(source->getConfigSection(), nick, parameters);
pluginInstance.setjoin_file.sync();
source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Your join message has been set."));
pluginInstance.setjoin_file[source->getConfigSection()].set(nick, parameters);
pluginInstance.setjoin_file.write();
source->sendMessage(channel, "Your join message has been set."_jrs);
}
else source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Too few parameters! Syntax: setjoin <message>"));
else source->sendMessage(channel, "Too few parameters! Syntax: setjoin <message>"_jrs);
}
const Jupiter::ReadableString &SetJoinIRCCommand::getHelp(const Jupiter::ReadableString &)
@ -66,14 +67,14 @@ IRC_COMMAND_INIT(SetJoinIRCCommand)
void ViewJoinIRCCommand::create()
{
this->addTrigger(STRING_LITERAL_AS_REFERENCE("viewJoin"));
this->addTrigger(STRING_LITERAL_AS_REFERENCE("vJoin"));
this->addTrigger("viewJoin"_jrs);
this->addTrigger("vJoin"_jrs);
}
void ViewJoinIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
const Jupiter::ReadableString &target = parameters.isEmpty() ? nick : parameters;
const Jupiter::ReadableString &r = pluginInstance.setjoin_file.get(source->getConfigSection(), target);
const Jupiter::ReadableString &r = pluginInstance.setjoin_file[source->getConfigSection()].get(target);
if (r.isEmpty())
source->sendMessage(channel, Jupiter::StringS::Format("No setjoin has been set for \"%.*s\".", target.size(), target.ptr()));
@ -93,15 +94,15 @@ IRC_COMMAND_INIT(ViewJoinIRCCommand)
void DelJoinIRCCommand::create()
{
this->addTrigger(STRING_LITERAL_AS_REFERENCE("delJoin"));
this->addTrigger(STRING_LITERAL_AS_REFERENCE("dJoin"));
this->addTrigger("delJoin"_jrs);
this->addTrigger("dJoin"_jrs);
}
void DelJoinIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{
if (pluginInstance.setjoin_file.remove(source->getConfigSection(), nick))
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Your setjoin has been deleted successfully."));
else source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("No setjoin was found to delete."));
if (pluginInstance.setjoin_file[source->getConfigSection()].remove(nick))
source->sendNotice(nick, "Your setjoin has been deleted successfully."_jrs);
else source->sendNotice(nick, "No setjoin was found to delete."_jrs);
}
const Jupiter::ReadableString &DelJoinIRCCommand::getHelp(const Jupiter::ReadableString &)

2
SetJoin/SetJoin.h

@ -25,7 +25,7 @@
class SetJoinPlugin : public Jupiter::Plugin
{
public:
Jupiter::INIFile &setjoin_file = Jupiter::Plugin::config;
Jupiter::Config &setjoin_file = Jupiter::Plugin::config;
void OnJoin(Jupiter::IRC::Client *server, const Jupiter::ReadableString &chan, const Jupiter::ReadableString &nick) override;
};

Loading…
Cancel
Save