Browse Source

Updated some RCON parsing

Updated the "gameover" IRCCommand's help message.
pull/3/head
Jessica James 9 years ago
parent
commit
9a8d1dbf06
  1. BIN
      Release/Plugins/RenX.Core.lib
  2. 2
      RenX.Commands/RenX_Commands.cpp
  3. 32
      RenX.Core/RenX_Server.cpp

BIN
Release/Plugins/RenX.Core.lib

Binary file not shown.

2
RenX.Commands/RenX_Commands.cpp

@ -1350,7 +1350,7 @@ void GameOverIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString
const Jupiter::ReadableString &GameOverIRCCommand::getHelp(const Jupiter::ReadableString &) const Jupiter::ReadableString &GameOverIRCCommand::getHelp(const Jupiter::ReadableString &)
{ {
static STRING_LITERAL_AS_NAMED_REFERENCE(defaultHelp, "Forcefully ends the game in progress. Syntax: Gameover [NOW | STOP | Empty | Seconds = 10]"); static STRING_LITERAL_AS_NAMED_REFERENCE(defaultHelp, "Forcefully ends the game in progress. Syntax: Gameover [NOW | STOP | [If] Empty | Seconds = 10]");
return defaultHelp; return defaultHelp;
} }

32
RenX.Core/RenX_Server.cpp

@ -1812,6 +1812,38 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line)
onAction(); onAction();
} }
else if (subHeader.equals("Exploded;")) else if (subHeader.equals("Exploded;"))
{
// Pre-5.15:
// Explosive | "at" | Location
// Explosive | "at" | Location | "by" | Owner
// 5.15+:
// Explosive | "near" | Spot Location | "at" | Location | "by" | Owner
// Explosive | "near" | Spot Location | "at" | Location
Jupiter::ReferenceString explosive = tokens.getToken(2);
if (tokens.getToken(5).equals("at")) // 5.15+
{
if (tokens.getToken(7).equals("by")) // Player information specified
{
RenX::PlayerInfo *player = parseGetPlayerOrAdd(tokens.getToken(8));
for (size_t i = 0; i < xPlugins.size(); i++)
xPlugins.get(i)->RenX_OnExplode(this, player, explosive);
}
else // No player information specified
for (size_t i = 0; i < xPlugins.size(); i++)
xPlugins.get(i)->RenX_OnExplode(this, explosive);
}
else if (tokens.getToken(5).equals("by")) // Pre-5.15 with player information specified
{
RenX::PlayerInfo *player = parseGetPlayerOrAdd(tokens.getToken(6));
for (size_t i = 0; i < xPlugins.size(); i++)
xPlugins.get(i)->RenX_OnExplode(this, player, explosive);
}
else // Pre-5.15 with no player information specified
for (size_t i = 0; i < xPlugins.size(); i++)
xPlugins.get(i)->RenX_OnExplode(this, explosive);
onAction();
}
else if (subHeader.equals("ProjectileExploded;"))
{ {
// Explosive | "at" | Location // Explosive | "at" | Location
// Explosive | "at" | Location | "by" | Owner // Explosive | "at" | Location | "by" | Owner

Loading…
Cancel
Save