Skip to content

Commit

Permalink
Added OnRadioChat event
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinAJ committed Jul 8, 2015
1 parent c00f8ea commit 7bee8d4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
Binary file modified Release/Plugins/RenX.Core.lib
Binary file not shown.
5 changes: 5 additions & 0 deletions RenX.Core/RenX_Plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions RenX.Core/RenX_Plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 8 additions & 0 deletions RenX.Core/RenX_Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7bee8d4

Please sign in to comment.