Browse Source

Added RenX_OnAdminGrant event.

pull/3/head
JustinAJ 10 years ago
parent
commit
761da4c2b5
  1. BIN
      Release/Plugins/RenX.Core.lib
  2. 5
      RenX.Core/RenX_Plugin.cpp
  3. 1
      RenX.Core/RenX_Plugin.h
  4. 6
      RenX.Core/RenX_Server.cpp

BIN
Release/Plugins/RenX.Core.lib

Binary file not shown.

5
RenX.Core/RenX_Plugin.cpp

@ -130,6 +130,11 @@ void RenX::Plugin::RenX_OnAdminLogin(Server *, const RenX::PlayerInfo *)
return;
}
void RenX::Plugin::RenX_OnAdminGrant(Server *, const RenX::PlayerInfo *)
{
return;
}
void RenX::Plugin::RenX_OnAdminLogout(Server *, const RenX::PlayerInfo *)
{
return;

1
RenX.Core/RenX_Plugin.h

@ -67,6 +67,7 @@ namespace RenX
/** Admin Type Logs */
virtual void RenX_OnAdminLogin(Server *server, const PlayerInfo *player);
virtual void RenX_OnAdminGrant(Server *server, const PlayerInfo *player);
virtual void RenX_OnAdminLogout(Server *server, const PlayerInfo *player);
virtual void RenX_OnAdmin(Server *server, const Jupiter::ReadableString &raw);

6
RenX.Core/RenX_Server.cpp

@ -871,6 +871,12 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line)
xPlugins.get(i)->RenX_OnAdminLogout(this, player);
player->adminType = "";
}
else if (action.equals("granted"))
{
player->adminType = buff.getWord(3, RenX::DelimS);
for (size_t i = 0; i < xPlugins.size(); i++)
xPlugins.get(i)->RenX_OnAdminGrant(this, player);
}
else for (size_t i = 0; i < xPlugins.size(); i++)
xPlugins.get(i)->RenX_OnAdmin(this, buff.gotoWord(1, RenX::DelimS));
}

Loading…
Cancel
Save