Browse Source

RenX.Commands now adds a player's banner to their ban entry data.

pull/3/head
JustinAJ 10 years ago
parent
commit
c55aa3b825
  1. 6
      RenX.Commands/RenX_Commands.cpp
  2. 2
      RenX.Commands/RenX_Commands.h

6
RenX.Commands/RenX_Commands.cpp

@ -39,6 +39,12 @@ inline void onDie(RenX::Server *server, const RenX::PlayerInfo *player)
if (player->isBot && server->varData.getBool(STRING_LITERAL_AS_REFERENCE("RenX.Commands"), STRING_LITERAL_AS_REFERENCE("phasing"), false)) server->kickPlayer(player);
}
bool RenX_CommandsPlugin::RenX_OnBan(RenX::Server *server, const RenX::PlayerInfo *player, Jupiter::StringType &data)
{
data = player->varData.get(this->getName(), STRING_LITERAL_AS_REFERENCE("banner"));
return !data.isEmpty();
}
void RenX_CommandsPlugin::RenX_OnSuicide(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &)
{
onDie(server, player);

2
RenX.Commands/RenX_Commands.h

@ -26,6 +26,8 @@
class RenX_CommandsPlugin : public RenX::Plugin
{
public: // RenX::Plugin
bool RenX_OnBan(RenX::Server *server, const RenX::PlayerInfo *player, Jupiter::StringType &data);
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_OnDie(RenX::Server *server, const RenX::PlayerInfo *player, const Jupiter::ReadableString &damageType) override;

Loading…
Cancel
Save