Browse Source

* Removed redundant RenX::Core::send()

* Added additional weapon translations
* Added some projectile translations
* Added Silo translation
* Replaced RenX::getTeam() with 2 different getTeam() functions
* Removed RenX::sanitizeString() for C-style Strings.
* Added events: OnDisarm, OnExplode, OnCharacterPurchase, OnItemPurchase, OnWeaponPurchase, OnRefillPurchase, OnVehiclePurchase, OnVehicleSpawn, OnSpawn,
OnBotJoin, OnVehicleCrate, OnDeathCrate, OnMoneyCrate, OnCharacterCrate, OnSpyCrate, OnRefillCrate, OnDonate, OnDemoRecordStop
* Added functions to RenX::Server: isSeamless(), gameover(), setMap(), loadMutator(), unloadMutator(), cancelVote(), swapTeams(), recordDemo(), mute(), unmute().
Replaced RenX::Server::changeTeam() parameter "options" with "resetCredits".
* Server profile added for Open Beta 4.
* Updated Jupiter
* Updated plugins according to the above changes.
pull/3/head
JustinAJ 10 years ago
parent
commit
4ed9acf6ec
  1. 2
      Jupiter
  2. BIN
      Release/Bot.lib
  3. BIN
      Release/Plugins/RenX.Core.lib
  4. 206
      RenX.Commands/RenX_Commands.cpp
  5. 2
      RenX.Commands/RenX_Commands.h
  6. 7
      RenX.Core/RenX_Core.cpp
  7. 9
      RenX.Core/RenX_Core.h
  8. 95
      RenX.Core/RenX_Functions.cpp
  9. 18
      RenX.Core/RenX_Functions.h
  10. 127
      RenX.Core/RenX_Plugin.cpp
  11. 26
      RenX.Core/RenX_Plugin.h
  12. 723
      RenX.Core/RenX_Server.cpp
  13. 80
      RenX.Core/RenX_Server.h
  14. 13
      RenX.Core/RenX_ServerProfile.cpp
  15. 1
      RenX.Core/RenX_ServerProfile.h
  16. 612
      RenX.Logging/RenX_Logging.cpp
  17. 74
      RenX.Logging/RenX_Logging.h
  18. 2
      RenX.Medals/RenX_Medals.cpp
  19. 2
      RenX.Medals/RenX_Medals.h

2
Jupiter

@ -1 +1 @@
Subproject commit 46ce3548d245459aba3f0b14c7fd7fd8528a0c59 Subproject commit 54a9e74686b814f6935d8203822c54168f0af5e2

BIN
Release/Bot.lib

Binary file not shown.

BIN
Release/Plugins/RenX.Core.lib

Binary file not shown.

206
RenX.Commands/RenX_Commands.cpp

@ -269,7 +269,16 @@ void HostMsgIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &
{ {
if (parameters.isEmpty() == false) if (parameters.isEmpty() == false)
{ {
if (RenX::getCore()->send(source->getChannel(channel)->getType(), Jupiter::StringS::Format("say %.*s", parameters.size(), parameters.ptr())) == 0) int type = source->getChannel(channel)->getType();
bool success = false;
for (unsigned int i = 0; i != RenX::getCore()->getServerCount(); i++)
{
RenX::Server *server = RenX::getCore()->getServer(i);
if (server->isLogChanType(type))
success = server->sendMessage(parameters) > 0;
}
if (!success)
source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Channel not attached to any connected Renegade X servers.")); source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Channel not attached to any connected Renegade X servers."));
} }
else source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Too Few Parameters. Syntax: hmsg <Message>")); else source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Too Few Parameters. Syntax: hmsg <Message>"));
@ -948,7 +957,7 @@ IRC_COMMAND_INIT(SetRulesIRCCommand)
void ReconnectIRCCommand::create() void ReconnectIRCCommand::create()
{ {
this->addTrigger(STRING_LITERAL_AS_REFERENCE("reconnect")); this->addTrigger(STRING_LITERAL_AS_REFERENCE("reconnect"));
this->setAccessLevel(4); this->setAccessLevel(3);
} }
void ReconnectIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &) void ReconnectIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &)
@ -963,7 +972,7 @@ void ReconnectIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString
RenX::Server *server = RenX::getCore()->getServer(i); RenX::Server *server = RenX::getCore()->getServer(i);
if (server->isLogChanType(type)) if (server->isLogChanType(type))
{ {
if (server->reconnect()) msg.format("Connection established"); if (server->reconnect()) msg.set("Connection established");
else msg.format("[RenX] ERROR: Failed to connect to %.*s on port %u." ENDL, server->getHostname().size(), server->getHostname().ptr(), server->getPort()); else msg.format("[RenX] ERROR: Failed to connect to %.*s on port %u." ENDL, server->getHostname().size(), server->getHostname().ptr(), server->getPort());
source->sendMessage(channel, msg); source->sendMessage(channel, msg);
} }
@ -971,7 +980,7 @@ void ReconnectIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString
if (msg.isEmpty()) if (msg.isEmpty())
{ {
// We didn't connect anywhere!! // We didn't connect anywhere!!
msg.format("ERROR: No servers found to connect to."); msg.set("ERROR: No servers found to connect to.");
source->sendMessage(channel, msg); source->sendMessage(channel, msg);
} }
} }
@ -979,102 +988,139 @@ void ReconnectIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString
const Jupiter::ReadableString &ReconnectIRCCommand::getHelp(const Jupiter::ReadableString &) const Jupiter::ReadableString &ReconnectIRCCommand::getHelp(const Jupiter::ReadableString &)
{ {
static STRING_LITERAL_AS_NAMED_REFERENCE(defaultHelp, "Gets information about a player. Syntax: Reconnect"); static STRING_LITERAL_AS_NAMED_REFERENCE(defaultHelp, "Resets the RCON connection. Syntax: Reconnect");
return defaultHelp; return defaultHelp;
} }
IRC_COMMAND_INIT(ReconnectIRCCommand) IRC_COMMAND_INIT(ReconnectIRCCommand)
// RestartMap IRC Command // GameOver IRC Command
/*void RestartMapIRCCommand::create() void GameOverIRCCommand::create()
{ {
this->addTrigger("restartmap"); this->addTrigger(STRING_LITERAL_AS_REFERENCE("gameover"));
this->setAccessLevel(2); this->addTrigger(STRING_LITERAL_AS_REFERENCE("endmap"));
this->setAccessLevel(3);
} }
void RestartMapIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters) void GameOverIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &)
{ {
int r = RenX::getCore()->send(source->getChannel(channel.c_str())->getType(), "adminrestartmap"); Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
if (r > 0) if (chan != nullptr)
{ {
char t[256]; int type = chan->getType();
sprintf(t, "Command sent to %d servers.", r); bool match = false;
source->sendMessage(channel.c_str(), t); for (unsigned int i = 0; i != RenX::getCore()->getServerCount(); i++)
{
RenX::Server *server = RenX::getCore()->getServer(i);
if (server->isLogChanType(type))
{
match = true;
if (server->gameover() == false)
source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Server does not support gameover."));
}
}
if (match == false)
source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Channel not attached to any connected Renegade X servers."));
} }
else source->sendMessage(channel.c_str(), "Error: Channel not attached to any connected Renegade X servers.");
} }
const char *RestartMapIRCCommand::getHelp() const Jupiter::ReadableString &GameOverIRCCommand::getHelp(const Jupiter::ReadableString &)
{ {
return "Restarts the current map. Syntax: RestartMap"; static STRING_LITERAL_AS_NAMED_REFERENCE(defaultHelp, "Ends the game immediately. Syntax: Gameover");
return defaultHelp;
} }
IRC_COMMAND_INIT(RestartMapIRCCommand) IRC_COMMAND_INIT(GameOverIRCCommand)
// SetMap IRC Command // SetMap IRC Command
void SetMapIRCCommand::create() void SetMapIRCCommand::create()
{ {
this->addTrigger("setmap"); this->addTrigger(STRING_LITERAL_AS_REFERENCE("setmap"));
this->setAccessLevel(3); this->setAccessLevel(4);
} }
void SetMapIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters) void SetMapIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{ {
if (parameters != nullptr) if (parameters.isEmpty() == false)
{ {
Jupiter::StringL cmd = "adminrestartmap "; Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
cmd += parameters; if (chan != nullptr)
int r = RenX::getCore()->send(source->getChannel(channel.c_str())->getType(), cmd.c_str());
if (r > 0)
{ {
char t[256]; int type = chan->getType();
sprintf(t, "Command sent to %d servers.", r); bool match = false;
source->sendMessage(channel.c_str(), t); for (unsigned int i = 0; i != RenX::getCore()->getServerCount(); i++)
{
RenX::Server *server = RenX::getCore()->getServer(i);
if (server->isLogChanType(type))
{
match = true;
if (server->setMap(parameters) == false)
source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Server does not support setmap."));
}
}
if (match == false)
source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Channel not attached to any connected Renegade X servers."));
} }
else source->sendMessage(channel.c_str(), "Error: Channel not attached to any connected Renegade X servers.");
} }
else source->sendNotice(nick.c_str(), "Error: Too Few Parameters. Syntax: SetMap <Map Name>"); else
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Too few parameters. Syntax: setmap <map>"));
} }
const char *SetMapIRCCommand::getHelp() const Jupiter::ReadableString &SetMapIRCCommand::getHelp(const Jupiter::ReadableString &)
{ {
return "Sets the next map, and ends the current map. Syntax: SetMap <Map Name>"; static STRING_LITERAL_AS_NAMED_REFERENCE(defaultHelp, "Ends the game immediately. Syntax: setmap <map>");
return defaultHelp;
} }
IRC_COMMAND_INIT(SetMapIRCCommand)*/ IRC_COMMAND_INIT(SetMapIRCCommand)
// Mute IRC Command // Mute IRC Command
/*void MuteIRCCommand::create() void MuteIRCCommand::create()
{ {
this->addTrigger("mute"); this->addTrigger(STRING_LITERAL_AS_REFERENCE("mute"));
this->addTrigger("silence");
this->setAccessLevel(2); this->setAccessLevel(2);
} }
void MuteIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters) void MuteIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{ {
if (parameters != nullptr) if (parameters.isEmpty() == false)
{ {
Jupiter::StringL cmd = "AdminForceTextMute "; Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
cmd += parameters; if (chan != nullptr)
int r = RenX::getCore()->send(source->getChannel(channel.c_str())->getType(), cmd.c_str());
if (r > 0)
{ {
char t[256]; int type = chan->getType();
sprintf(t, "Command sent to %d servers.", r); RenX::PlayerInfo *player;
source->sendMessage(channel.c_str(), t); bool match = false;
for (unsigned int i = 0; i != RenX::getCore()->getServerCount(); i++)
{
RenX::Server *server = RenX::getCore()->getServer(i);
if (server->isLogChanType(type))
{
match = true;
player = server->getPlayerByPartName(parameters);
if (player != nullptr)
{
if (server->mute(player) == false)
source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Server does not support muting players."));
}
else
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Player not found."));
}
}
if (match == false)
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Channel not attached to any connected Renegade X servers."));
} }
else source->sendMessage(channel.c_str(), "Error: Channel not attached to any connected Renegade X servers.");
} }
else source->sendNotice(nick.c_str(), "Error: Too Few Parameters. Syntax: Mute <Player Name>"); else source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Too Few Parameters. Syntax: mute <player>"));
} }
const char *MuteIRCCommand::getHelp() const Jupiter::ReadableString &MuteIRCCommand::getHelp(const Jupiter::ReadableString &)
{ {
return "Mutes a player from the game chat. Syntax: Mute <Player Name>"; static STRING_LITERAL_AS_NAMED_REFERENCE(defaultHelp, "Mutes a player. Syntax: mute <player>");
return defaultHelp;
} }
IRC_COMMAND_INIT(MuteIRCCommand) IRC_COMMAND_INIT(MuteIRCCommand)
@ -1083,34 +1129,50 @@ IRC_COMMAND_INIT(MuteIRCCommand)
void UnMuteIRCCommand::create() void UnMuteIRCCommand::create()
{ {
this->addTrigger("unmute"); this->addTrigger(STRING_LITERAL_AS_REFERENCE("unmute"));
this->setAccessLevel(2); this->setAccessLevel(2);
} }
void UnMuteIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters) void UnMuteIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &channel, const Jupiter::ReadableString &nick, const Jupiter::ReadableString &parameters)
{ {
if (parameters != nullptr) if (parameters.isEmpty() == false)
{ {
Jupiter::StringL cmd = "AdminForceTextUnMute "; Jupiter::IRC::Client::Channel *chan = source->getChannel(channel);
cmd += parameters; if (chan != nullptr)
int r = RenX::getCore()->send(source->getChannel(channel.c_str())->getType(), cmd.c_str());
if (r > 0)
{ {
char t[256]; int type = chan->getType();
sprintf(t, "Command sent to %d servers.", r); RenX::PlayerInfo *player;
source->sendMessage(channel.c_str(), t); bool match = false;
for (unsigned int i = 0; i != RenX::getCore()->getServerCount(); i++)
{
RenX::Server *server = RenX::getCore()->getServer(i);
if (server->isLogChanType(type))
{
match = true;
player = server->getPlayerByPartName(parameters);
if (player != nullptr)
{
if (server->unmute(player) == false)
source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Server does not support muting players."));
}
else
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Player not found."));
}
}
if (match == false)
source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Channel not attached to any connected Renegade X servers."));
} }
else source->sendMessage(channel.c_str(), "Error: Channel not attached to any connected Renegade X servers.");
} }
else source->sendNotice(nick.c_str(), "Error: Too Few Parameters. Syntax: UnMute <Player Name>"); else source->sendNotice(nick, STRING_LITERAL_AS_REFERENCE("Error: Too Few Parameters. Syntax: unmute <player>"));
} }
const char *UnMuteIRCCommand::getHelp() const Jupiter::ReadableString &UnMuteIRCCommand::getHelp(const Jupiter::ReadableString &)
{ {
return "UnMutes a player from the game chat. Syntax: UnMute <Player Name>"; static STRING_LITERAL_AS_NAMED_REFERENCE(defaultHelp, "Unmutes a player. Syntax: unmute <player>");
return defaultHelp;
} }
IRC_COMMAND_INIT(UnMuteIRCCommand)*/ IRC_COMMAND_INIT(UnMuteIRCCommand)
// Kick IRC Command // Kick IRC Command
@ -1337,8 +1399,7 @@ void AddBotsIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &
{ {
RenX::Server *server; RenX::Server *server;
Jupiter::StringL cmd; Jupiter::StringL cmd;
Jupiter::ReferenceString targetTeam = Jupiter::ReferenceString::getWord(parameters, 1, WHITESPACE); RenX::TeamType team = RenX::getTeam(Jupiter::ReferenceString::getWord(parameters, 1, WHITESPACE));
RenX::TeamType team = targetTeam.isEmpty() ? RenX::TeamType::Other : RenX::getTeam(targetTeam[0]);
switch (team) switch (team)
{ {
@ -1348,6 +1409,7 @@ void AddBotsIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &
case RenX::TeamType::Nod: case RenX::TeamType::Nod:
cmd = "addbluebots "; cmd = "addbluebots ";
break; break;
case RenX::TeamType::None:
case RenX::TeamType::Other: case RenX::TeamType::Other:
cmd = "addbots "; cmd = "addbots ";
break; break;
@ -1584,7 +1646,6 @@ void TeamChangeIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableStrin
{ {
int type = chan->getType(); int type = chan->getType();
Jupiter::ReferenceString playerName = Jupiter::ReferenceString::getWord(parameters, 0, WHITESPACE); Jupiter::ReferenceString playerName = Jupiter::ReferenceString::getWord(parameters, 0, WHITESPACE);
double credits = Jupiter::ReferenceString::getWord(parameters, 1, WHITESPACE).asDouble();
RenX::PlayerInfo *player; RenX::PlayerInfo *player;
bool playerFound = false; bool playerFound = false;
for (unsigned int i = 0; i != RenX::getCore()->getServerCount(); i++) for (unsigned int i = 0; i != RenX::getCore()->getServerCount(); i++)
@ -1640,7 +1701,6 @@ void TeamChange2IRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableStri
{ {
int type = chan->getType(); int type = chan->getType();
Jupiter::ReferenceString playerName = Jupiter::ReferenceString::getWord(parameters, 0, WHITESPACE); Jupiter::ReferenceString playerName = Jupiter::ReferenceString::getWord(parameters, 0, WHITESPACE);
double credits = Jupiter::ReferenceString::getWord(parameters, 1, WHITESPACE).asDouble();
RenX::PlayerInfo *player; RenX::PlayerInfo *player;
bool playerFound = false; bool playerFound = false;
for (unsigned int i = 0; i != RenX::getCore()->getServerCount(); i++) for (unsigned int i = 0; i != RenX::getCore()->getServerCount(); i++)
@ -1654,7 +1714,7 @@ void TeamChange2IRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableStri
if (player->name.findi(playerName) != Jupiter::INVALID_INDEX) if (player->name.findi(playerName) != Jupiter::INVALID_INDEX)
{ {
playerFound = true; playerFound = true;
if (server->changeTeam(player, 0x01) == false) if (server->changeTeam(player, false) == false)
source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Server does not support team changing.")); source->sendMessage(channel, STRING_LITERAL_AS_REFERENCE("Error: Server does not support team changing."));
} }
} }
@ -2007,10 +2067,9 @@ void AddBotsGameCommand::create()
void AddBotsGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, const Jupiter::ReadableString &parameters) void AddBotsGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player, const Jupiter::ReadableString &parameters)
{ {
Jupiter::ReferenceString targetTeam = Jupiter::ReferenceString::getWord(parameters, 1, WHITESPACE); RenX::TeamType team = RenX::getTeam(Jupiter::ReferenceString::getWord(parameters, 1, WHITESPACE));
RenX::TeamType team = targetTeam.isEmpty() ? RenX::TeamType::Other : RenX::getTeam(targetTeam[0]);
const char *cmd; Jupiter::StringS cmd;
switch (team) switch (team)
{ {
case RenX::TeamType::GDI: case RenX::TeamType::GDI:
@ -2020,6 +2079,7 @@ void AddBotsGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player,
cmd = "addbluebots "; cmd = "addbluebots ";
break; break;
default: default:
case RenX::TeamType::None:
case RenX::TeamType::Other: case RenX::TeamType::Other:
cmd = "addbots "; cmd = "addbots ";
break; break;
@ -2030,7 +2090,9 @@ void AddBotsGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player,
amount = 1; amount = 1;
else else
amount = parameters.asUnsignedInt(); amount = parameters.asUnsignedInt();
source->send(Jupiter::StringS::Format("%s %u", cmd, amount)); cmd += Jupiter::StringS::Format("%u", amount);
source->send(cmd);
source->sendMessage(player, Jupiter::StringS::Format("%u bots have been added to the server.", amount)); source->sendMessage(player, Jupiter::StringS::Format("%u bots have been added to the server.", amount));
} }

2
RenX.Commands/RenX_Commands.h

@ -67,7 +67,7 @@ GENERIC_IRC_COMMAND(ShowRulesIRCCommand)
GENERIC_IRC_COMMAND(RulesIRCCommand) GENERIC_IRC_COMMAND(RulesIRCCommand)
GENERIC_IRC_COMMAND(SetRulesIRCCommand) GENERIC_IRC_COMMAND(SetRulesIRCCommand)
GENERIC_IRC_COMMAND(ReconnectIRCCommand) GENERIC_IRC_COMMAND(ReconnectIRCCommand)
GENERIC_IRC_COMMAND(RestartMapIRCCommand) GENERIC_IRC_COMMAND(GameOverIRCCommand)
GENERIC_IRC_COMMAND(SetMapIRCCommand) GENERIC_IRC_COMMAND(SetMapIRCCommand)
GENERIC_IRC_COMMAND(MuteIRCCommand) GENERIC_IRC_COMMAND(MuteIRCCommand)
GENERIC_IRC_COMMAND(UnMuteIRCCommand) GENERIC_IRC_COMMAND(UnMuteIRCCommand)

7
RenX.Core/RenX_Core.cpp

@ -62,11 +62,6 @@ RenX::Core::~Core()
RenX::Core::servers.emptyAndDelete(); RenX::Core::servers.emptyAndDelete();
} }
int RenX::Core::send(RenX::Server *server, const Jupiter::ReadableString &msg)
{
return server->send(msg);
}
unsigned int RenX::Core::send(int type, const Jupiter::ReadableString &msg) unsigned int RenX::Core::send(int type, const Jupiter::ReadableString &msg)
{ {
unsigned int r = 0; unsigned int r = 0;
@ -74,7 +69,7 @@ unsigned int RenX::Core::send(int type, const Jupiter::ReadableString &msg)
for (size_t i = 0; i != RenX::Core::servers.size(); i++) for (size_t i = 0; i != RenX::Core::servers.size(); i++)
{ {
server = RenX::Core::getServer(i); server = RenX::Core::getServer(i);
if (server->isLogChanType(type) && RenX::Core::send(server, msg) > 0) r++; if (server->isLogChanType(type) && server->send(msg) > 0) r++;
} }
return r; return r;
} }

9
RenX.Core/RenX_Core.h

@ -66,15 +66,6 @@ namespace RenX
*/ */
const Jupiter::ReadableString &getName() override { return name; } const Jupiter::ReadableString &getName() override { return name; }
/**
* @brief Sends a command to a specific server.
*
* @param server Server to send the command to.
* @param data Command to send.
* @return Number of bytes sent on success, less than or equal to 0 otherwise.
*/
int send(Server *server, const Jupiter::ReadableString &data);
/** /**
* @brief Sends a command to all servers of a specific type. * @brief Sends a command to all servers of a specific type.
* *

95
RenX.Core/RenX_Functions.cpp

@ -102,9 +102,31 @@ Jupiter::ReferenceString translated_Vehicle_AC130_DmgType_HeavyCannon = STRING_L
Jupiter::ReferenceString translated_Vehicle_AC130_DmgType_AutoCannon = STRING_LITERAL_AS_REFERENCE("AC130 Auto Cannon"); Jupiter::ReferenceString translated_Vehicle_AC130_DmgType_AutoCannon = STRING_LITERAL_AS_REFERENCE("AC130 Auto Cannon");
/** Weapons */ /** Weapons */
Jupiter::ReferenceString translated_Weapon_HeavyPistol = STRING_LITERAL_AS_REFERENCE("Heavy Pistol");
Jupiter::ReferenceString translated_Weapon_Carbine = STRING_LITERAL_AS_REFERENCE("Carbine");
Jupiter::ReferenceString translated_Weapon_Airstrike_GDI = STRING_LITERAL_AS_REFERENCE("GDI Airstrike");
Jupiter::ReferenceString translated_Weapon_Airstrike_Nod = STRING_LITERAL_AS_REFERENCE("Nod Airstrike");
Jupiter::ReferenceString translated_Weapon_TiberiumFlechetteRifle = STRING_LITERAL_AS_REFERENCE("Tiberium Flechette Gun");
Jupiter::ReferenceString translated_Weapon_TiberiumAutoRifle = STRING_LITERAL_AS_REFERENCE("Tiberium Automatic Rifle");
Jupiter::ReferenceString translated_Weapon_EMPGrenade = STRING_LITERAL_AS_REFERENCE("EMP Grenade");
Jupiter::ReferenceString translated_Weapon_SmokeGrenade = STRING_LITERAL_AS_REFERENCE("Smoke Grenade");
Jupiter::ReferenceString translated_Weapon_TimedC4 = STRING_LITERAL_AS_REFERENCE("Timed C4");
Jupiter::ReferenceString translated_Weapon_RemoteC4 = STRING_LITERAL_AS_REFERENCE("Remote C4");
Jupiter::ReferenceString translated_Weapon_ProxyC4 = STRING_LITERAL_AS_REFERENCE("Proximity C4");
Jupiter::ReferenceString translated_Weapon_ATMine = STRING_LITERAL_AS_REFERENCE("Anti-Tank Mine");
Jupiter::ReferenceString translated_Weapon_IonCannonBeacon = STRING_LITERAL_AS_REFERENCE("Ion Cannon Beacon");
Jupiter::ReferenceString translated_Weapon_NukeBeacon = STRING_LITERAL_AS_REFERENCE("Nuclear Missile Beacon");
Jupiter::ReferenceString translated_Weapon_DeployedC4 = STRING_LITERAL_AS_REFERENCE("Timed C4"); Jupiter::ReferenceString translated_Weapon_DeployedC4 = STRING_LITERAL_AS_REFERENCE("Timed C4");
Jupiter::ReferenceString translated_Weapon_DeployedTimedC4 = STRING_LITERAL_AS_REFERENCE("Timed C4");
Jupiter::ReferenceString translated_Weapon_DeployedRemoteC4 = STRING_LITERAL_AS_REFERENCE("Remote C4"); Jupiter::ReferenceString translated_Weapon_DeployedRemoteC4 = STRING_LITERAL_AS_REFERENCE("Remote C4");
Jupiter::ReferenceString translated_Weapon_DeployedProxyC4 = STRING_LITERAL_AS_REFERENCE("Proximity C4"); Jupiter::ReferenceString translated_Weapon_DeployedProxyC4 = STRING_LITERAL_AS_REFERENCE("Proximity C4");
Jupiter::ReferenceString translated_Weapon_DeployedATMine = STRING_LITERAL_AS_REFERENCE("Anti-Tank Mine");
Jupiter::ReferenceString translated_Weapon_DeployedIonCannonBeacon = STRING_LITERAL_AS_REFERENCE("Ion Cannon Beacon");
Jupiter::ReferenceString translated_Weapon_DeployedNukeBeacon = STRING_LITERAL_AS_REFERENCE("Nuclear Missile Beacon");
/** Projectiles */
Jupiter::ReferenceString translated_Projectile_EMPGrenade = STRING_LITERAL_AS_REFERENCE("EMP Grenade");
Jupiter::ReferenceString translated_Projectile_SmokeGrenade = STRING_LITERAL_AS_REFERENCE("Smoke Grenade");
/** GDI Characters */ /** GDI Characters */
Jupiter::ReferenceString translated_GDI_Deadeye = STRING_LITERAL_AS_REFERENCE("Deadeye"); Jupiter::ReferenceString translated_GDI_Deadeye = STRING_LITERAL_AS_REFERENCE("Deadeye");
@ -254,6 +276,9 @@ Jupiter::ReferenceString translated_Building_PowerPlant_GDI_Internals = STRING_L
Jupiter::ReferenceString translated_Building_AdvancedGuardTower_Internals = STRING_LITERAL_AS_REFERENCE("Advanced Guard Tower"); Jupiter::ReferenceString translated_Building_AdvancedGuardTower_Internals = STRING_LITERAL_AS_REFERENCE("Advanced Guard Tower");
Jupiter::ReferenceString translated_Building_Obelisk_Internals = STRING_LITERAL_AS_REFERENCE("Obelisk of Light"); Jupiter::ReferenceString translated_Building_Obelisk_Internals = STRING_LITERAL_AS_REFERENCE("Obelisk of Light");
/** Other structures */
Jupiter::ReferenceString translated_Building_Silo_Internals = STRING_LITERAL_AS_REFERENCE("Tiberium Silo");
/** Defences */ /** Defences */
Jupiter::ReferenceString translated_Defence_GuardTower = STRING_LITERAL_AS_REFERENCE("Guard Tower"); Jupiter::ReferenceString translated_Defence_GuardTower = STRING_LITERAL_AS_REFERENCE("Guard Tower");
Jupiter::ReferenceString translated_Defence_Turret = STRING_LITERAL_AS_REFERENCE("Turret"); Jupiter::ReferenceString translated_Defence_Turret = STRING_LITERAL_AS_REFERENCE("Turret");
@ -276,21 +301,32 @@ Jupiter::ReferenceString translated_IonCannonBeacon = STRING_LITERAL_AS_REFERENC
Jupiter::ReferenceString translated_NukeBeacon = STRING_LITERAL_AS_REFERENCE("Nuclear Strike Beacon"); Jupiter::ReferenceString translated_NukeBeacon = STRING_LITERAL_AS_REFERENCE("Nuclear Strike Beacon");
Jupiter::ReferenceString translated_KillZDamageType = STRING_LITERAL_AS_REFERENCE("Kill Zone"); Jupiter::ReferenceString translated_KillZDamageType = STRING_LITERAL_AS_REFERENCE("Kill Zone");
RenX::TeamType RenX::getTeam(char team) RenX::TeamType RenX::getTeam(int teamNum)
{ {
switch (team) switch (teamNum)
{ {
case 'g': case 0:
case 'G':
return RenX::TeamType::GDI; return RenX::TeamType::GDI;
case 'n': case 1:
case 'N':
return RenX::TeamType::Nod; return RenX::TeamType::Nod;
case 255:
return RenX::TeamType::None;
default: default:
return RenX::TeamType::Other; return RenX::TeamType::Other;
} }
} }
RenX::TeamType RenX::getTeam(const Jupiter::ReadableString &team)
{
if (team.equalsi("GDI"))
return RenX::TeamType::GDI;
if (team.equalsi("Nod"))
return RenX::TeamType::Nod;
if (team.isEmpty() || team.equalsi("Neutral") || team.equalsi("Civilians"))
return RenX::TeamType::None;
return RenX::TeamType::Other;
}
const Jupiter::ReadableString &RenX::getTeamColor(TeamType team) const Jupiter::ReadableString &RenX::getTeamColor(TeamType team)
{ {
switch (team) switch (team)
@ -451,10 +487,33 @@ const Jupiter::ReadableString &RenX::translateName(const Jupiter::ReadableString
else if (object.find(STRING_LITERAL_AS_REFERENCE("Weapon_")) == 0) else if (object.find(STRING_LITERAL_AS_REFERENCE("Weapon_")) == 0)
{ {
object.shiftRight(7); object.shiftRight(7);
if (object.equals(STRING_LITERAL_AS_REFERENCE("HeavyPistol"))) return translated_Weapon_HeavyPistol;
if (object.equals(STRING_LITERAL_AS_REFERENCE("Carbine"))) return translated_Weapon_Carbine;
if (object.equals(STRING_LITERAL_AS_REFERENCE("Airstrike_GDI"))) return translated_Weapon_Airstrike_GDI;
if (object.equals(STRING_LITERAL_AS_REFERENCE("Airstrike_Nod"))) return translated_Weapon_Airstrike_Nod;
if (object.equals(STRING_LITERAL_AS_REFERENCE("TiberiumFlechetteRifle"))) return translated_Weapon_TiberiumFlechetteRifle;
if (object.equals(STRING_LITERAL_AS_REFERENCE("TiberiumAutoRifle"))) return translated_Weapon_TiberiumAutoRifle;
if (object.equals(STRING_LITERAL_AS_REFERENCE("EMPGrenade"))) return translated_Weapon_EMPGrenade;
if (object.equals(STRING_LITERAL_AS_REFERENCE("SmokeGrenade"))) return translated_Weapon_SmokeGrenade;
if (object.equals(STRING_LITERAL_AS_REFERENCE("TimedC4"))) return translated_Weapon_TimedC4;
if (object.equals(STRING_LITERAL_AS_REFERENCE("RemoteC4"))) return translated_Weapon_RemoteC4;
if (object.equals(STRING_LITERAL_AS_REFERENCE("ProxyC4"))) return translated_Weapon_ProxyC4;
if (object.equals(STRING_LITERAL_AS_REFERENCE("ATMine"))) return translated_Weapon_ATMine;
if (object.equals(STRING_LITERAL_AS_REFERENCE("IonCannonBeacon"))) return translated_Weapon_IonCannonBeacon;
if (object.equals(STRING_LITERAL_AS_REFERENCE("NukeBeacon"))) return translated_Weapon_NukeBeacon;
if (object.equals(STRING_LITERAL_AS_REFERENCE("DeployedC4"))) return translated_Weapon_DeployedC4; if (object.equals(STRING_LITERAL_AS_REFERENCE("DeployedC4"))) return translated_Weapon_DeployedC4;
if (object.equals(STRING_LITERAL_AS_REFERENCE("DeployedTimedC4"))) return translated_Weapon_DeployedTimedC4;
if (object.equals(STRING_LITERAL_AS_REFERENCE("DeployedRemoteC4"))) return translated_Weapon_DeployedRemoteC4; if (object.equals(STRING_LITERAL_AS_REFERENCE("DeployedRemoteC4"))) return translated_Weapon_DeployedRemoteC4;
if (object.equals(STRING_LITERAL_AS_REFERENCE("DeployedProxyC4"))) return translated_Weapon_DeployedProxyC4; if (object.equals(STRING_LITERAL_AS_REFERENCE("DeployedProxyC4"))) return translated_Weapon_DeployedProxyC4;
// TODO: Add more translations. if (object.equals(STRING_LITERAL_AS_REFERENCE("DeployedATMine"))) return translated_Weapon_DeployedATMine;
if (object.equals(STRING_LITERAL_AS_REFERENCE("DeployedIonCannonBeacon"))) return translated_Weapon_DeployedIonCannonBeacon;
if (object.equals(STRING_LITERAL_AS_REFERENCE("DeployedNukeBeacon"))) return translated_Weapon_DeployedNukeBeacon;
}
else if (object.find(STRING_LITERAL_AS_REFERENCE("Projectile_")) == 0)
{
object.shiftRight(11);
if (object.equals(STRING_LITERAL_AS_REFERENCE("EMPGrenade"))) return translated_Projectile_EMPGrenade;
if (object.equals(STRING_LITERAL_AS_REFERENCE("SmokeGrenade"))) return translated_Projectile_SmokeGrenade;
} }
else if (object.find(STRING_LITERAL_AS_REFERENCE("InventoryManager_")) == 0) else if (object.find(STRING_LITERAL_AS_REFERENCE("InventoryManager_")) == 0)
{ {
@ -593,6 +652,9 @@ const Jupiter::ReadableString &RenX::translateName(const Jupiter::ReadableString
/** Defense structures */ /** Defense structures */
if (object.equals(STRING_LITERAL_AS_REFERENCE("AdvancedGuardTower_Internals"))) return translated_Building_AdvancedGuardTower_Internals; if (object.equals(STRING_LITERAL_AS_REFERENCE("AdvancedGuardTower_Internals"))) return translated_Building_AdvancedGuardTower_Internals;
if (object.equals(STRING_LITERAL_AS_REFERENCE("Obelisk_Internals"))) return translated_Building_Obelisk_Internals; if (object.equals(STRING_LITERAL_AS_REFERENCE("Obelisk_Internals"))) return translated_Building_Obelisk_Internals;
/** Other structures */
if (object.equals(STRING_LITERAL_AS_REFERENCE("Silo_Internals"))) return translated_Building_Silo_Internals;
} }
else if (object.find(STRING_LITERAL_AS_REFERENCE("Defence_")) == 0) else if (object.find(STRING_LITERAL_AS_REFERENCE("Defence_")) == 0)
{ {
@ -712,25 +774,6 @@ Jupiter::String RenX::getFormattedPlayerName(const RenX::PlayerInfo *player)
return r; return r;
} }
void RenX::sanitizeString(char *str)
{
while (*str != 0)
{
switch (*str)
{
case '|':
*str = '/';
break;
case '\\':
if (*(str + 1) == 0) *str = '/'; // So users get something at least.
break;
default:
break;
}
str++;
}
}
void RenX::sanitizeString(Jupiter::StringType &str) void RenX::sanitizeString(Jupiter::StringType &str)
{ {
if (str.isEmpty() == false) if (str.isEmpty() == false)

18
RenX.Core/RenX_Functions.h

@ -34,12 +34,20 @@ namespace RenX
class Server; class Server;
/** /**
* @brief Translates the first character of a team's name into a TeamType. * @brief Translates a team's number into a TeamType.
* *
* @param First character of the team name. * @param teamNum Team number
* @return A corresponding TeamType. * @return A corresponding TeamType.
*/ */
RENX_API TeamType getTeam(char team); RENX_API TeamType getTeam(int teamNum);
/**
* @brief Translates team number into a TeamType.
*
* @param team Team name
* @return A corresponding TeamType.
*/
RENX_API TeamType getTeam(const Jupiter::ReadableString &team);
/** /**
* @brief Fetches the corresponding IRC color code for a team. * @brief Fetches the corresponding IRC color code for a team.
@ -127,12 +135,12 @@ namespace RenX
RENX_API Jupiter::String getFormattedPlayerName(const RenX::PlayerInfo *player); RENX_API Jupiter::String getFormattedPlayerName(const RenX::PlayerInfo *player);
/** /**
* @brief Sanitizes a string into a RCON-ready state. * @brief Sanitizes a string into a RCON-ready state by replacing special
* characters with HTML-style character codes.
* Note: This resolves the pipe character ('|') exploit. * Note: This resolves the pipe character ('|') exploit.
* *
* @brief str String to sanitize. * @brief str String to sanitize.
*/ */
RENX_API void sanitizeString(char *str);
RENX_API void sanitizeString(Jupiter::StringType &str); RENX_API void sanitizeString(Jupiter::StringType &str);
/** /**

127
RenX.Core/RenX_Plugin.cpp

@ -125,6 +125,21 @@ void RenX::Plugin::RenX_OnDisarm(Server *, const RenX::PlayerInfo *, const Jupit
return; return;
} }
void RenX::Plugin::RenX_OnDisarm(Server *, const RenX::PlayerInfo *, const Jupiter::ReadableString &, const RenX::PlayerInfo *)
{
return;
}
void RenX::Plugin::RenX_OnExplode(Server *, const PlayerInfo *, const Jupiter::ReadableString &)
{
return;
}
void RenX::Plugin::RenX_OnExplode(Server *, const Jupiter::ReadableString &)
{
return;
}
void RenX::Plugin::RenX_OnSuicide(Server *, const RenX::PlayerInfo *, const Jupiter::ReadableString &) void RenX::Plugin::RenX_OnSuicide(Server *, const RenX::PlayerInfo *, const Jupiter::ReadableString &)
{ {
return; return;
@ -150,7 +165,7 @@ void RenX::Plugin::RenX_OnDie(Server *, const Jupiter::ReadableString &, const T
return; return;
} }
void RenX::Plugin::RenX_OnDestroy(Server *, const RenX::PlayerInfo *, const Jupiter::ReadableString &, const Jupiter::ReadableString &, ObjectType) void RenX::Plugin::RenX_OnDestroy(Server *, const RenX::PlayerInfo *, const Jupiter::ReadableString &, const TeamType &, const Jupiter::ReadableString &, ObjectType)
{ {
return; return;
} }
@ -170,6 +185,76 @@ void RenX::Plugin::RenX_OnNeutralize(Server *, const PlayerInfo *, const Jupiter
return; return;
} }
void RenX::Plugin::RenX_OnCharacterPurchase(Server *, const PlayerInfo *, const Jupiter::ReadableString &)
{
return;
}
void RenX::Plugin::RenX_OnItemPurchase(Server *, const PlayerInfo *, const Jupiter::ReadableString &)
{
return;
}
void RenX::Plugin::RenX_OnWeaponPurchase(Server *, const PlayerInfo *, const Jupiter::ReadableString &)
{
return;
}
void RenX::Plugin::RenX_OnRefillPurchase(Server *, const PlayerInfo *)
{
return;
}
void RenX::Plugin::RenX_OnVehiclePurchase(Server *, const PlayerInfo *, const Jupiter::ReadableString &)
{
return;
}
void RenX::Plugin::RenX_OnVehicleSpawn(Server *, const TeamType &, const Jupiter::ReadableString &)
{
return;
}
void RenX::Plugin::RenX_OnSpawn(Server *, const PlayerInfo *, const Jupiter::ReadableString &)
{
return;
}
void RenX::Plugin::RenX_OnBotJoin(Server *, const PlayerInfo *)
{
return;
}
void RenX::Plugin::RenX_OnVehicleCrate(Server *, const PlayerInfo *, const Jupiter::ReadableString &)
{
return;
}
void RenX::Plugin::RenX_OnDeathCrate(Server *, const PlayerInfo *)
{
return;
}
void RenX::Plugin::RenX_OnMoneyCrate(Server *, const PlayerInfo *, int)
{
return;
}
void RenX::Plugin::RenX_OnCharacterCrate(Server *, const PlayerInfo *, const Jupiter::ReadableString &)
{
return;
}
void RenX::Plugin::RenX_OnSpyCrate(Server *, const PlayerInfo *, const Jupiter::ReadableString &)
{
return;
}
void RenX::Plugin::RenX_OnRefillCrate(Server *, const PlayerInfo *)
{
return;
}
void RenX::Plugin::RenX_OnSteal(Server *, const PlayerInfo *, const Jupiter::ReadableString &) void RenX::Plugin::RenX_OnSteal(Server *, const PlayerInfo *, const Jupiter::ReadableString &)
{ {
return; return;
@ -180,6 +265,11 @@ void RenX::Plugin::RenX_OnSteal(Server *, const PlayerInfo *, const Jupiter::Rea
return; return;
} }
void RenX::Plugin::RenX_OnDonate(Server *, const PlayerInfo *, const PlayerInfo *, double)
{
return;
}
void RenX::Plugin::RenX_OnGameOver(Server *, RenX::WinType, const TeamType &, int, int) void RenX::Plugin::RenX_OnGameOver(Server *, RenX::WinType, const TeamType &, int, int)
{ {
return; return;
@ -285,7 +375,7 @@ void RenX::Plugin::RenX_OnVoteCall(Server *, const TeamType &, const Jupiter::Re
return; return;
} }
void RenX::Plugin::RenX_OnVoteOver(Server *server, const TeamType &, const Jupiter::ReadableString &, bool, int, int) void RenX::Plugin::RenX_OnVoteOver(Server *, const TeamType &, const Jupiter::ReadableString &, bool, int, int)
{ {
return; return;
} }
@ -315,53 +405,32 @@ void RenX::Plugin::RenX_OnMap(Server *, const Jupiter::ReadableString &)
return; return;
} }
void RenX::Plugin::RenX_OnDemoRecord(Server *server, const PlayerInfo *) void RenX::Plugin::RenX_OnDemoRecord(Server *, const PlayerInfo *)
{
return;
}
void RenX::Plugin::RenX_OnDemoRecord(Server *server, const Jupiter::ReadableString &)
{ {
return; return;
} }
void RenX::Plugin::RenX_OnDemoRecord(Server *, const Jupiter::ReadableString &)
void RenX::Plugin::RenX_OnDemo(Server *server, const Jupiter::ReadableString &)
{ {
return; return;
} }
void RenX::Plugin::RenX_OnLog(Server *, const Jupiter::ReadableString &) void RenX::Plugin::RenX_OnDemoRecordStop(Server *)
{ {
return; return;
} }
void RenX::Plugin::RenX_XOnVersion(Server *, unsigned int) void RenX::Plugin::RenX_OnDemo(Server *, const Jupiter::ReadableString &)
{ {
return; return;
} }
void RenX::Plugin::RenX_OnGrantCharacter(Server *, const PlayerInfo *, const Jupiter::ReadableString &) void RenX::Plugin::RenX_OnLog(Server *, const Jupiter::ReadableString &)
{
return;
}
void RenX::Plugin::RenX_OnGrantWeapon(Server *, const PlayerInfo *, const Jupiter::ReadableString &)
{
return;
}
void RenX::Plugin::RenX_OnSpawnVehicle(Server *, const PlayerInfo *, const Jupiter::ReadableString &)
{
return;
}
void RenX::Plugin::RenX_OnSpawnVehicleNoOwner(Server *, const TeamType &, const Jupiter::ReadableString &)
{ {
return; return;
} }
void RenX::Plugin::RenX_OnMinePlace(Server *, const PlayerInfo *, const Jupiter::ReadableString &) void RenX::Plugin::RenX_XOnVersion(Server *, unsigned int)
{ {
return; return;
} }

26
RenX.Core/RenX_Plugin.h

@ -65,17 +65,35 @@ namespace RenX
/** Game type logs */ /** Game type logs */
virtual void RenX_OnDeploy(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &object); virtual void RenX_OnDeploy(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &object);
virtual void RenX_OnDisarm(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &object); virtual void RenX_OnDisarm(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &object);
virtual void RenX_OnDisarm(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &object, const PlayerInfo *victim);
virtual void RenX_OnExplode(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &object);
virtual void RenX_OnExplode(Server *server, const Jupiter::ReadableString &object);
virtual void RenX_OnSuicide(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &damageType); virtual void RenX_OnSuicide(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &damageType);
virtual void RenX_OnKill(Server *server, const PlayerInfo *player, const PlayerInfo *victim, const Jupiter::ReadableString &damageType); virtual void RenX_OnKill(Server *server, const PlayerInfo *player, const PlayerInfo *victim, const Jupiter::ReadableString &damageType);
virtual void RenX_OnKill(Server *server, const Jupiter::ReadableString &killer, const TeamType &killerTeam, const PlayerInfo *victim, const Jupiter::ReadableString &damageType); virtual void RenX_OnKill(Server *server, const Jupiter::ReadableString &killer, const TeamType &killerTeam, const PlayerInfo *victim, const Jupiter::ReadableString &damageType);
virtual void RenX_OnDie(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &damageType); virtual void RenX_OnDie(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &damageType);
virtual void RenX_OnDie(Server *server, const Jupiter::ReadableString &object, const TeamType &objectTeam, const Jupiter::ReadableString &damageType); virtual void RenX_OnDie(Server *server, const Jupiter::ReadableString &object, const TeamType &objectTeam, const Jupiter::ReadableString &damageType);
virtual void RenX_OnDestroy(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &objectName, const Jupiter::ReadableString &damageType, ObjectType type); virtual void RenX_OnDestroy(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &objectName, const TeamType &victimTeam, const Jupiter::ReadableString &damageType, ObjectType type);
virtual void RenX_OnDestroy(Server *server, const Jupiter::ReadableString &killer, const TeamType &killerTeam, const Jupiter::ReadableString &objectName, const TeamType &objectTeam, const Jupiter::ReadableString &damageType, ObjectType type); virtual void RenX_OnDestroy(Server *server, const Jupiter::ReadableString &killer, const TeamType &killerTeam, const Jupiter::ReadableString &objectName, const TeamType &objectTeam, const Jupiter::ReadableString &damageType, ObjectType type);
virtual void RenX_OnCapture(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &building, const TeamType &oldTeam); virtual void RenX_OnCapture(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &building, const TeamType &oldTeam);
virtual void RenX_OnNeutralize(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &building, const TeamType &oldTeam); virtual void RenX_OnNeutralize(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &building, const TeamType &oldTeam);
virtual void RenX_OnCharacterPurchase(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &character);
virtual void RenX_OnItemPurchase(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &item);
virtual void RenX_OnWeaponPurchase(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &weapon);
virtual void RenX_OnRefillPurchase(Server *server, const PlayerInfo *player);
virtual void RenX_OnVehiclePurchase(Server *server, const PlayerInfo *owner, const Jupiter::ReadableString &vehicle);
virtual void RenX_OnVehicleSpawn(Server *server, const TeamType &team, const Jupiter::ReadableString &vehicle);
virtual void RenX_OnSpawn(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &character);
virtual void RenX_OnBotJoin(Server *server, const PlayerInfo *player);
virtual void RenX_OnVehicleCrate(Server *server, const PlayerInfo *owner, const Jupiter::ReadableString &vehicle);
virtual void RenX_OnDeathCrate(Server *server, const PlayerInfo *player);
virtual void RenX_OnMoneyCrate(Server *server, const PlayerInfo *player, int amount);
virtual void RenX_OnCharacterCrate(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &character);
virtual void RenX_OnSpyCrate(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &character);
virtual void RenX_OnRefillCrate(Server *server, const PlayerInfo *player);
virtual void RenX_OnSteal(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &vehicle); virtual void RenX_OnSteal(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &vehicle);
virtual void RenX_OnSteal(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &vehicle, const PlayerInfo *victim); virtual void RenX_OnSteal(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &vehicle, const PlayerInfo *victim);
virtual void RenX_OnDonate(Server *server, const PlayerInfo *donor, const PlayerInfo *player, double amount);
virtual void RenX_OnGameOver(Server *server, WinType winType, const TeamType &team, int gScore, int nScore); virtual void RenX_OnGameOver(Server *server, WinType winType, const TeamType &team, int gScore, int nScore);
virtual void RenX_OnGame(Server *server, const Jupiter::ReadableString &raw); virtual void RenX_OnGame(Server *server, const Jupiter::ReadableString &raw);
@ -115,6 +133,7 @@ namespace RenX
/** Demo Type Logs */ /** Demo Type Logs */
virtual void RenX_OnDemoRecord(Server *server, const PlayerInfo *player); virtual void RenX_OnDemoRecord(Server *server, const PlayerInfo *player);
virtual void RenX_OnDemoRecord(Server *server, const Jupiter::ReadableString &user); // Note: user is currently always empty. virtual void RenX_OnDemoRecord(Server *server, const Jupiter::ReadableString &user); // Note: user is currently always empty.
virtual void RenX_OnDemoRecordStop(Server *server);
virtual void RenX_OnDemo(Server *server, const Jupiter::ReadableString &raw); virtual void RenX_OnDemo(Server *server, const Jupiter::ReadableString &raw);
/** Other Logs */ /** Other Logs */
@ -122,11 +141,6 @@ namespace RenX
/** eXtended RCON */ /** eXtended RCON */
virtual void RenX_XOnVersion(Server *server, unsigned int version); virtual void RenX_XOnVersion(Server *server, unsigned int version);
virtual void RenX_OnGrantCharacter(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &character);
virtual void RenX_OnGrantWeapon(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &weapon);
virtual void RenX_OnSpawnVehicle(Server *server, const PlayerInfo *owner, const Jupiter::ReadableString &vehicle);
virtual void RenX_OnSpawnVehicleNoOwner(Server *server, const TeamType &team, const Jupiter::ReadableString &vehicle);
virtual void RenX_OnMinePlace(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &mine);
virtual void RenX_XOnOther(Server *server, const Jupiter::ReadableString &raw); virtual void RenX_XOnOther(Server *server, const Jupiter::ReadableString &raw);
/** Command type */ /** Command type */

723
RenX.Core/RenX_Server.cpp

File diff suppressed because it is too large

80
RenX.Core/RenX_Server.h

@ -127,6 +127,13 @@ namespace RenX
*/ */
bool isFirstAction() const; bool isFirstAction() const;
/**
* @brief Checks if the server travel mode is seamless.
*
* @return True if the server is using seamless travel, false otherwise.
*/
bool isSeamless() const;
/** /**
* @brief Checks if a channel type is a public channel type. * @brief Checks if a channel type is a public channel type.
* *
@ -285,6 +292,69 @@ namespace RenX
*/ */
bool updateClientList(); bool updateClientList();
/**
* @brief Forces the current game to end, if the server supports it.
*
* @return True on success, false otherwise.
*/
bool gameover();
/**
* @brief Forces the current game to end and changes the map, if the server supports it.
*
* @return True on success, false otherwise.
*/
bool setMap(const Jupiter::ReadableString &map);
/**
* @brief Forces the current game to end, if the server supports it.
*
* @return True on success, false otherwise.
*/
bool loadMutator(const Jupiter::ReadableString &mutator);
/**
* @brief Forces the current game to end, if the server supports it.
*
* @return True on success, false otherwise.
*/
bool unloadMutator(const Jupiter::ReadableString &mutator);
/**
* @brief Forcefully ends the current vote, if the server supports it.
*
* @return True on success, false otherwise.
*/
bool cancelVote(const RenX::TeamType team);
/**
* @brief Swaps the teams, if the server supports it.
*
* @return True on success, false otherwise.
*/
bool swapTeams();
/**
* @brief Starts a demo recording, if the server supports it.
*
* @return True on success, false otherwise.
*/
bool recordDemo();
/**
* @brief Mutes a player from the game chat, if the server supports it.
*
* @return True on success, false otherwise.
*/
bool mute(const RenX::PlayerInfo *player);
/**
* @brief Allows a player to use the game chat, if the server supports it.
*
* @return True on success, false otherwise.
*/
bool unmute(const RenX::PlayerInfo *player);
/** /**
* @brief Gives a player additional credits, if the server supports it. * @brief Gives a player additional credits, if the server supports it.
* *
@ -307,19 +377,19 @@ namespace RenX
* @brief Forces a player to change teams, if the server supports it. * @brief Forces a player to change teams, if the server supports it.
* *
* @param id ID of the player to give credits to * @param id ID of the player to give credits to
* @param options Options to pass to the command * @param resetCredits True to reset the player's credits, false otherwise.
* @return True on success, false otherwise. * @return True on success, false otherwise.
*/ */
bool changeTeam(int id, unsigned char options = 0x03); bool changeTeam(int id, bool resetCredits = true);
/** /**
* @brief Forces a player to change teams, if the server supports it. * @brief Forces a player to change teams, if the server supports it.
* *
* @param player Player to change teams * @param player Player to change teams
* @param options Options to pass to the command * @param resetCredits True to reset the player's credits, false otherwise.
* @return True on success, false otherwise. * @return True on success, false otherwise.
*/ */
bool changeTeam(RenX::PlayerInfo *player, unsigned char options = 0x03); bool changeTeam(RenX::PlayerInfo *player, bool resetCredits = true);
/** /**
* @brief Forces a player to change teams, if the server supports it. * @brief Forces a player to change teams, if the server supports it.
@ -603,6 +673,7 @@ namespace RenX
/** Tracking variables */ /** Tracking variables */
bool connected = false; bool connected = false;
bool seamless = false;
bool needsCList = false; bool needsCList = false;
bool silenceParts = false; bool silenceParts = false;
bool silenceJoins = false; bool silenceJoins = false;
@ -615,6 +686,7 @@ namespace RenX
unsigned int xRconRevision = 0; unsigned int xRconRevision = 0;
time_t lastAttempt = 0; time_t lastAttempt = 0;
Jupiter::String lastLine; Jupiter::String lastLine;
Jupiter::StringS commandListFormat;
Jupiter::StringS gameVersion; Jupiter::StringS gameVersion;
Jupiter::ArrayList<RenX::GameCommand> commands; Jupiter::ArrayList<RenX::GameCommand> commands;

13
RenX.Core/RenX_ServerProfile.cpp

@ -25,7 +25,7 @@ struct BaseProfile : RenX::ServerProfile
privateMessages = true; privateMessages = true;
disconnectOnGameOver = false; disconnectOnGameOver = false;
pidbug = false; pidbug = false;
mustSanitize = true; mustSanitize = false;
tieFormat = 1; tieFormat = 1;
} }
} _baseProfile; } _baseProfile;
@ -37,6 +37,7 @@ struct OpenBeta1Profile : BaseProfile
{ {
supported = false; supported = false;
privateMessages = false; privateMessages = false;
mustSanitize = true;
} }
} _openBeta1Profile; } _openBeta1Profile;
const RenX::ServerProfile *RenX::openBeta1Profile = &_openBeta1Profile; const RenX::ServerProfile *RenX::openBeta1Profile = &_openBeta1Profile;
@ -48,6 +49,7 @@ struct OpenBeta2Profile : BaseProfile
privateMessages = false; privateMessages = false;
pidbug = true; pidbug = true;
tieFormat = 0; tieFormat = 0;
mustSanitize = true;
} }
} _openBeta2Profile; } _openBeta2Profile;
const RenX::ServerProfile *RenX::openBeta2Profile = &_openBeta2Profile; const RenX::ServerProfile *RenX::openBeta2Profile = &_openBeta2Profile;
@ -57,6 +59,15 @@ struct OpenBeta3Profile : BaseProfile
OpenBeta3Profile() OpenBeta3Profile()
{ {
disconnectOnGameOver = true; disconnectOnGameOver = true;
mustSanitize = true;
} }
} _openBeta3Profile; } _openBeta3Profile;
const RenX::ServerProfile *RenX::openBeta3Profile = &_openBeta3Profile; const RenX::ServerProfile *RenX::openBeta3Profile = &_openBeta3Profile;
struct OpenBeta4Profile : BaseProfile
{
OpenBeta4Profile()
{
}
} _openBeta4Profile;
const RenX::ServerProfile *RenX::openBeta4Profile = &_openBeta4Profile;

1
RenX.Core/RenX_ServerProfile.h

@ -44,6 +44,7 @@ namespace RenX
RENX_API extern const ServerProfile *openBeta1Profile; /** Open Beta 1 server profile */ RENX_API extern const ServerProfile *openBeta1Profile; /** Open Beta 1 server profile */
RENX_API extern const ServerProfile *openBeta2Profile; /** Open Beta 2 server profile */ RENX_API extern const ServerProfile *openBeta2Profile; /** Open Beta 2 server profile */
RENX_API extern const ServerProfile *openBeta3Profile; /** Open Beta 3 server profile */ RENX_API extern const ServerProfile *openBeta3Profile; /** Open Beta 3 server profile */
RENX_API extern const ServerProfile *openBeta4Profile; /** Open Beta 4 server profile */
} }

612
RenX.Logging/RenX_Logging.cpp

@ -37,14 +37,32 @@ void RenX_LoggingPlugin::init()
RenX_LoggingPlugin::hostPagePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("HostPagePublic"), false); RenX_LoggingPlugin::hostPagePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("HostPagePublic"), false);
RenX_LoggingPlugin::otherChatPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("OtherChatPublic"), false); RenX_LoggingPlugin::otherChatPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("OtherChatPublic"), false);
RenX_LoggingPlugin::deployPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("DeployPublic"), true); RenX_LoggingPlugin::deployPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("DeployPublic"), true);
RenX_LoggingPlugin::mineDeployPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("MineDeployPublic"), false);
RenX_LoggingPlugin::disarmPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("DisarmPublic"), true); RenX_LoggingPlugin::disarmPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("DisarmPublic"), true);
RenX_LoggingPlugin::mineDisarmPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("MineDisarmPublic"), false);
RenX_LoggingPlugin::explodePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("ExplodePublic"), false);
RenX_LoggingPlugin::suicidePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("SuicidePublic"), true); RenX_LoggingPlugin::suicidePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("SuicidePublic"), true);
RenX_LoggingPlugin::killPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("KillPublic"), true); RenX_LoggingPlugin::killPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("KillPublic"), true);
RenX_LoggingPlugin::diePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("DiePublic"), true); RenX_LoggingPlugin::diePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("DiePublic"), true);
RenX_LoggingPlugin::destroyPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("DestroyPublic"), true); RenX_LoggingPlugin::destroyPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("DestroyPublic"), true);
RenX_LoggingPlugin::capturePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("CapturePublic"), true); RenX_LoggingPlugin::capturePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("CapturePublic"), true);
RenX_LoggingPlugin::neutralizePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("NeutralizePublic"), true); RenX_LoggingPlugin::neutralizePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("NeutralizePublic"), true);
RenX_LoggingPlugin::characterPurchasePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("CharacterPurchasePublic"), false);
RenX_LoggingPlugin::itemPurchasePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("ItemPurchasePublic"), false);
RenX_LoggingPlugin::weaponPurchasePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("WeaponPurchasePublic"), false);
RenX_LoggingPlugin::refillPurchasePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("RefillPurchasePublic"), false);
RenX_LoggingPlugin::vehiclePurchasePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("VehiclePurchasePublic"), false);
RenX_LoggingPlugin::vehicleSpawnPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("VehicleSpawnPublic"), true);
RenX_LoggingPlugin::spawnPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("SpawnPublic"), true);
RenX_LoggingPlugin::botJoinPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("BotJoinPublic"), true);
RenX_LoggingPlugin::vehicleCratePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("VehicleCratePublic"), false);
RenX_LoggingPlugin::deathCratePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("DeathCratePublic"), false);
RenX_LoggingPlugin::moneyCratePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("MoneyCratePublic"), false);
RenX_LoggingPlugin::characterCratePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("CharacterCratePublic"), false);
RenX_LoggingPlugin::spyCratePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("SpyCratePublic"), false);
RenX_LoggingPlugin::refillCratePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("RefillCratePublic"), false);
RenX_LoggingPlugin::stealPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("StealPublic"), true); RenX_LoggingPlugin::stealPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("StealPublic"), true);
RenX_LoggingPlugin::donatePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("DonatePublic"), true);
RenX_LoggingPlugin::gamePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("GamePublic"), true); RenX_LoggingPlugin::gamePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("GamePublic"), true);
RenX_LoggingPlugin::gameOverPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("GameOverPublic"), true); RenX_LoggingPlugin::gameOverPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("GameOverPublic"), true);
RenX_LoggingPlugin::executePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("ExecutePublic"), false); RenX_LoggingPlugin::executePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("ExecutePublic"), false);
@ -62,13 +80,10 @@ void RenX_LoggingPlugin::init()
RenX_LoggingPlugin::mapLoadPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("MapLoadPublic"), true); RenX_LoggingPlugin::mapLoadPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("MapLoadPublic"), true);
RenX_LoggingPlugin::mapPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("MapPublic"), false); RenX_LoggingPlugin::mapPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("MapPublic"), false);
RenX_LoggingPlugin::demoRecordPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("DemoRecordPublic"), true); RenX_LoggingPlugin::demoRecordPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("DemoRecordPublic"), true);
RenX_LoggingPlugin::demoRecordStopPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("DemoRecordStopPublic"), true);
RenX_LoggingPlugin::demoPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("DemoPublic"), false); RenX_LoggingPlugin::demoPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("DemoPublic"), false);
RenX_LoggingPlugin::logPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("LogPublic"), false); RenX_LoggingPlugin::logPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("LogPublic"), false);
RenX_LoggingPlugin::xVersionPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("XVersionPublic"), true); RenX_LoggingPlugin::xVersionPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("XVersionPublic"), true);
RenX_LoggingPlugin::grantCharacterPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("GrantCharacterPublic"), false);
RenX_LoggingPlugin::spawnVehiclePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("SpawnVehiclePublic"), false);
RenX_LoggingPlugin::spawnVehicleNoOwnerPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("SpawnVehicleNoOwnerPublic"), true);
RenX_LoggingPlugin::minePlacePublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("MinePlacePublic"), false);
RenX_LoggingPlugin::xOtherPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("XOtherPublic"), false); RenX_LoggingPlugin::xOtherPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("XOtherPublic"), false);
RenX_LoggingPlugin::commandPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("CommandPublic"), false); RenX_LoggingPlugin::commandPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("CommandPublic"), false);
RenX_LoggingPlugin::errorPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("ErrorPublic"), false); RenX_LoggingPlugin::errorPublic = Jupiter::IRC::Client::Config->getBool(RenX_LoggingPlugin::getName(), STRING_LITERAL_AS_REFERENCE("ErrorPublic"), false);
@ -117,16 +132,34 @@ void RenX_LoggingPlugin::init()
Jupiter::StringS::Format(IRCCOLOR "06[Other Chat]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); Jupiter::StringS::Format(IRCCOLOR "06[Other Chat]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
RenX_LoggingPlugin::deployFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("DeployFormat"), RenX_LoggingPlugin::deployFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("DeployFormat"),
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCBOLD " deployed a " IRCBOLD "%.*s" IRCBOLD, RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr())); 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 = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("MineDeployFormat"),
RenX_LoggingPlugin::deployFmt);
RenX_LoggingPlugin::disarmFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("DisarmFormat"), RenX_LoggingPlugin::disarmFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("DisarmFormat"),
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCBOLD " disarmed %.*s'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::mineDisarmFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("MineDisarmFormat"),
RenX_LoggingPlugin::disarmFmt);
RenX_LoggingPlugin::disarmNoOwnerFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("DisarmNoOwnerFormat"),
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())); 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 = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("MineDisarmNoOwnerFormat"),
RenX_LoggingPlugin::disarmNoOwnerFmt);
RenX_LoggingPlugin::explodeFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("ExplodeFormat"),
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 = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("ExplodeMoOwnerFormat"),
Jupiter::StringS::Format("A " IRCCOLOR "07%.*s" IRCCOLOR " detonated.", RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr()));
RenX_LoggingPlugin::suicideFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("SuicideFormat"), RenX_LoggingPlugin::suicideFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("SuicideFormat"),
Jupiter::StringS::Format("%.*s" IRCCOLOR " suicided (death by " IRCCOLOR "12%.*s" IRCCOLOR ").", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr())); 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 = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("KillFormat"), RenX_LoggingPlugin::killFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("KillFormat"),
Jupiter::StringS::Format("%.*s" IRCCOLOR " killed %.*s" IRCCOLOR " (" IRCCOLOR "12%.*s" IRCCOLOR ").", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->victimNameTag.size(), RenX::tags->victimNameTag.ptr(), RenX::tags->weaponTag.size(), RenX::tags->weaponTag.ptr())); Jupiter::StringS::Format("%.*s" IRCCOLOR " killed %.*s" IRCCOLOR " (" IRCCOLOR "%.*s%.*s/%.*s" IRCCOLOR "vs" IRCCOLOR "%.*s%.*s" ").", 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 = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("KillFormat2"), RenX_LoggingPlugin::killFmt2 = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("KillFormat2"),
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())); 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()));
@ -156,16 +189,61 @@ void RenX_LoggingPlugin::init()
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())); 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 = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("CaptureFormat"), RenX_LoggingPlugin::captureFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("CaptureFormat"),
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCBOLD " captured the " IRCBOLD IRCCOLOR "%.*s%.*s" IRCBOLD ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr())); 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 = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("NeutralizeFormat"), RenX_LoggingPlugin::neutralizeFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("NeutralizeFormat"),
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCBOLD " neutralized the " IRCBOLD IRCCOLOR "%.*s%.*s" IRCBOLD ".", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr(), RenX::tags->victimTeamColorTag.size(), RenX::tags->victimTeamColorTag.ptr())); 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 = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("CharacterPurchaseFormat"),
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 = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("ItemPurchaseFormat"),
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 = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("WeaponPurchaseFormat"),
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 = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("RefillPurchaseFormat"),
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 = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("VehiclePurchaseFormat"),
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 = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("VehicleSpawnFormat"),
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 = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("SpawnFormat"),
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 = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("BotJoinFormat"),
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " online.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr()));
RenX_LoggingPlugin::vehicleCrateFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("VehicleCrateFormat"),
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " picked up a %.*s vehicle crate.", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr()));
RenX_LoggingPlugin::deathCrateFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("DeathCrateFormat"),
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 = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("MoneyCrateFormat"),
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 = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("CharacterCrateFormat"),
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 = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("SpyCrateFormat"),
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 = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("RefillCrateFormat"),
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::stealFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("StealFormat"), RenX_LoggingPlugin::stealFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("StealFormat"),
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCBOLD IRCCOLOR " 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())); 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 = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("StealNoOwnerFormat"), RenX_LoggingPlugin::stealNoOwnerFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("StealNoOwnerFormat"),
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCBOLD IRCCOLOR " stole a " IRCBOLD IRCCOLOR "12%.*s" IRCBOLD "!", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr())); 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 = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("StealFormat"),
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 = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("GameOverFormat"), RenX_LoggingPlugin::gameOverFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("GameOverFormat"),
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())); 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()));
@ -233,6 +311,9 @@ void RenX_LoggingPlugin::init()
RenX_LoggingPlugin::rconDemoRecordFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("RCONDemoRecordFormat"), RenX_LoggingPlugin::rconDemoRecordFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("RCONDemoRecordFormat"),
STRING_LITERAL_AS_REFERENCE(IRCCOLOR "07A demo recording has started.")); STRING_LITERAL_AS_REFERENCE(IRCCOLOR "07A demo recording has started."));
RenX_LoggingPlugin::demoRecordStopFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("DemoRecordStopFormat"),
STRING_LITERAL_AS_REFERENCE(IRCCOLOR "07The demo recording has stopped."));
RenX_LoggingPlugin::demoFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("DemoFormat"), RenX_LoggingPlugin::demoFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("DemoFormat"),
Jupiter::StringS::Format(IRCCOLOR "06[Demo]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); Jupiter::StringS::Format(IRCCOLOR "06[Demo]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
@ -242,18 +323,6 @@ void RenX_LoggingPlugin::init()
RenX_LoggingPlugin::xVersionFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("XVersionFormat"), RenX_LoggingPlugin::xVersionFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("XVersionFormat"),
Jupiter::StringS::Format(IRCCOLOR "03This server is using eXtended RCON version %.*s", RenX::tags->xRconVersionTag.size(), RenX::tags->xRconVersionTag.ptr())); Jupiter::StringS::Format(IRCCOLOR "03This server is using eXtended RCON version %.*s", RenX::tags->xRconVersionTag.size(), RenX::tags->xRconVersionTag.ptr()));
RenX_LoggingPlugin::grantCharacterFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("GrantCharacterFormat"),
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " is now a " IRCBOLD 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::spawnVehicleFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("SpawnVehicleFormat"),
Jupiter::StringS::Format(IRCBOLD "%.*s" IRCCOLOR IRCBOLD " purchased a " IRCBOLD IRCCOLOR "%.*s%.*s", 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::spawnVehicleNoOwnerFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("SpawnVehicleNoOwnerFormat"),
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::minePlaceFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("MinePlaceFormat"),
Jupiter::StringS::Format(IRCCOLOR "07[C4] " IRCCOLOR IRCBOLD "%.*s" IRCCOLOR IRCBOLD " placed a " IRCBOLD IRCCOLOR "12%.*s", RenX::tags->nameTag.size(), RenX::tags->nameTag.ptr(), RenX::tags->objectTag.size(), RenX::tags->objectTag.ptr()));
RenX_LoggingPlugin::xOtherFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("XOtherFormat"), RenX_LoggingPlugin::xOtherFmt = Jupiter::IRC::Client::Config->get(this->getName(), STRING_LITERAL_AS_REFERENCE("XOtherFormat"),
Jupiter::StringS::Format(IRCCOLOR "06[XOther]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr())); Jupiter::StringS::Format(IRCCOLOR "06[XOther]" IRCCOLOR " %.*s", RenX::tags->messageTag.size(), RenX::tags->messageTag.ptr()));
@ -284,7 +353,13 @@ void RenX_LoggingPlugin::init()
RenX::sanitizeTags(teamChatFmt); RenX::sanitizeTags(teamChatFmt);
RenX::sanitizeTags(otherChatFmt); RenX::sanitizeTags(otherChatFmt);
RenX::sanitizeTags(deployFmt); RenX::sanitizeTags(deployFmt);
RenX::sanitizeTags(mineDeployFmt);
RenX::sanitizeTags(disarmFmt); RenX::sanitizeTags(disarmFmt);
RenX::sanitizeTags(mineDisarmFmt);
RenX::sanitizeTags(disarmNoOwnerFmt);
RenX::sanitizeTags(mineDisarmNoOwnerFmt);
RenX::sanitizeTags(explodeFmt);
RenX::sanitizeTags(explodeNoOwnerFmt);
RenX::sanitizeTags(suicideFmt); RenX::sanitizeTags(suicideFmt);
RenX::sanitizeTags(dieFmt); RenX::sanitizeTags(dieFmt);
RenX::sanitizeTags(dieFmt2); RenX::sanitizeTags(dieFmt2);
@ -298,8 +373,23 @@ void RenX_LoggingPlugin::init()
RenX::sanitizeTags(destroyVehicleFmt2); RenX::sanitizeTags(destroyVehicleFmt2);
RenX::sanitizeTags(captureFmt); RenX::sanitizeTags(captureFmt);
RenX::sanitizeTags(neutralizeFmt); RenX::sanitizeTags(neutralizeFmt);
RenX::sanitizeTags(characterPurchaseFmt);
RenX::sanitizeTags(itemPurchaseFmt);
RenX::sanitizeTags(weaponPurchaseFmt);
RenX::sanitizeTags(refillPurchaseFmt);
RenX::sanitizeTags(vehiclePurchaseFmt);
RenX::sanitizeTags(vehicleSpawnFmt);
RenX::sanitizeTags(spawnFmt);
RenX::sanitizeTags(botJoinFmt);
RenX::sanitizeTags(vehicleCrateFmt);
RenX::sanitizeTags(deathCrateFmt);
RenX::sanitizeTags(moneyCrateFmt);
RenX::sanitizeTags(characterCrateFmt);
RenX::sanitizeTags(spyCrateFmt);
RenX::sanitizeTags(refillCrateFmt);
RenX::sanitizeTags(stealFmt); RenX::sanitizeTags(stealFmt);
RenX::sanitizeTags(stealNoOwnerFmt); RenX::sanitizeTags(stealNoOwnerFmt);
RenX::sanitizeTags(donateFmt);
RenX::sanitizeTags(gameOverFmt); RenX::sanitizeTags(gameOverFmt);
RenX::sanitizeTags(gameOverTieFmt); RenX::sanitizeTags(gameOverTieFmt);
RenX::sanitizeTags(gameOverTieNoWinFmt); RenX::sanitizeTags(gameOverTieNoWinFmt);
@ -325,13 +415,10 @@ void RenX_LoggingPlugin::init()
RenX::sanitizeTags(mapFmt); RenX::sanitizeTags(mapFmt);
RenX::sanitizeTags(demoRecordFmt); RenX::sanitizeTags(demoRecordFmt);
RenX::sanitizeTags(rconDemoRecordFmt); RenX::sanitizeTags(rconDemoRecordFmt);
RenX::sanitizeTags(demoRecordStopFmt);
RenX::sanitizeTags(demoFmt); RenX::sanitizeTags(demoFmt);
RenX::sanitizeTags(logFmt); RenX::sanitizeTags(logFmt);
RenX::sanitizeTags(xVersionFmt); RenX::sanitizeTags(xVersionFmt);
RenX::sanitizeTags(grantCharacterFmt);
RenX::sanitizeTags(spawnVehicleFmt);
RenX::sanitizeTags(spawnVehicleNoOwnerFmt);
RenX::sanitizeTags(minePlaceFmt);
RenX::sanitizeTags(xOtherFmt); RenX::sanitizeTags(xOtherFmt);
RenX::sanitizeTags(commandFmt); RenX::sanitizeTags(commandFmt);
RenX::sanitizeTags(errorFmt); RenX::sanitizeTags(errorFmt);
@ -536,12 +623,25 @@ void RenX_LoggingPlugin::RenX_OnOtherChat(RenX::Server *server, const Jupiter::R
void RenX_LoggingPlugin::RenX_OnDeploy(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &object) void RenX_LoggingPlugin::RenX_OnDeploy(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &object)
{ {
logFuncType func; logFuncType func;
if (RenX_LoggingPlugin::deployPublic) Jupiter::String msg;
func = &RenX::Server::sendLogChan; if (object.match("*Beacon"))
{
if (RenX_LoggingPlugin::deployPublic)
func = &RenX::Server::sendLogChan;
else
func = &RenX::Server::sendAdmChan;
msg = this->deployFmt;
}
else else
func = &RenX::Server::sendAdmChan; {
if (RenX_LoggingPlugin::mineDeployPublic)
Jupiter::String msg = this->deployFmt; func = &RenX::Server::sendLogChan;
else
func = &RenX::Server::sendAdmChan;
msg = this->mineDeployFmt;
}
if (msg.isEmpty() == false) if (msg.isEmpty() == false)
{ {
RenX::processTags(msg, server, player); RenX::processTags(msg, server, player);
@ -550,18 +650,99 @@ void RenX_LoggingPlugin::RenX_OnDeploy(RenX::Server *server, const RenX::PlayerI
} }
} }
void RenX_LoggingPlugin::RenX_OnDisarm(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &object, const RenX::PlayerInfo *victim)
{
logFuncType func;
Jupiter::String msg;
if (object.match("*Beacon"))
{
if (RenX_LoggingPlugin::disarmPublic)
func = &RenX::Server::sendLogChan;
else
func = &RenX::Server::sendAdmChan;
msg = this->disarmFmt;
}
else
{
if (RenX_LoggingPlugin::mineDisarmPublic)
func = &RenX::Server::sendLogChan;
else
func = &RenX::Server::sendAdmChan;
msg = this->mineDisarmFmt;
}
if (msg.isEmpty() == false)
{
RenX::processTags(msg, server, player, victim);
msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, RenX::translateName(object));
(server->*func)(msg);
}
}
void RenX_LoggingPlugin::RenX_OnDisarm(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &object) void RenX_LoggingPlugin::RenX_OnDisarm(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &object)
{ {
logFuncType func; logFuncType func;
if (RenX_LoggingPlugin::disarmPublic) Jupiter::String msg;
if (object.match("*Beacon"))
{
if (RenX_LoggingPlugin::disarmPublic)
func = &RenX::Server::sendLogChan;
else
func = &RenX::Server::sendAdmChan;
msg = this->disarmNoOwnerFmt;
}
else
{
if (RenX_LoggingPlugin::mineDisarmPublic)
func = &RenX::Server::sendLogChan;
else
func = &RenX::Server::sendAdmChan;
msg = this->mineDisarmNoOwnerFmt;
}
if (msg.isEmpty() == false)
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, RenX::translateName(object));
(server->*func)(msg);
}
}
void RenX_LoggingPlugin::RenX_OnExplode(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &object)
{
logFuncType func;
if (RenX_LoggingPlugin::explodePublic)
func = &RenX::Server::sendLogChan; func = &RenX::Server::sendLogChan;
else else
func = &RenX::Server::sendAdmChan; func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->disarmFmt; Jupiter::String msg = this->explodeFmt;
if (msg.isEmpty() == false) if (msg.isEmpty() == false)
{ {
RenX::processTags(msg, server, player); RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_WEAPON_TAG, RenX::translateName(object));
msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, RenX::translateName(object));
(server->*func)(msg);
}
}
void RenX_LoggingPlugin::RenX_OnExplode(RenX::Server *server, const Jupiter::ReadableString &object)
{
logFuncType func;
if (RenX_LoggingPlugin::explodePublic)
func = &RenX::Server::sendLogChan;
else
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->explodeNoOwnerFmt;
if (msg.isEmpty() == false)
{
RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_WEAPON_TAG, RenX::translateName(object));
msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, RenX::translateName(object)); msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, RenX::translateName(object));
(server->*func)(msg); (server->*func)(msg);
} }
@ -660,7 +841,7 @@ void RenX_LoggingPlugin::RenX_OnDie(RenX::Server *server, const Jupiter::Readabl
} }
} }
void RenX_LoggingPlugin::RenX_OnDestroy(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &objectName, const Jupiter::ReadableString &damageType, RenX::ObjectType type) void RenX_LoggingPlugin::RenX_OnDestroy(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &objectName, const RenX::TeamType &objectTeam, const Jupiter::ReadableString &damageType, RenX::ObjectType type)
{ {
logFuncType func; logFuncType func;
if (RenX_LoggingPlugin::destroyPublic) if (RenX_LoggingPlugin::destroyPublic)
@ -683,11 +864,10 @@ void RenX_LoggingPlugin::RenX_OnDestroy(RenX::Server *server, const RenX::Player
} }
if (msg.isEmpty() == false) if (msg.isEmpty() == false)
{ {
RenX::TeamType victimTeam = RenX::getEnemy(player->team);
RenX::processTags(msg, server, player); RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_VICTIM_TEAM_COLOR_TAG, RenX::getTeamColor(victimTeam)); msg.replace(RenX::tags->INTERNAL_VICTIM_TEAM_COLOR_TAG, RenX::getTeamColor(objectTeam));
msg.replace(RenX::tags->INTERNAL_VICTIM_TEAM_SHORT_TAG, RenX::getTeamName(victimTeam)); msg.replace(RenX::tags->INTERNAL_VICTIM_TEAM_SHORT_TAG, RenX::getTeamName(objectTeam));
msg.replace(RenX::tags->INTERNAL_VICTIM_TEAM_LONG_TAG, RenX::getFullTeamName(victimTeam)); msg.replace(RenX::tags->INTERNAL_VICTIM_TEAM_LONG_TAG, RenX::getFullTeamName(objectTeam));
msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, RenX::translateName(objectName)); msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, RenX::translateName(objectName));
msg.replace(RenX::tags->INTERNAL_WEAPON_TAG, RenX::translateName(damageType)); msg.replace(RenX::tags->INTERNAL_WEAPON_TAG, RenX::translateName(damageType));
(server->*func)(msg); (server->*func)(msg);
@ -734,6 +914,247 @@ void RenX_LoggingPlugin::RenX_OnNeutralize(RenX::Server *server, const RenX::Pla
} }
} }
void RenX_LoggingPlugin::RenX_OnCharacterPurchase(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &character)
{
logFuncType func;
if (RenX_LoggingPlugin::characterPurchasePublic)
func = &RenX::Server::sendLogChan;
else
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->characterPurchaseFmt;
if (msg.isEmpty() == false)
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_VICTIM_CHARACTER_TAG, RenX::translateName(character));
(server->*func)(msg);
}
}
void RenX_LoggingPlugin::RenX_OnItemPurchase(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &item)
{
logFuncType func;
if (RenX_LoggingPlugin::itemPurchasePublic)
func = &RenX::Server::sendLogChan;
else
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->itemPurchaseFmt;
if (msg.isEmpty() == false)
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, RenX::translateName(item));
(server->*func)(msg);
}
}
void RenX_LoggingPlugin::RenX_OnWeaponPurchase(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &weapon)
{
logFuncType func;
if (RenX_LoggingPlugin::weaponPurchasePublic)
func = &RenX::Server::sendLogChan;
else
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->weaponPurchaseFmt;
if (msg.isEmpty() == false)
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_WEAPON_TAG, RenX::translateName(weapon));
(server->*func)(msg);
}
}
void RenX_LoggingPlugin::RenX_OnRefillPurchase(RenX::Server *server, const RenX::PlayerInfo *player)
{
logFuncType func;
if (RenX_LoggingPlugin::refillPurchasePublic)
func = &RenX::Server::sendLogChan;
else
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->refillPurchaseFmt;
if (msg.isEmpty() == false)
{
RenX::processTags(msg, server, player);
(server->*func)(msg);
}
}
void RenX_LoggingPlugin::RenX_OnVehiclePurchase(RenX::Server *server, const RenX::PlayerInfo *owner, const Jupiter::ReadableString &vehicle)
{
logFuncType func;
if (RenX_LoggingPlugin::vehiclePurchasePublic)
func = &RenX::Server::sendLogChan;
else
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->vehiclePurchaseFmt;
if (msg.isEmpty() == false)
{
RenX::processTags(msg, server, owner);
msg.replace(RenX::tags->INTERNAL_VICTIM_VEHICLE_TAG, RenX::translateName(vehicle));
(server->*func)(msg);
}
}
void RenX_LoggingPlugin::RenX_OnVehicleSpawn(RenX::Server *server, const RenX::TeamType &team, const Jupiter::ReadableString &vehicle)
{
logFuncType func;
if (RenX_LoggingPlugin::vehicleSpawnPublic)
func = &RenX::Server::sendLogChan;
else
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->vehicleSpawnFmt;
if (msg.isEmpty() == false)
{
RenX::TeamType otherTeam = RenX::getEnemy(team);
RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_TEAM_COLOR_TAG, RenX::getTeamColor(team));
msg.replace(RenX::tags->INTERNAL_TEAM_SHORT_TAG, RenX::getTeamName(team));
msg.replace(RenX::tags->INTERNAL_TEAM_LONG_TAG, RenX::getFullTeamName(team));
msg.replace(RenX::tags->INTERNAL_VICTIM_TEAM_COLOR_TAG, RenX::getTeamColor(otherTeam));
msg.replace(RenX::tags->INTERNAL_VICTIM_TEAM_SHORT_TAG, RenX::getTeamName(otherTeam));
msg.replace(RenX::tags->INTERNAL_VICTIM_TEAM_LONG_TAG, RenX::getFullTeamName(otherTeam));
msg.replace(RenX::tags->INTERNAL_VEHICLE_TAG, RenX::translateName(vehicle));
(server->*func)(msg);
}
}
void RenX_LoggingPlugin::RenX_OnSpawn(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &character)
{
logFuncType func;
if (RenX_LoggingPlugin::spawnPublic)
func = &RenX::Server::sendLogChan;
else
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->spawnFmt;
if (msg.isEmpty() == false)
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_VICTIM_CHARACTER_TAG, RenX::translateName(character));
(server->*func)(msg);
}
}
void RenX_LoggingPlugin::RenX_OnBotJoin(RenX::Server *server, const RenX::PlayerInfo *player)
{
logFuncType func;
if (RenX_LoggingPlugin::botJoinPublic)
func = &RenX::Server::sendLogChan;
else
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->botJoinFmt;
if (msg.isEmpty() == false)
{
RenX::processTags(msg, server, player);
(server->*func)(msg);
}
}
void RenX_LoggingPlugin::RenX_OnVehicleCrate(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &vehicle)
{
logFuncType func;
if (RenX_LoggingPlugin::vehicleCratePublic)
func = &RenX::Server::sendLogChan;
else
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->vehicleCrateFmt;
if (msg.isEmpty() == false)
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, RenX::translateName(vehicle));
(server->*func)(msg);
}
}
void RenX_LoggingPlugin::RenX_OnDeathCrate(RenX::Server *server, const RenX::PlayerInfo *player)
{
logFuncType func;
if (RenX_LoggingPlugin::deathCratePublic)
func = &RenX::Server::sendLogChan;
else
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->deathCrateFmt;
if (msg.isEmpty() == false)
{
RenX::processTags(msg, server, player);
(server->*func)(msg);
}
}
void RenX_LoggingPlugin::RenX_OnMoneyCrate(RenX::Server *server, const RenX::PlayerInfo *player, int amount)
{
logFuncType func;
if (RenX_LoggingPlugin::moneyCratePublic)
func = &RenX::Server::sendLogChan;
else
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->moneyCrateFmt;
if (msg.isEmpty() == false)
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, Jupiter::StringS::Format("%d", amount));
(server->*func)(msg);
}
}
void RenX_LoggingPlugin::RenX_OnCharacterCrate(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &character)
{
logFuncType func;
if (RenX_LoggingPlugin::characterCratePublic)
func = &RenX::Server::sendLogChan;
else
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->characterCrateFmt;
if (msg.isEmpty() == false)
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_VICTIM_CHARACTER_TAG, RenX::translateName(character));
(server->*func)(msg);
}
}
void RenX_LoggingPlugin::RenX_OnSpyCrate(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &character)
{
logFuncType func;
if (RenX_LoggingPlugin::spyCratePublic)
func = &RenX::Server::sendLogChan;
else
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->spyCrateFmt;
if (msg.isEmpty() == false)
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_VICTIM_CHARACTER_TAG, RenX::translateName(character));
(server->*func)(msg);
}
}
void RenX_LoggingPlugin::RenX_OnRefillCrate(RenX::Server *server, const RenX::PlayerInfo *player)
{
logFuncType func;
if (RenX_LoggingPlugin::refillCratePublic)
func = &RenX::Server::sendLogChan;
else
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->refillCrateFmt;
if (msg.isEmpty() == false)
{
RenX::processTags(msg, server, player);
(server->*func)(msg);
}
}
void RenX_LoggingPlugin::RenX_OnSteal(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &vehicle) void RenX_LoggingPlugin::RenX_OnSteal(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &vehicle)
{ {
logFuncType func; logFuncType func;
@ -768,6 +1189,23 @@ void RenX_LoggingPlugin::RenX_OnSteal(RenX::Server *server, const RenX::PlayerIn
} }
} }
void RenX_LoggingPlugin::RenX_OnDonate(RenX::Server *server, const RenX::PlayerInfo *donor, const RenX::PlayerInfo *player, double amount)
{
logFuncType func;
if (RenX_LoggingPlugin::donatePublic)
func = &RenX::Server::sendLogChan;
else
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->donateFmt;
if (msg.isEmpty() == false)
{
RenX::processTags(msg, server, donor, player);
msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, Jupiter::StringS::Format("%.0f", amount));
(server->*func)(msg);
}
}
void RenX_LoggingPlugin::RenX_OnDestroy(RenX::Server *server, const Jupiter::ReadableString &killer, const RenX::TeamType &killerTeam, const Jupiter::ReadableString &objectName, const RenX::TeamType &objectTeam, const Jupiter::ReadableString &damageType, RenX::ObjectType type) void RenX_LoggingPlugin::RenX_OnDestroy(RenX::Server *server, const Jupiter::ReadableString &killer, const RenX::TeamType &killerTeam, const Jupiter::ReadableString &objectName, const RenX::TeamType &objectTeam, const Jupiter::ReadableString &damageType, RenX::ObjectType type)
{ {
logFuncType func; logFuncType func;
@ -1124,6 +1562,8 @@ void RenX_LoggingPlugin::RenX_OnMapChange(RenX::Server *server, const Jupiter::R
msg.replace(RenX::tags->INTERNAL_MESSAGE_TAG, map); msg.replace(RenX::tags->INTERNAL_MESSAGE_TAG, map);
(server->*func)(msg); (server->*func)(msg);
} }
if (server->isSeamless() == false)
server->sendLogChan(IRCCOLOR "07[Warning]" IRCCOLOR " This server is using non-seamless server travel; this bot will be disconnected.");
} }
void RenX_LoggingPlugin::RenX_OnMapLoad(RenX::Server *server, const Jupiter::ReadableString &map) void RenX_LoggingPlugin::RenX_OnMapLoad(RenX::Server *server, const Jupiter::ReadableString &map)
@ -1193,32 +1633,31 @@ void RenX_LoggingPlugin::RenX_OnDemoRecord(RenX::Server *server, const Jupiter::
} }
} }
void RenX_LoggingPlugin::RenX_OnDemo(RenX::Server *server, const Jupiter::ReadableString &raw) void RenX_LoggingPlugin::RenX_OnDemoRecordStop(RenX::Server *server)
{ {
logFuncType func; logFuncType func;
if (RenX_LoggingPlugin::demoPublic) if (RenX_LoggingPlugin::demoRecordStopPublic)
func = &RenX::Server::sendLogChan; func = &RenX::Server::sendLogChan;
else else
func = &RenX::Server::sendAdmChan; func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->demoFmt; Jupiter::String msg = this->demoRecordStopFmt;
if (msg.isEmpty() == false) if (msg.isEmpty() == false)
{ {
RenX::processTags(msg, server); RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_MESSAGE_TAG, raw);
(server->*func)(msg); (server->*func)(msg);
} }
} }
void RenX_LoggingPlugin::RenX_OnLog(RenX::Server *server, const Jupiter::ReadableString &raw) void RenX_LoggingPlugin::RenX_OnDemo(RenX::Server *server, const Jupiter::ReadableString &raw)
{ {
logFuncType func; logFuncType func;
if (RenX_LoggingPlugin::logPublic) if (RenX_LoggingPlugin::demoPublic)
func = &RenX::Server::sendLogChan; func = &RenX::Server::sendLogChan;
else else
func = &RenX::Server::sendAdmChan; func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->logFmt; Jupiter::String msg = this->demoFmt;
if (msg.isEmpty() == false) if (msg.isEmpty() == false)
{ {
RenX::processTags(msg, server); RenX::processTags(msg, server);
@ -1227,97 +1666,36 @@ void RenX_LoggingPlugin::RenX_OnLog(RenX::Server *server, const Jupiter::Readabl
} }
} }
void RenX_LoggingPlugin::RenX_XOnVersion(RenX::Server *server, unsigned int version) void RenX_LoggingPlugin::RenX_OnLog(RenX::Server *server, const Jupiter::ReadableString &raw)
{ {
logFuncType func; logFuncType func;
if (RenX_LoggingPlugin::xVersionPublic) if (RenX_LoggingPlugin::logPublic)
func = &RenX::Server::sendLogChan; func = &RenX::Server::sendLogChan;
else else
func = &RenX::Server::sendAdmChan; func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->xVersionFmt; Jupiter::String msg = this->logFmt;
if (msg.isEmpty() == false) if (msg.isEmpty() == false)
{ {
RenX::processTags(msg, server); RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_XRCON_VERSION_TAG, Jupiter::StringS::Format("%u", version)); msg.replace(RenX::tags->INTERNAL_MESSAGE_TAG, raw);
(server->*func)(msg);
}
}
void RenX_LoggingPlugin::RenX_OnGrantCharacter(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &character)
{
if (player->character.equals(RenX::getCharacter(character)) == false)
{
logFuncType func;
if (RenX_LoggingPlugin::grantCharacterPublic)
func = &RenX::Server::sendLogChan;
else
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->grantCharacterFmt;
if (msg.isEmpty() == false)
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_VICTIM_CHARACTER_TAG, RenX::translateName(character));
(server->*func)(msg);
}
}
}
void RenX_LoggingPlugin::RenX_OnSpawnVehicle(RenX::Server *server, const RenX::PlayerInfo *owner, const Jupiter::ReadableString &vehicle)
{
logFuncType func;
if (RenX_LoggingPlugin::spawnVehiclePublic)
func = &RenX::Server::sendLogChan;
else
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->spawnVehicleFmt;
if (msg.isEmpty() == false)
{
RenX::processTags(msg, server, owner);
msg.replace(RenX::tags->INTERNAL_VICTIM_VEHICLE_TAG, RenX::translateName(vehicle));
(server->*func)(msg); (server->*func)(msg);
} }
} }
void RenX_LoggingPlugin::RenX_OnSpawnVehicleNoOwner(RenX::Server *server, const RenX::TeamType &team, const Jupiter::ReadableString &vehicle) void RenX_LoggingPlugin::RenX_XOnVersion(RenX::Server *server, unsigned int version)
{ {
logFuncType func; logFuncType func;
if (RenX_LoggingPlugin::spawnVehicleNoOwnerPublic) if (RenX_LoggingPlugin::xVersionPublic)
func = &RenX::Server::sendLogChan; func = &RenX::Server::sendLogChan;
else else
func = &RenX::Server::sendAdmChan; func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->spawnVehicleNoOwnerFmt; Jupiter::String msg = this->xVersionFmt;
if (msg.isEmpty() == false) if (msg.isEmpty() == false)
{ {
RenX::TeamType otherTeam = RenX::getEnemy(team);
RenX::processTags(msg, server); RenX::processTags(msg, server);
msg.replace(RenX::tags->INTERNAL_TEAM_COLOR_TAG, RenX::getTeamColor(team)); msg.replace(RenX::tags->INTERNAL_XRCON_VERSION_TAG, Jupiter::StringS::Format("%u", version));
msg.replace(RenX::tags->INTERNAL_TEAM_SHORT_TAG, RenX::getTeamName(team));
msg.replace(RenX::tags->INTERNAL_TEAM_LONG_TAG, RenX::getFullTeamName(team));
msg.replace(RenX::tags->INTERNAL_VICTIM_TEAM_COLOR_TAG, RenX::getTeamColor(otherTeam));
msg.replace(RenX::tags->INTERNAL_VICTIM_TEAM_SHORT_TAG, RenX::getTeamName(otherTeam));
msg.replace(RenX::tags->INTERNAL_VICTIM_TEAM_LONG_TAG, RenX::getFullTeamName(otherTeam));
msg.replace(RenX::tags->INTERNAL_VEHICLE_TAG, RenX::translateName(vehicle));
(server->*func)(msg);
}
}
void RenX_LoggingPlugin::RenX_OnMinePlace(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &mine)
{
logFuncType func;
if (RenX_LoggingPlugin::minePlacePublic)
func = &RenX::Server::sendLogChan;
else
func = &RenX::Server::sendAdmChan;
Jupiter::String msg = this->minePlaceFmt;
if (msg.isEmpty() == false)
{
RenX::processTags(msg, server, player);
msg.replace(RenX::tags->INTERNAL_OBJECT_TAG, RenX::translateName(mine));
(server->*func)(msg); (server->*func)(msg);
} }
} }

74
RenX.Logging/RenX_Logging.h

@ -38,18 +38,36 @@ public: // RenX::Plugin
void RenX_OnOtherChat(RenX::Server *server, const Jupiter::ReadableString &raw) override; void RenX_OnOtherChat(RenX::Server *server, const Jupiter::ReadableString &raw) override;
void RenX_OnDeploy(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &object) override; void RenX_OnDeploy(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &object) override;
void RenX_OnDisarm(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &object, const RenX::PlayerInfo *victim) override;
void RenX_OnDisarm(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &object) override; void RenX_OnDisarm(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &object) override;
void RenX_OnExplode(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &object) override;
void RenX_OnExplode(RenX::Server *server, const Jupiter::ReadableString &object) override;
void RenX_OnSuicide(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &damageType) override; void RenX_OnSuicide(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &damageType) override;
void RenX_OnKill(RenX::Server *server, const RenX::PlayerInfo *player, const RenX::PlayerInfo *victim, const Jupiter::ReadableString &damageType) override; void RenX_OnKill(RenX::Server *server, const RenX::PlayerInfo *player, const RenX::PlayerInfo *victim, const Jupiter::ReadableString &damageType) override;
void RenX_OnKill(RenX::Server *server, const Jupiter::ReadableString &killer, const RenX::TeamType &killerTeam, const RenX::PlayerInfo *victim, const Jupiter::ReadableString &damageType) override; void RenX_OnKill(RenX::Server *server, const Jupiter::ReadableString &killer, const RenX::TeamType &killerTeam, const RenX::PlayerInfo *victim, const Jupiter::ReadableString &damageType) override;
void RenX_OnDie(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &damageType) override; void RenX_OnDie(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &damageType) override;
void RenX_OnDie(RenX::Server *server, const Jupiter::ReadableString &object, const RenX::TeamType &objectTeam, const Jupiter::ReadableString &damageType) override; void RenX_OnDie(RenX::Server *server, const Jupiter::ReadableString &object, const RenX::TeamType &objectTeam, const Jupiter::ReadableString &damageType) override;
void RenX_OnDestroy(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &objectName, const Jupiter::ReadableString &damageType, RenX::ObjectType type) override; void RenX_OnDestroy(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &objectName, const RenX::TeamType &objectTeam, const Jupiter::ReadableString &damageType, RenX::ObjectType type) override;
void RenX_OnDestroy(RenX::Server *server, const Jupiter::ReadableString &killer, const RenX::TeamType &killerTeam, const Jupiter::ReadableString &objectName, const RenX::TeamType &objectTeam, const Jupiter::ReadableString &damageType, RenX::ObjectType type) override; void RenX_OnDestroy(RenX::Server *server, const Jupiter::ReadableString &killer, const RenX::TeamType &killerTeam, const Jupiter::ReadableString &objectName, const RenX::TeamType &objectTeam, const Jupiter::ReadableString &damageType, RenX::ObjectType type) override;
void RenX_OnCapture(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &building, const RenX::TeamType &oldTeam) override; void RenX_OnCapture(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &building, const RenX::TeamType &oldTeam) override;
void RenX_OnNeutralize(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &building, const RenX::TeamType &oldTeam) override; void RenX_OnNeutralize(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &building, const RenX::TeamType &oldTeam) override;
void RenX_OnCharacterPurchase(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &character) override;
void RenX_OnItemPurchase(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &item) override;
void RenX_OnWeaponPurchase(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &weapon) override;
void RenX_OnRefillPurchase(RenX::Server *server, const RenX::PlayerInfo *player) override;
void RenX_OnVehiclePurchase(RenX::Server *server, const RenX::PlayerInfo *owner, const Jupiter::ReadableString &vehicle) override;
void RenX_OnVehicleSpawn(RenX::Server *server, const RenX::TeamType &team, const Jupiter::ReadableString &vehicle) override;
void RenX_OnSpawn(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &character) override;
void RenX_OnBotJoin(RenX::Server *server, const RenX::PlayerInfo *player) override;
void RenX_OnVehicleCrate(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &vehicle) override;
void RenX_OnDeathCrate(RenX::Server *server, const RenX::PlayerInfo *player) override;
void RenX_OnMoneyCrate(RenX::Server *server, const RenX::PlayerInfo *player, int amount) override;
void RenX_OnCharacterCrate(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &character) override;
void RenX_OnSpyCrate(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &character) override;
void RenX_OnRefillCrate(RenX::Server *server, const RenX::PlayerInfo *player) override;
void RenX_OnSteal(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &vehicle) override; void RenX_OnSteal(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &vehicle) override;
void RenX_OnSteal(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &vehicle, const RenX::PlayerInfo *victim) override; void RenX_OnSteal(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &vehicle, const RenX::PlayerInfo *victim) override;
void RenX_OnDonate(RenX::Server *server, const RenX::PlayerInfo *donor, const RenX::PlayerInfo *player, double amount) override;
void RenX_OnGameOver(RenX::Server *server, RenX::WinType winType, const RenX::TeamType &team, int gScore, int nScore) override; void RenX_OnGameOver(RenX::Server *server, RenX::WinType winType, const RenX::TeamType &team, int gScore, int nScore) override;
void RenX_OnGame(RenX::Server *server, const Jupiter::ReadableString &raw) override; void RenX_OnGame(RenX::Server *server, const Jupiter::ReadableString &raw) override;
@ -73,15 +91,12 @@ public: // RenX::Plugin
void RenX_OnDemoRecord(RenX::Server *server, const RenX::PlayerInfo *player) override; void RenX_OnDemoRecord(RenX::Server *server, const RenX::PlayerInfo *player) override;
void RenX_OnDemoRecord(RenX::Server *server, const Jupiter::ReadableString &user) override; void RenX_OnDemoRecord(RenX::Server *server, const Jupiter::ReadableString &user) override;
void RenX_OnDemoRecordStop(RenX::Server *server) override;
void RenX_OnDemo(RenX::Server *server, const Jupiter::ReadableString &raw) override; void RenX_OnDemo(RenX::Server *server, const Jupiter::ReadableString &raw) override;
void RenX_OnLog(RenX::Server *server, const Jupiter::ReadableString &raw) override; void RenX_OnLog(RenX::Server *server, const Jupiter::ReadableString &raw) override;
void RenX_XOnVersion(RenX::Server *server, unsigned int version) override; void RenX_XOnVersion(RenX::Server *server, unsigned int version) override;
void RenX_OnGrantCharacter(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &character) override;
void RenX_OnSpawnVehicle(RenX::Server *server, const RenX::PlayerInfo *owner, const Jupiter::ReadableString &vehicle) override;
void RenX_OnSpawnVehicleNoOwner(RenX::Server *server, const RenX::TeamType &team, const Jupiter::ReadableString &vehicle) override;
void RenX_OnMinePlace(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &mine) override;
void RenX_XOnOther(RenX::Server *server, const Jupiter::ReadableString &raw) override; void RenX_XOnOther(RenX::Server *server, const Jupiter::ReadableString &raw) override;
void RenX_OnCommand(RenX::Server *server, const Jupiter::ReadableString &raw) override; void RenX_OnCommand(RenX::Server *server, const Jupiter::ReadableString &raw) override;
@ -111,14 +126,32 @@ private:
unsigned int hostPagePublic : 1; unsigned int hostPagePublic : 1;
unsigned int otherChatPublic : 1; unsigned int otherChatPublic : 1;
unsigned int deployPublic : 1; unsigned int deployPublic : 1;
unsigned int mineDeployPublic : 1;
unsigned int disarmPublic : 1; unsigned int disarmPublic : 1;
unsigned int mineDisarmPublic : 1;
unsigned int explodePublic : 1;
unsigned int suicidePublic : 1; unsigned int suicidePublic : 1;
unsigned int killPublic : 1; unsigned int killPublic : 1;
unsigned int diePublic : 1; unsigned int diePublic : 1;
unsigned int destroyPublic : 1; unsigned int destroyPublic : 1;
unsigned int capturePublic : 1; unsigned int capturePublic : 1;
unsigned int neutralizePublic : 1; unsigned int neutralizePublic : 1;
unsigned int characterPurchasePublic : 1;
unsigned int itemPurchasePublic : 1;
unsigned int weaponPurchasePublic : 1;
unsigned int refillPurchasePublic : 1;
unsigned int vehiclePurchasePublic : 1;
unsigned int vehicleSpawnPublic : 1;
unsigned int spawnPublic : 1;
unsigned int botJoinPublic : 1;
unsigned int vehicleCratePublic : 1;
unsigned int deathCratePublic : 1;
unsigned int moneyCratePublic : 1;
unsigned int characterCratePublic : 1;
unsigned int spyCratePublic : 1;
unsigned int refillCratePublic : 1;
unsigned int stealPublic : 1; unsigned int stealPublic : 1;
unsigned int donatePublic : 1;
unsigned int gameOverPublic : 1; unsigned int gameOverPublic : 1;
unsigned int gamePublic : 1; unsigned int gamePublic : 1;
unsigned int executePublic : 1; unsigned int executePublic : 1;
@ -136,13 +169,10 @@ private:
unsigned int mapLoadPublic : 1; unsigned int mapLoadPublic : 1;
unsigned int mapPublic : 1; unsigned int mapPublic : 1;
unsigned int demoRecordPublic : 1; unsigned int demoRecordPublic : 1;
unsigned int demoRecordStopPublic : 1;
unsigned int demoPublic : 1; unsigned int demoPublic : 1;
unsigned int logPublic : 1; unsigned int logPublic : 1;
unsigned int xVersionPublic : 1; unsigned int xVersionPublic : 1;
unsigned int grantCharacterPublic : 1;
unsigned int spawnVehiclePublic : 1;
unsigned int spawnVehicleNoOwnerPublic : 1;
unsigned int minePlacePublic : 1;
unsigned int xOtherPublic : 1; unsigned int xOtherPublic : 1;
unsigned int commandPublic : 1; unsigned int commandPublic : 1;
unsigned int errorPublic : 1; unsigned int errorPublic : 1;
@ -162,7 +192,13 @@ private:
Jupiter::StringS hostPageFmt; Jupiter::StringS hostPageFmt;
Jupiter::StringS otherChatFmt; Jupiter::StringS otherChatFmt;
Jupiter::StringS deployFmt; Jupiter::StringS deployFmt;
Jupiter::StringS mineDeployFmt;
Jupiter::StringS disarmFmt; Jupiter::StringS disarmFmt;
Jupiter::StringS mineDisarmFmt;
Jupiter::StringS disarmNoOwnerFmt;
Jupiter::StringS mineDisarmNoOwnerFmt;
Jupiter::StringS explodeFmt;
Jupiter::StringS explodeNoOwnerFmt;
Jupiter::StringS suicideFmt; Jupiter::StringS suicideFmt;
Jupiter::StringS dieFmt; Jupiter::StringS dieFmt;
Jupiter::StringS dieFmt2; Jupiter::StringS dieFmt2;
@ -176,8 +212,23 @@ private:
Jupiter::StringS destroyVehicleFmt2; Jupiter::StringS destroyVehicleFmt2;
Jupiter::StringS captureFmt; Jupiter::StringS captureFmt;
Jupiter::StringS neutralizeFmt; Jupiter::StringS neutralizeFmt;
Jupiter::StringS characterPurchaseFmt;
Jupiter::StringS itemPurchaseFmt;
Jupiter::StringS weaponPurchaseFmt;
Jupiter::StringS refillPurchaseFmt;
Jupiter::StringS vehiclePurchaseFmt;
Jupiter::StringS vehicleSpawnFmt;
Jupiter::StringS spawnFmt;
Jupiter::StringS botJoinFmt;
Jupiter::StringS vehicleCrateFmt;
Jupiter::StringS deathCrateFmt;
Jupiter::StringS moneyCrateFmt;
Jupiter::StringS characterCrateFmt;
Jupiter::StringS spyCrateFmt;
Jupiter::StringS refillCrateFmt;
Jupiter::StringS stealFmt; Jupiter::StringS stealFmt;
Jupiter::StringS stealNoOwnerFmt; Jupiter::StringS stealNoOwnerFmt;
Jupiter::StringS donateFmt;
Jupiter::StringS gameOverFmt; Jupiter::StringS gameOverFmt;
Jupiter::StringS gameOverTieFmt; Jupiter::StringS gameOverTieFmt;
Jupiter::StringS gameOverTieNoWinFmt; Jupiter::StringS gameOverTieNoWinFmt;
@ -199,13 +250,10 @@ private:
Jupiter::StringS mapLoadFmt; Jupiter::StringS mapLoadFmt;
Jupiter::StringS mapFmt; Jupiter::StringS mapFmt;
Jupiter::StringS demoRecordFmt, rconDemoRecordFmt; Jupiter::StringS demoRecordFmt, rconDemoRecordFmt;
Jupiter::StringS demoRecordStopFmt;
Jupiter::StringS demoFmt; Jupiter::StringS demoFmt;
Jupiter::StringS logFmt; Jupiter::StringS logFmt;
Jupiter::StringS xVersionFmt; Jupiter::StringS xVersionFmt;
Jupiter::StringS grantCharacterFmt;
Jupiter::StringS spawnVehicleFmt;
Jupiter::StringS spawnVehicleNoOwnerFmt;
Jupiter::StringS minePlaceFmt;
Jupiter::StringS xOtherFmt; Jupiter::StringS xOtherFmt;
Jupiter::StringS commandFmt; Jupiter::StringS commandFmt;
Jupiter::StringS errorFmt; Jupiter::StringS errorFmt;

2
RenX.Medals/RenX_Medals.cpp

@ -226,7 +226,7 @@ void RenX_MedalsPlugin::RenX_OnGameOver(RenX::Server *server, RenX::WinType winT
RenX_MedalsPlugin::medalsFile.sync(medalsFileName); RenX_MedalsPlugin::medalsFile.sync(medalsFileName);
} }
void RenX_MedalsPlugin::RenX_OnDestroy(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &objectName, const Jupiter::ReadableString &damageType, RenX::ObjectType type) 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)
{ {
if (type == RenX::ObjectType::Building) if (type == RenX::ObjectType::Building)
{ {

2
RenX.Medals/RenX_Medals.h

@ -48,7 +48,7 @@ public: // RenX::Plugin
void RenX_OnPlayerDelete(RenX::Server *server, const RenX::PlayerInfo *player) override; void RenX_OnPlayerDelete(RenX::Server *server, const RenX::PlayerInfo *player) override;
void RenX_OnJoin(RenX::Server *server, const RenX::PlayerInfo *player) override; void RenX_OnJoin(RenX::Server *server, const RenX::PlayerInfo *player) override;
void RenX_OnGameOver(RenX::Server *server, RenX::WinType winType, const RenX::TeamType &team, int gScore, int nScore) override; void RenX_OnGameOver(RenX::Server *server, RenX::WinType winType, const RenX::TeamType &team, int gScore, int nScore) override;
void RenX_OnDestroy(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &objectName, const Jupiter::ReadableString &damageType, RenX::ObjectType type) override; void RenX_OnDestroy(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &objectName, const RenX::TeamType &objectTeam, const Jupiter::ReadableString &damageType, RenX::ObjectType type) override;
RenX_MedalsPlugin(); RenX_MedalsPlugin();
~RenX_MedalsPlugin(); ~RenX_MedalsPlugin();

Loading…
Cancel
Save