Browse Source

"banner" is now set in a player's varData to the command executor for ban commands.

pull/3/head
JustinAJ 10 years ago
parent
commit
1c602cbef1
  1. 8
      RenX.Commands/RenX_Commands.cpp

8
RenX.Commands/RenX_Commands.cpp

@ -54,6 +54,9 @@ void RenX_CommandsPlugin::RenX_OnDie(RenX::Server *server, const RenX::PlayerInf
onDie(server, player); onDie(server, player);
} }
// Plugin instantiation and entry point.
RenX_CommandsPlugin pluginInstance;
/** Console Commands */ /** Console Commands */
// RCON Console Command // RCON Console Command
@ -1029,6 +1032,7 @@ void KickBanIRCCommand::trigger(IRC_Bot *source, const Jupiter::ReadableString &
player = server->getPlayerByPartName(parameters); player = server->getPlayerByPartName(parameters);
if (player != nullptr) if (player != nullptr)
{ {
player->varData.set(pluginInstance.getName(), STRING_LITERAL_AS_REFERENCE("banner"), nick);
server->banPlayer(player); server->banPlayer(player);
kicks++; kicks++;
} }
@ -1503,6 +1507,7 @@ void KickBanGameCommand::trigger(RenX::Server *source, RenX::PlayerInfo *player,
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: You can not ban higher level moderators.")); source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Error: You can not ban higher level moderators."));
else else
{ {
target->varData.set(pluginInstance.getName(), STRING_LITERAL_AS_REFERENCE("banner"), player->name);
source->banPlayer(target); source->banPlayer(target);
source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Player has been banned and kicked from the game.")); source->sendMessage(player, STRING_LITERAL_AS_REFERENCE("Player has been banned and kicked from the game."));
} }
@ -1519,9 +1524,6 @@ const Jupiter::ReadableString &KickBanGameCommand::getHelp(const Jupiter::Readab
GAME_COMMAND_INIT(KickBanGameCommand) GAME_COMMAND_INIT(KickBanGameCommand)
// Plugin instantiation and entry point.
RenX_CommandsPlugin pluginInstance;
extern "C" __declspec(dllexport) Jupiter::Plugin *getPlugin() extern "C" __declspec(dllexport) Jupiter::Plugin *getPlugin()
{ {
return &pluginInstance; return &pluginInstance;

Loading…
Cancel
Save