Browse Source

Added OnRadioChat event

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

BIN
Release/Plugins/RenX.Core.lib

Binary file not shown.

5
RenX.Core/RenX_Plugin.cpp

@ -125,6 +125,11 @@ void RenX::Plugin::RenX_OnTeamChat(Server *, const RenX::PlayerInfo *, const Jup
return;
}
void RenX::Plugin::RenX_OnRadioChat(Server *, const RenX::PlayerInfo *, const Jupiter::ReadableString &)
{
return;
}
void RenX::Plugin::RenX_OnHostChat(Server *, const Jupiter::ReadableString &)
{
return;

1
RenX.Core/RenX_Plugin.h

@ -64,6 +64,7 @@ namespace RenX
/** Chat type logs */
virtual void RenX_OnChat(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &message);
virtual void RenX_OnTeamChat(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &message);
virtual void RenX_OnRadioChat(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &message);
virtual void RenX_OnHostChat(Server *server, const Jupiter::ReadableString &message);
virtual void RenX_OnHostPage(Server *server, const PlayerInfo *player, const Jupiter::ReadableString &message);
virtual void RenX_OnOtherChat(Server *server, const Jupiter::ReadableString &raw);

8
RenX.Core/RenX_Server.cpp

@ -1927,6 +1927,14 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line)
xPlugins.get(i)->RenX_OnTeamChat(this, player, message);
onAction();
}
else if (subHeader.equals("Radio;"))
{
RenX::PlayerInfo *player = parseGetPlayerOrAdd(buff.getToken(2, RenX::DelimC));
Jupiter::ReferenceString message = buff.getToken(4, RenX::DelimC);
for (size_t i = 0; i < xPlugins.size(); i++)
xPlugins.get(i)->RenX_OnRadioChat(this, player, message);
onAction();
}
else if (subHeader.equals("HostSay;"))
{
Jupiter::ReferenceString message = buff.getToken(3, RenX::DelimC);

Loading…
Cancel
Save