Browse Source

Updated Jupiter; adjusted project files to compile

pull/4/head
Jessica James 8 years ago
parent
commit
164f00f8a4
  1. 2
      Bot/Bot.vcxproj
  2. 2
      Bot/Bot.vcxproj.filters
  3. 2
      ChannelRelay/ChannelRelay.vcxproj
  4. 2
      ChannelRelay/ChannelRelay.vcxproj.filters
  5. 2
      CoreCommands/CoreCommands.vcxproj
  6. 2
      CoreCommands/CoreCommands.vcxproj.filters
  7. 2
      ExtraCommands/ExtraCommands.vcxproj
  8. 2
      ExtraCommands/ExtraCommands.vcxproj.filters
  9. 2
      FunCommands/FunCommands.vcxproj
  10. 2
      FunCommands/FunCommands.vcxproj.filters
  11. 2
      HTTPServer/HTTPServer.vcxproj
  12. 2
      HTTPServer/HTTPServer.vcxproj.filters
  13. 2
      IRC.Core/IRC.Core.vcxproj
  14. 2
      IRC.Core/IRC.Core.vcxproj.filters
  15. 2
      Jupiter
  16. 2
      Plugin.Example/Plugin.Example.vcxproj
  17. 2
      Plugin.Example/Plugin.Example.vcxproj.filters
  18. 2
      Plugin.Template/Plugin.Template.vcxproj
  19. 2
      Plugin.Template/Plugin.Template.vcxproj.filters
  20. 2
      PluginManager/PluginManager.vcxproj
  21. 2
      PluginManager/PluginManager.vcxproj.filters
  22. 2
      RenX.AlwaysRecord/RenX.AlwaysRecord.vcxproj
  23. 2
      RenX.AlwaysRecord/RenX.AlwaysRecord.vcxproj.filters
  24. 2
      RenX.Announcements/RenX.Announcements.vcxproj
  25. 2
      RenX.Announcements/RenX.Announcements.vcxproj.filters
  26. 2
      RenX.Commands/RenX.Commands.vcxproj
  27. 2
      RenX.Commands/RenX.Commands.vcxproj.filters
  28. 2
      RenX.Core/RenX.Core.vcxproj
  29. 2
      RenX.Core/RenX.Core.vcxproj.filters
  30. 2
      RenX.Core/RenX_Server.cpp
  31. 2
      RenX.ExcessiveHeadshots/RenX.ExcessiveHeadshots.vcxproj
  32. 2
      RenX.ExcessiveHeadshots/RenX.ExcessiveHeadshots.vcxproj.filters
  33. 2
      RenX.ExtraLogging/RenX.ExtraLogging.vcxproj
  34. 2
      RenX.ExtraLogging/RenX.ExtraLogging.vcxproj.filters
  35. 2
      RenX.Greetings/RenX.Greetings.vcxproj
  36. 2
      RenX.Greetings/RenX.Greetings.vcxproj.filters
  37. 2
      RenX.HybridUUID/RenX.HybridUUID.vcxproj
  38. 2
      RenX.HybridUUID/RenX.HybridUUID.vcxproj.filters
  39. 2
      RenX.IRCJoin/RenX.IRCJoin.vcxproj
  40. 2
      RenX.IRCJoin/RenX.IRCJoin.vcxproj.filters
  41. 2
      RenX.Ladder.All-Time/RenX.Ladder.All-Time.vcxproj
  42. 2
      RenX.Ladder.All-Time/RenX.Ladder.All-Time.vcxproj.filters
  43. 2
      RenX.Ladder.Daily/RenX.Ladder.Daily.vcxproj
  44. 2
      RenX.Ladder.Daily/RenX.Ladder.Daily.vcxproj.filters
  45. 2
      RenX.Ladder.Monthly/RenX.Ladder.Monthly.vcxproj
  46. 2
      RenX.Ladder.Monthly/RenX.Ladder.Monthly.vcxproj.filters
  47. 2
      RenX.Ladder.Web/RenX.Ladder.Web.vcxproj
  48. 2
      RenX.Ladder.Web/RenX.Ladder.Web.vcxproj.filters
  49. 2
      RenX.Ladder.Weekly/RenX.Ladder.Weekly.vcxproj
  50. 2
      RenX.Ladder.Weekly/RenX.Ladder.Weekly.vcxproj.filters
  51. 2
      RenX.Ladder.Yearly/RenX.Ladder.Yearly.vcxproj
  52. 2
      RenX.Ladder.Yearly/RenX.Ladder.Yearly.vcxproj.filters
  53. 2
      RenX.Ladder/RenX.Ladder.vcxproj
  54. 2
      RenX.Ladder/RenX.Ladder.vcxproj.filters
  55. 2
      RenX.Listen/RenX.Listen.vcxproj
  56. 2
      RenX.Listen/RenX.Listen.vcxproj.filters
  57. 2
      RenX.Logging/RenX.Logging.vcxproj
  58. 2
      RenX.Logging/RenX.Logging.vcxproj.filters
  59. 2
      RenX.Medals/RenX.Medals.vcxproj
  60. 2
      RenX.Medals/RenX.Medals.vcxproj.filters
  61. 2
      RenX.MinPlayers/RenX.MinPlayers.vcxproj
  62. 2
      RenX.MinPlayers/RenX.MinPlayers.vcxproj.filters
  63. 2
      RenX.ModSystem/RenX.ModSystem.vcxproj
  64. 2
      RenX.ModSystem/RenX.ModSystem.vcxproj.filters
  65. 86
      RenX.Net/RenX.Net.vcxproj
  66. 41
      RenX.Net/RenX.Net.vcxproj.filters
  67. 274
      RenX.Net/RenX_Net.cpp
  68. 93
      RenX.Net/RenX_Net.h
  69. 2
      RenX.NicknameUUID/RenX.NicknameUUID.vcxproj
  70. 2
      RenX.NicknameUUID/RenX.NicknameUUID.vcxproj.filters
  71. 2
      RenX.Plugin.Template/RenX.Plugin.Template.vcxproj
  72. 2
      RenX.Plugin.Template/RenX.Plugin.Template.vcxproj.filters
  73. 2
      RenX.ServerList/RenX.ServerList.vcxproj
  74. 2
      RenX.ServerList/RenX.ServerList.vcxproj.filters
  75. 2
      RenX.SetJoin/RenX.SetJoin.vcxproj
  76. 2
      RenX.SetJoin/RenX.SetJoin.vcxproj.filters
  77. 2
      RenX.Warn/RenX.Warn.vcxproj
  78. 2
      RenX.Warn/RenX.Warn.vcxproj.filters
  79. 2
      SetJoin/SetJoin.vcxproj
  80. 2
      SetJoin/SetJoin.vcxproj.filters

2
Bot/Bot.vcxproj

@ -101,7 +101,7 @@
<ClInclude Include="ServerManager.h" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

2
Bot/Bot.vcxproj.filters

@ -49,7 +49,7 @@
</ClInclude>
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
ChannelRelay/ChannelRelay.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="ChannelRelay.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

2
ChannelRelay/ChannelRelay.vcxproj.filters

@ -28,7 +28,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
CoreCommands/CoreCommands.vcxproj

@ -76,7 +76,7 @@
<ClCompile Include="CoreCommands.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

2
CoreCommands/CoreCommands.vcxproj.filters

@ -18,7 +18,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
ExtraCommands/ExtraCommands.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="ExtraCommands.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

2
ExtraCommands/ExtraCommands.vcxproj.filters

@ -18,7 +18,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
FunCommands/FunCommands.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="FunCommands.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

2
FunCommands/FunCommands.vcxproj.filters

@ -18,7 +18,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
HTTPServer/HTTPServer.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="HTTPServer.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

2
HTTPServer/HTTPServer.vcxproj.filters

@ -18,7 +18,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
IRC.Core/IRC.Core.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="IRC_Core.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

2
IRC.Core/IRC.Core.vcxproj.filters

@ -28,7 +28,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
Jupiter

@ -1 +1 @@
Subproject commit 0963bf950533632a26f266f2f8575dc4344f22d8
Subproject commit ae3294c72b799178bc79b312fe43f34c28deca86

2
Plugin.Example/Plugin.Example.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="Example.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

2
Plugin.Example/Plugin.Example.vcxproj.filters

@ -28,7 +28,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
Plugin.Template/Plugin.Template.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="Example.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

2
Plugin.Template/Plugin.Template.vcxproj.filters

@ -28,7 +28,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
PluginManager/PluginManager.vcxproj

@ -76,7 +76,7 @@
<ClCompile Include="PluginManager.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

2
PluginManager/PluginManager.vcxproj.filters

@ -18,7 +18,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
RenX.AlwaysRecord/RenX.AlwaysRecord.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="RenX_AlwaysRecord.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
<Library Include="..\Release\Plugins\RenX.Core.lib" />
</ItemGroup>

2
RenX.AlwaysRecord/RenX.AlwaysRecord.vcxproj.filters

@ -31,7 +31,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
RenX.Announcements/RenX.Announcements.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="RenX_Announcements.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
<Library Include="..\Release\Plugins\RenX.Core.lib" />
</ItemGroup>

2
RenX.Announcements/RenX.Announcements.vcxproj.filters

@ -21,7 +21,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
RenX.Commands/RenX.Commands.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="RenX_Commands.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
<Library Include="..\Release\Plugins\RenX.Core.lib">
<FileType>Document</FileType>

2
RenX.Commands/RenX.Commands.vcxproj.filters

@ -21,7 +21,7 @@
<Library Include="..\Release\Plugins\RenX.Core.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
RenX.Core/RenX.Core.vcxproj

@ -98,7 +98,7 @@
<ClCompile Include="RenX_Tags.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

2
RenX.Core/RenX.Core.vcxproj.filters

@ -18,7 +18,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
RenX.Core/RenX_Server.cpp

@ -1388,7 +1388,7 @@ void RenX::Server::processLine(const Jupiter::ReadableString &line)
RenX::PlayerInfo *player;
if (this->isSeamless() == false)
RenX::Server::wipePlayers();
this->wipePlayers();
else if (this->players.size() != 0)
{
for (Jupiter::DLList<RenX::PlayerInfo>::Node *n = this->players.getNode(0); n != nullptr; n = n->next)

2
RenX.ExcessiveHeadshots/RenX.ExcessiveHeadshots.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="ExcessiveHeadshots.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
<Library Include="..\Release\Plugins\RenX.Core.lib" />
</ItemGroup>

2
RenX.ExcessiveHeadshots/RenX.ExcessiveHeadshots.vcxproj.filters

@ -21,7 +21,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
RenX.ExtraLogging/RenX.ExtraLogging.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="RenX_ExtraLogging.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
<Library Include="..\Release\Plugins\RenX.Core.lib" />
</ItemGroup>

2
RenX.ExtraLogging/RenX.ExtraLogging.vcxproj.filters

@ -21,7 +21,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
RenX.Greetings/RenX.Greetings.vcxproj

@ -76,7 +76,7 @@
<ClCompile Include="RenX_Greetings.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
<Library Include="..\Release\Plugins\RenX.Core.lib" />
</ItemGroup>

2
RenX.Greetings/RenX.Greetings.vcxproj.filters

@ -21,7 +21,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
RenX.HybridUUID/RenX.HybridUUID.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="RenX_HybridUUID.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
<Library Include="..\Release\Plugins\RenX.Core.lib" />
</ItemGroup>

2
RenX.HybridUUID/RenX.HybridUUID.vcxproj.filters

@ -21,7 +21,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
RenX.IRCJoin/RenX.IRCJoin.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="RenX_IRCJoin.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
<Library Include="..\Release\Plugins\RenX.Core.lib" />
</ItemGroup>

2
RenX.IRCJoin/RenX.IRCJoin.vcxproj.filters

@ -21,7 +21,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
RenX.Ladder.All-Time/RenX.Ladder.All-Time.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="RenX_Ladder_All_Time.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
<Library Include="..\Release\Plugins\RenX.Core.lib" />
</ItemGroup>

2
RenX.Ladder.All-Time/RenX.Ladder.All-Time.vcxproj.filters

@ -21,7 +21,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
RenX.Ladder.Daily/RenX.Ladder.Daily.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="RenX_Ladder_Daily.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
<Library Include="..\Release\Plugins\RenX.Core.lib" />
</ItemGroup>

2
RenX.Ladder.Daily/RenX.Ladder.Daily.vcxproj.filters

@ -26,7 +26,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
RenX.Ladder.Monthly/RenX.Ladder.Monthly.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="RenX_Ladder_Monthly.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
<Library Include="..\Release\Plugins\RenX.Core.lib" />
</ItemGroup>

2
RenX.Ladder.Monthly/RenX.Ladder.Monthly.vcxproj.filters

@ -26,7 +26,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
RenX.Ladder.Web/RenX.Ladder.Web.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="RenX_Ladder_Web.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
<Library Include="..\Release\Plugins\HTTPServer.lib" />
<Library Include="..\Release\Plugins\RenX.Core.lib" />

2
RenX.Ladder.Web/RenX.Ladder.Web.vcxproj.filters

@ -31,7 +31,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Release\Plugins\HTTPServer.lib">

2
RenX.Ladder.Weekly/RenX.Ladder.Weekly.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="RenX_Ladder_Weekly.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
<Library Include="..\Release\Plugins\RenX.Core.lib" />
</ItemGroup>

2
RenX.Ladder.Weekly/RenX.Ladder.Weekly.vcxproj.filters

@ -26,7 +26,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
RenX.Ladder.Yearly/RenX.Ladder.Yearly.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="RenX_Ladder_Yearly.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
<Library Include="..\Release\Plugins\RenX.Core.lib" />
</ItemGroup>

2
RenX.Ladder.Yearly/RenX.Ladder.Yearly.vcxproj.filters

@ -26,7 +26,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
RenX.Ladder/RenX.Ladder.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="RenX_Ladder.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
<Library Include="..\Release\Plugins\RenX.Core.lib" />
</ItemGroup>

2
RenX.Ladder/RenX.Ladder.vcxproj.filters

@ -21,7 +21,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
RenX.Listen/RenX.Listen.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="RenX_Listen.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
<Library Include="..\Release\Plugins\RenX.Core.lib" />
</ItemGroup>

2
RenX.Listen/RenX.Listen.vcxproj.filters

@ -21,7 +21,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
RenX.Logging/RenX.Logging.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="RenX_Logging.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
<Library Include="..\Release\Plugins\RenX.Core.lib" />
</ItemGroup>

2
RenX.Logging/RenX.Logging.vcxproj.filters

@ -21,7 +21,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
RenX.Medals/RenX.Medals.vcxproj

@ -76,7 +76,7 @@
<ClCompile Include="RenX_Medals.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
<Library Include="..\Release\Plugins\RenX.Core.lib" />
</ItemGroup>

2
RenX.Medals/RenX.Medals.vcxproj.filters

@ -21,7 +21,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
RenX.MinPlayers/RenX.MinPlayers.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="RenX_MinPlayers.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
<Library Include="..\Release\Plugins\RenX.Core.lib" />
</ItemGroup>

2
RenX.MinPlayers/RenX.MinPlayers.vcxproj.filters

@ -31,7 +31,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
RenX.ModSystem/RenX.ModSystem.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="RenX_ModSystem.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
<Library Include="..\Release\Plugins\RenX.Core.lib" />
</ItemGroup>

2
RenX.ModSystem/RenX.ModSystem.vcxproj.filters

@ -21,7 +21,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

86
RenX.Net/RenX.Net.vcxproj

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{29C995BB-6A23-4704-BF8D-EA177D5FC7A5}</ProjectGuid>
<RootNamespace>RenX.Net</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)$(Configuration)\Plugins\</OutDir>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>../Bot;../Jupiter;../RenX.Core;../HTTPServer</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="RenX_Net.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="RenX_Net.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
<Library Include="..\Release\Plugins\HTTPServer.lib" />
<Library Include="..\Release\Plugins\RenX.Core.lib" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

41
RenX.Net/RenX.Net.vcxproj.filters

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="RenX_Net.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="RenX_Net.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Library Include="..\Release\Plugins\RenX.Core.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Release\Plugins\HTTPServer.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>
</Project>

274
RenX.Net/RenX_Net.cpp

@ -0,0 +1,274 @@
/**
* Copyright (C) 2016 Jessica James.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Written by Jessica James <jessica.aj@outlook.com>
*/
#include "RenX_Net.h"
using namespace Jupiter::literals;
constexpr ProductID RENEGADE_X = 0x01;
constexpr RequestID REQUEST_SERVER_LIST = 0x01; // version_number
constexpr RequestID REQUEST_SERVER_LIST_UPDATE = 0x02; // version_number, revision_id
constexpr RequestID REQUEST_SERVER_DATA = 0x03; // server_id
constexpr int REQUEST_SIZE_TABLE[] =
{
-1, // Invalid request
sizeof(int32_t), // REQUEST_SERVER_LIST
sizeof(int32_t) + sizeof(int32_t) // REQUEST_SERVER_LIST_UPDATE
// sizeof (int32_t) // REQUEST_SERVER_DATA
};
constexpr size_t minimum_request_size = REQUEST_SIZE_TABLE[REQUEST_SERVER_LIST]; // Size of smallest request
constexpr size_t maximum_request_size = REQUEST_SIZE_TABLE[REQUEST_SERVER_LIST_UPDATE]; // Size of largest request
// Size of packet header
constexpr size_t packet_header_size = sizeof(ProductID) + sizeof(RequestID);
constexpr int getRequestSize(RequestID in_request_id)
{
return in_request_id >= sizeof(REQUEST_SIZE_TABLE) / sizeof(int)
? -1 // Invalid request
: REQUEST_SIZE_TABLE[in_request_id];
}
/** Plugin initialization and destruction */
bool RenX_NetPlugin::initialize() //(const Jupiter::CStringType &bind_address, uint16_t bind_port, bool &out_success, std::chrono::milliseconds in_timeout_period)
{
m_timeout_period = std::chrono::milliseconds(this->config.getLongLong(Jupiter::ReferenceString::empty, "TimeoutPeriod"_jrs, 10000));
if (m_server_socket.bind(Jupiter::CStringS(this->config.get(Jupiter::ReferenceString::empty, "Address"_jrs)).c_str(), this->config.getInt(Jupiter::ReferenceString::empty, "Port"_jrs, 21338), true) == false)
return false;
m_server_socket.setBlocking(false);
return true;
}
RenX_NetPlugin::~RenX_NetPlugin()
{
m_server_socket.close();
}
int RenX_NetPlugin::OnRehash()
{
Jupiter::Plugin::OnRehash();
return 0;
}
/** Server List functions */
void RenX_NetPlugin::assignServerIDs()
{
}
void RenX_NetPlugin::addServerToServerList(RenX::Server *server)
{
}
void RenX_NetPlugin::updateServerList()
{
}
/** Client processing */
void RenX_NetPlugin::process_request(RenX_NetPlugin::Client &client)
{
size_t index;
const uint32_t *request_params;
ServerList *list;
request_params = reinterpret_cast<const uint32_t *>(client.m_request_buffer.ptr());
switch (client.m_request_id)
{
case REQUEST_SERVER_LIST:
index = 0;
if (m_server_list.size() != 0)
{
while (index != m_server_list.size())
{
list = m_server_list.get(index);
if (list->version_number == *request_params)
{
client.sock.send(list->data);
break;
}
if (++index == m_server_list.size())
{
// Version not found
break;
}
}
}
// else // m_server_list not initialized correctly (misconfiguration)
break;
default: // Invalid request. Reset timeout to destroy on next loop.
client.timeout = std::chrono::steady_clock::now();
break;
}
client.sock.shutdown();
}
int RenX_NetPlugin::think()
{
RenX_NetPlugin::Client *client;
Jupiter::Socket *sock;
int request_packet_size;
Jupiter::DLList<RenX_NetPlugin::Client>::Node *node;
Jupiter::DLList<RenX_NetPlugin::Client>::Node *tmp;
// handle new clients
while ((sock = m_server_socket.accept()) != nullptr)
{
sock->setBlocking(false);
request_packet_size = sock->peek();
if (request_packet_size > maximum_request_packet_size // This is larger than expected (invalid) request. Toss the socket.
|| (request_packet_size <= 0 && sock->getLastError() != 10035)) // Error!
delete sock;
else
{
client = new RenX_NetPlugin::Client();
client->sock = std::move(*sock);
client->timeout = std::chrono::steady_clock::now() + m_timeout_period;
if (request_packet_size == expected_request_packet_size) // we have a full request
{
process_request(*client);
m_clients_pending_close.add(client);
}
else // request is not complete; toss it to further processing
m_clients_processing.add(client);
}
}
// check processing clients for remainder of data; timeout as necessary
if (m_clients_processing.size() != 0)
{
node = m_clients_processing.getNode(0);
while (node != nullptr)
{
client = node->data;
request_packet_size = client->sock.peek();
if (request_packet_size == expected_request_packet_size) // Full request
{
process_request(*client);
tmp = node;
node = node->next;
m_clients_processing.remove(tmp);
client->timeout = std::chrono::steady_clock::now() + m_timeout_period;
m_clients_pending_close.add(client);
}
else if (request_packet_size > expected_request_packet_size // Invalid request
|| client->timeout <= std::chrono::steady_clock::now() // Incomplete request & timed out
|| (request_packet_size <= 0 && client->sock.getLastError() != 10035)) // Error!
{
client->sock.close();
tmp = node;
node = node->next;
delete m_clients_processing.remove(tmp);
}
else // Incomplete request
node = node->next;
}
}
// check old clients for clean close; timeout as necessary
if (m_clients_pending_close.size() != 0)
{
node = m_clients_pending_close.getNode(0);
while (node != nullptr)
{
client = node->data;
request_packet_size = client->sock.recv();
if (request_packet_size == 0 // Shutdown successfully
|| (request_packet_size < 0 && client->sock.getLastError() != 10035) // Error!
|| client->timeout <= std::chrono::steady_clock::now()) // Timeout
{
client->sock.close();
tmp = node;
node = node->next;
delete m_clients_pending_close.remove(tmp);
}
else // Still pending; go to next
node = node->next;
}
}
return 0;
}
/** Events */
void RenX_NetPlugin::RenX_OnServerFullyConnected(RenX::Server *server)
{
if (++m_server_id == 0) // Overflow; this will actually invalidate the results of any previous server list
this->assignServerIDs();
else
server->varData.set(this->getName(), "i"_jrs, Jupiter::ReferenceString(reinterpret_cast<const char *>(&m_server_id), sizeof(m_server_id)));
// Server added; append
this->addServerToServerList(server);
}
void RenX_NetPlugin::RenX_OnServerDisconnect(RenX::Server *server, RenX::DisconnectReason reason)
{
// Server removed; update
this->updateServerList();
}
void RenX_NetPlugin::RenX_OnJoin(RenX::Server *server, const RenX::PlayerInfo *player)
{
// User count changed; update
this->updateServerList();
}
void RenX_NetPlugin::RenX_OnPart(RenX::Server *server, const RenX::PlayerInfo *player)
{
// User count changed; update
this->updateServerList();
}
void RenX_NetPlugin::RenX_OnMapLoad(RenX::Server *server, const Jupiter::ReadableString &map)
{
// Level name changed; update
this->updateServerList();
}
// Plugin instantiation and entry point.
RenX_NetPlugin pluginInstance;
extern "C" __declspec(dllexport) Jupiter::Plugin *getPlugin()
{
return &pluginInstance;
}

93
RenX.Net/RenX_Net.h

@ -0,0 +1,93 @@
/**
* Copyright (C) 2016 Jessica James.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Written by Jessica James <jessica.aj@outlook.com>
*/
#if !defined _RENX_NET_GAME_H_HEADER
#define _RENX_NET_GAME_H_HEADER
#include <chrono>
#include "Jupiter/Thinker.h"
#include "Jupiter/CString.h"
#include "Jupiter/TCPSocket.h"
#include "Jupiter/DLList.h"
#include "Jupiter/ArrayList.h"
#include "RenX_Plugin.h"
#include "RenX_Server.h"
typedef uint8_t ProductID;
typedef uint8_t RequestID;
typedef uint32_t ServerID;
class RenX_NetPlugin : public RenX::Plugin
{
public:
struct Client
{
Jupiter::Socket sock;
std::chrono::steady_clock::time_point timeout;
ProductID m_product_id;
RequestID m_request_id;
Jupiter::String m_request_buffer;
};
struct ServerList
{
uint32_t version_number = 0;
uint32_t revision_id = 0;
Jupiter::String data;
Jupiter::ArrayList<RenX::Server> servers;
};
void assignServerIDs();
void addServerToServerList(RenX::Server *server);
void updateServerList();
~RenX_NetPlugin();
public: // Jupiter::Plugin
virtual bool initialize() override;
int OnRehash() override;
int think() override;
public: // RenX::Plugin
void RenX_OnServerFullyConnected(RenX::Server *server) override;
void RenX_OnServerDisconnect(RenX::Server *server, RenX::DisconnectReason reason) override;
void RenX_OnJoin(RenX::Server *server, const RenX::PlayerInfo *player) override;
void RenX_OnPart(RenX::Server *server, const RenX::PlayerInfo *player) override;
void RenX_OnMapLoad(RenX::Server *server, const Jupiter::ReadableString &map) override;
private:
void process_request(Client &client);
std::chrono::milliseconds m_ping_frequency;
std::chrono::milliseconds m_ping_timeout;
Jupiter::TCPSocket m_server_socket;
Jupiter::DLList<Client> m_clients;
Jupiter::DLList<Client> m_clients_pending_close;
uint32_t m_server_id;
uint32_t m_min_server_version;
uint32_t m_max_server_version;
Jupiter::ArrayList<ServerList> m_server_list;
};
#endif // _RENX_SERVERLIST_GAME_H_HEADER

2
RenX.NicknameUUID/RenX.NicknameUUID.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="RenX_NicknameUUID.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
<Library Include="..\Release\Plugins\RenX.Core.lib" />
</ItemGroup>

2
RenX.NicknameUUID/RenX.NicknameUUID.vcxproj.filters

@ -21,7 +21,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
RenX.Plugin.Template/RenX.Plugin.Template.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="Example.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
<Library Include="..\Release\Plugins\RenX.Core.lib" />
</ItemGroup>

2
RenX.Plugin.Template/RenX.Plugin.Template.vcxproj.filters

@ -31,7 +31,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
RenX.ServerList/RenX.ServerList.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="RenX_ServerList.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
<Library Include="..\Release\Plugins\HTTPServer.lib" />
<Library Include="..\Release\Plugins\RenX.Core.lib" />

2
RenX.ServerList/RenX.ServerList.vcxproj.filters

@ -31,7 +31,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Release\Plugins\HTTPServer.lib">

2
RenX.SetJoin/RenX.SetJoin.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="RenX_SetJoin.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
<Library Include="..\Release\Plugins\RenX.Core.lib" />
</ItemGroup>

2
RenX.SetJoin/RenX.SetJoin.vcxproj.filters

@ -21,7 +21,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
RenX.Warn/RenX.Warn.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="RenX_Warn.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
<Library Include="..\Release\Plugins\RenX.Core.lib" />
</ItemGroup>

2
RenX.Warn/RenX.Warn.vcxproj.filters

@ -21,7 +21,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

2
SetJoin/SetJoin.vcxproj

@ -75,7 +75,7 @@
<ClCompile Include="SetJoin.cpp" />
</ItemGroup>
<ItemGroup>
<Library Include="..\Jupiter\Release\Jupiter.lib" />
<Library Include="..\Release\Jupiter.lib" />
<Library Include="..\Release\Bot.lib" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

2
SetJoin/SetJoin.vcxproj.filters

@ -18,7 +18,7 @@
<Library Include="..\Release\Bot.lib">
<Filter>Resource Files</Filter>
</Library>
<Library Include="..\Jupiter\Release\Jupiter.lib">
<Library Include="..\Release\Jupiter.lib">
<Filter>Resource Files</Filter>
</Library>
</ItemGroup>

Loading…
Cancel
Save