Browse Source

RenX.Core:

* Added handling for "SpeedHack;" PLAYER and "OverMine;" GAME RCON events.
RenX.Commands:
* Color coded "inactive" and "active" keywords in "BanSearch" IRC Command
pull/3/head
Jessica James 9 years ago
parent
commit
3ba0e4043e
  1. BIN
      Release/Plugins/RenX.Core.lib
  2. 4
      RenX.Commands/RenX_Commands.cpp
  3. 10
      RenX.Core/RenX_Plugin.cpp
  4. 2
      RenX.Core/RenX_Plugin.h
  5. 22
      RenX.Core/RenX_Server.cpp

BIN
Release/Plugins/RenX.Core.lib

Binary file not shown.

4
RenX.Commands/RenX_Commands.cpp

@ -1910,8 +1910,8 @@ void BanSearchIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString
types += ";"_jrs;
}
out.format("ID: %lu (%sactive); Date: %s; IP: %.*s/%u; Steam: %llu; Types:%.*s Name: %.*s; Banner: %.*s",
i, entry->is_active() ? "" : "in", timeStr, ip_str.size(), ip_str.ptr(), entry->prefix_length, entry->steamid, types.size(), types.ptr(),
out.format("ID: %lu (" IRCCOLOR "%sactive" IRCCOLOR "); Date: %s; IP: %.*s/%u; Steam: %llu; Types:%.*s Name: %.*s; Banner: %.*s",
i, entry->is_active() ? "12" : "04in", timeStr, ip_str.size(), ip_str.ptr(), entry->prefix_length, entry->steamid, types.size(), types.ptr(),
entry->name.size(), entry->name.ptr(), entry->banner.size(), entry->banner.ptr());
if (entry->rdns.isNotEmpty())

10
RenX.Core/RenX_Plugin.cpp

@ -121,6 +121,11 @@ void RenX::Plugin::RenX_OnExecute(Server *, const PlayerInfo *, const Jupiter::R
return;
}
void RenX::Plugin::RenX_OnSpeedHack(Server *, const PlayerInfo *)
{
return;
}
void RenX::Plugin::RenX_OnPlayer(Server *, const Jupiter::ReadableString &)
{
return;
@ -161,6 +166,11 @@ void RenX::Plugin::RenX_OnDeploy(Server *, const RenX::PlayerInfo *, const Jupit
return;
}
void RenX::Plugin::RenX_OnOverMine(Server *, const RenX::PlayerInfo *, const Jupiter::ReadableString &)
{
return;
}
void RenX::Plugin::RenX_OnDisarm(Server *, const RenX::PlayerInfo *, const Jupiter::ReadableString &)
{
return;

2
RenX.Core/RenX_Plugin.h

@ -62,6 +62,7 @@ namespace RenX
virtual void RenX_OnRank(Server *server, const PlayerInfo *player);
virtual void RenX_OnDev(Server *server, const PlayerInfo *player);
virtual void RenX_OnExecute(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &command);
virtual void RenX_OnSpeedHack(Server *server, const PlayerInfo *player);
virtual void RenX_OnPlayer(Server *server, const Jupiter::ReadableString &raw);
/** Chat type logs */
@ -74,6 +75,7 @@ namespace RenX
/** Game type logs */
virtual void RenX_OnDeploy(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &object);
virtual void RenX_OnOverMine(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &location);
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);

22
RenX.Core/RenX_Server.cpp

@ -2238,6 +2238,15 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line)
xPlugins.get(i)->RenX_OnDonate(this, donor, player, amount);
}
}
else if (subHeader.equals("OverMine;"))
{
// Player | "near" | Location
RenX::PlayerInfo *player = parseGetPlayerOrAdd(tokens.getToken(1));
Jupiter::ReferenceString location = tokens.getToken(3);
for (size_t i = 0; i < xPlugins.size(); i++)
xPlugins.get(i)->RenX_OnOverMine(this, player, location);
}
else if (subHeader.equals("MatchEnd;"))
{
// "winner" | Winner | Reason("TimeLimit" etc) | "GDI=" GDI Score | "Nod=" Nod Score
@ -2432,6 +2441,9 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line)
RenX::PlayerInfo *player = parseGetPlayerOrAdd(tokens.getToken(1));
if (player != nullptr)
player->global_rank = tokens.getToken(2).asUnsignedInt();
for (size_t i = 0; i < xPlugins.size(); i++)
xPlugins.get(i)->RenX_OnRank(this, player);
}
}
else if (subHeader.equals("Dev;"))
@ -2440,6 +2452,16 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line)
RenX::PlayerInfo *player = parseGetPlayerOrAdd(tokens.getToken(1));
if (player != nullptr)
player->is_dev = tokens.getToken(2).asBool();
for (size_t i = 0; i < xPlugins.size(); i++)
xPlugins.get(i)->RenX_OnDev(this, player);
}
else if (subHeader.equals("SpeedHack;"))
{
// Player
RenX::PlayerInfo *player = parseGetPlayerOrAdd(tokens.getToken(1));
for (size_t i = 0; i < xPlugins.size(); i++)
xPlugins.get(i)->RenX_OnSpeedHack(this, player);
}
else
{

Loading…
Cancel
Save