steam-condenser 1.3.8.1 → 1.3.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (476) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/Gemfile +1 -1
  4. data/Gemfile.lock +48 -0
  5. data/doc/A2M_GET_SERVERS_BATCH2_Packet.html +1 -1
  6. data/doc/A2S_INFO_Packet.html +1 -1
  7. data/doc/A2S_PLAYER_Packet.html +1 -1
  8. data/doc/A2S_RULES_Packet.html +1 -1
  9. data/doc/A2S_SERVERQUERY_GETCHALLENGE_Packet.html +1 -1
  10. data/doc/AbstractL4DStats.html +1 -1
  11. data/doc/AbstractL4DWeapon.html +1 -1
  12. data/doc/AlienSwarmMission.html +1 -1
  13. data/doc/AlienSwarmStats.html +1 -1
  14. data/doc/AlienSwarmWeapon.html +1 -1
  15. data/doc/AppNews.html +1 -1
  16. data/doc/C2M_CHECKMD5_Packet.html +1 -1
  17. data/doc/CSSMap.html +1 -1
  18. data/doc/CSSStats.html +1 -1
  19. data/doc/CSSWeapon.html +1 -1
  20. data/doc/Cacheable.html +1 -1
  21. data/doc/Cacheable/ClassMethods.html +1 -1
  22. data/doc/DefenseGridStats.html +1 -1
  23. data/doc/DoDSClass.html +1 -1
  24. data/doc/DoDSStats.html +1 -1
  25. data/doc/DoDSWeapon.html +1 -1
  26. data/doc/Dota2BetaInventory.html +1 -1
  27. data/doc/Dota2Inventory.html +1 -1
  28. data/doc/Dota2Item.html +1 -1
  29. data/doc/GameAchievement.html +1 -1
  30. data/doc/GameClass.html +1 -1
  31. data/doc/GameInventory.html +1 -1
  32. data/doc/GameItem.html +1 -1
  33. data/doc/GameItemSchema.html +1 -1
  34. data/doc/GameLeaderboard.html +1 -1
  35. data/doc/GameLeaderboardEntry.html +1 -1
  36. data/doc/GameServer.html +1 -1
  37. data/doc/GameStats.html +1 -1
  38. data/doc/GameWeapon.html +1 -1
  39. data/doc/GoldSrcServer.html +1 -1
  40. data/doc/GoldSrcSocket.html +1 -1
  41. data/doc/L4D2Map.html +1 -1
  42. data/doc/L4D2Stats.html +1 -1
  43. data/doc/L4D2Weapon.html +1 -1
  44. data/doc/L4DExplosive.html +1 -1
  45. data/doc/L4DMap.html +1 -1
  46. data/doc/L4DStats.html +1 -1
  47. data/doc/L4DWeapon.html +1 -1
  48. data/doc/M2A_SERVER_BATCH_Packet.html +1 -1
  49. data/doc/M2C_ISVALIDMD5_Packet.html +1 -1
  50. data/doc/M2S_REQUESTRESTART_Packet.html +1 -1
  51. data/doc/MasterServer.html +1 -1
  52. data/doc/MasterServerSocket.html +1 -1
  53. data/doc/PacketFormatError.html +1 -1
  54. data/doc/Portal2Inventory.html +1 -1
  55. data/doc/Portal2Item.html +1 -1
  56. data/doc/Portal2Stats.html +1 -1
  57. data/doc/RCONAuthRequest.html +1 -1
  58. data/doc/RCONAuthResponse.html +1 -1
  59. data/doc/RCONBanError.html +1 -1
  60. data/doc/RCONExecRequest.html +1 -1
  61. data/doc/RCONExecResponse.html +1 -1
  62. data/doc/RCONGoldSrcRequest.html +1 -1
  63. data/doc/RCONGoldSrcResponse.html +1 -1
  64. data/doc/RCONNoAuthError.html +1 -1
  65. data/doc/RCONPacket.html +1 -1
  66. data/doc/RCONPacketFactory.html +1 -1
  67. data/doc/RCONSocket.html +13 -5
  68. data/doc/RCONTerminator.html +1 -1
  69. data/doc/RequestWithChallenge.html +1 -1
  70. data/doc/S2A_INFO2_Packet.html +1 -1
  71. data/doc/S2A_INFO_BasePacket.html +1 -1
  72. data/doc/S2A_INFO_DETAILED_Packet.html +1 -1
  73. data/doc/S2A_LOGSTRING_Packet.html +1 -1
  74. data/doc/S2A_PLAYER_Packet.html +1 -1
  75. data/doc/S2A_RULES_Packet.html +1 -1
  76. data/doc/S2C_CHALLENGE_Packet.html +1 -1
  77. data/doc/S2M_HEARTBEAT2_Packet.html +1 -1
  78. data/doc/Server.html +1 -1
  79. data/doc/SourceServer.html +33 -34
  80. data/doc/SourceSocket.html +1 -1
  81. data/doc/SteamCondenser.html +2 -2
  82. data/doc/SteamCondenser/Community.html +1 -1
  83. data/doc/SteamCondenser/Servers.html +1 -1
  84. data/doc/SteamCondenser/TimeoutError.html +1 -1
  85. data/doc/SteamCondenserError.html +1 -1
  86. data/doc/SteamGame.html +1 -1
  87. data/doc/SteamGroup.html +1 -1
  88. data/doc/SteamId.html +1 -1
  89. data/doc/SteamPacket.html +1 -1
  90. data/doc/SteamPacketFactory.html +1 -1
  91. data/doc/SteamPlayer.html +1 -1
  92. data/doc/SteamSocket.html +1 -1
  93. data/doc/StringIO.html +1 -1
  94. data/doc/TF2BetaInventory.html +1 -1
  95. data/doc/TF2Class.html +1 -1
  96. data/doc/TF2ClassFactory.html +1 -1
  97. data/doc/TF2Engineer.html +1 -1
  98. data/doc/TF2GoldenWrench.html +1 -1
  99. data/doc/TF2Inventory.html +1 -1
  100. data/doc/TF2Item.html +1 -1
  101. data/doc/TF2Medic.html +1 -1
  102. data/doc/TF2Sniper.html +1 -1
  103. data/doc/TF2Spy.html +1 -1
  104. data/doc/TF2Stats.html +1 -1
  105. data/doc/WebApi.html +1 -1
  106. data/doc/WebApiError.html +1 -1
  107. data/doc/XMLData.html +1 -1
  108. data/doc/_index.html +1 -1
  109. data/doc/file.CHANGELOG.html +20 -1
  110. data/doc/file.CONTRIBUTING.html +1 -1
  111. data/doc/file.LICENSE.html +1 -1
  112. data/doc/file.README.html +1 -1
  113. data/doc/index.html +1 -1
  114. data/doc/top-level-namespace.html +1 -1
  115. data/lib/steam-condenser/version.rb +2 -2
  116. data/lib/steam/servers/source_server.rb +13 -20
  117. data/lib/steam/sockets/rcon_socket.rb +7 -3
  118. data/pkg/steam-condenser-1.3.8.1.gem +0 -0
  119. data/pkg/steam-condenser-1.3.8.1/CHANGELOG.md +233 -0
  120. data/pkg/steam-condenser-1.3.8.1/CONTRIBUTING.md +59 -0
  121. data/pkg/steam-condenser-1.3.8.1/Gemfile +11 -0
  122. data/pkg/steam-condenser-1.3.8.1/LICENSE +25 -0
  123. data/pkg/steam-condenser-1.3.8.1/README.md +75 -0
  124. data/pkg/steam-condenser-1.3.8.1/Rakefile +46 -0
  125. data/pkg/steam-condenser-1.3.8.1/doc/A2M_GET_SERVERS_BATCH2_Packet.html +446 -0
  126. data/pkg/steam-condenser-1.3.8.1/doc/A2S_INFO_Packet.html +264 -0
  127. data/pkg/steam-condenser-1.3.8.1/doc/A2S_PLAYER_Packet.html +300 -0
  128. data/pkg/steam-condenser-1.3.8.1/doc/A2S_RULES_Packet.html +302 -0
  129. data/pkg/steam-condenser-1.3.8.1/doc/A2S_SERVERQUERY_GETCHALLENGE_Packet.html +266 -0
  130. data/pkg/steam-condenser-1.3.8.1/doc/AbstractL4DStats.html +1033 -0
  131. data/pkg/steam-condenser-1.3.8.1/doc/AbstractL4DWeapon.html +752 -0
  132. data/pkg/steam-condenser-1.3.8.1/doc/AlienSwarmMission.html +1598 -0
  133. data/pkg/steam-condenser-1.3.8.1/doc/AlienSwarmStats.html +1035 -0
  134. data/pkg/steam-condenser-1.3.8.1/doc/AlienSwarmWeapon.html +653 -0
  135. data/pkg/steam-condenser-1.3.8.1/doc/AppNews.html +1489 -0
  136. data/pkg/steam-condenser-1.3.8.1/doc/C2M_CHECKMD5_Packet.html +347 -0
  137. data/pkg/steam-condenser-1.3.8.1/doc/CSSMap.html +824 -0
  138. data/pkg/steam-condenser-1.3.8.1/doc/CSSStats.html +888 -0
  139. data/pkg/steam-condenser-1.3.8.1/doc/CSSWeapon.html +910 -0
  140. data/pkg/steam-condenser-1.3.8.1/doc/Cacheable.html +942 -0
  141. data/pkg/steam-condenser-1.3.8.1/doc/Cacheable/ClassMethods.html +721 -0
  142. data/pkg/steam-condenser-1.3.8.1/doc/DefenseGridStats.html +2659 -0
  143. data/pkg/steam-condenser-1.3.8.1/doc/DoDSClass.html +1291 -0
  144. data/pkg/steam-condenser-1.3.8.1/doc/DoDSStats.html +537 -0
  145. data/pkg/steam-condenser-1.3.8.1/doc/DoDSWeapon.html +824 -0
  146. data/pkg/steam-condenser-1.3.8.1/doc/Dota2BetaInventory.html +363 -0
  147. data/pkg/steam-condenser-1.3.8.1/doc/Dota2Inventory.html +363 -0
  148. data/pkg/steam-condenser-1.3.8.1/doc/Dota2Item.html +396 -0
  149. data/pkg/steam-condenser-1.3.8.1/doc/GameAchievement.html +1292 -0
  150. data/pkg/steam-condenser-1.3.8.1/doc/GameClass.html +328 -0
  151. data/pkg/steam-condenser-1.3.8.1/doc/GameInventory.html +1512 -0
  152. data/pkg/steam-condenser-1.3.8.1/doc/GameItem.html +1926 -0
  153. data/pkg/steam-condenser-1.3.8.1/doc/GameItemSchema.html +1477 -0
  154. data/pkg/steam-condenser-1.3.8.1/doc/GameLeaderboard.html +1741 -0
  155. data/pkg/steam-condenser-1.3.8.1/doc/GameLeaderboardEntry.html +642 -0
  156. data/pkg/steam-condenser-1.3.8.1/doc/GameServer.html +2495 -0
  157. data/pkg/steam-condenser-1.3.8.1/doc/GameStats.html +1501 -0
  158. data/pkg/steam-condenser-1.3.8.1/doc/GameWeapon.html +603 -0
  159. data/pkg/steam-condenser-1.3.8.1/doc/GoldSrcServer.html +766 -0
  160. data/pkg/steam-condenser-1.3.8.1/doc/GoldSrcSocket.html +874 -0
  161. data/pkg/steam-condenser-1.3.8.1/doc/L4D2Map.html +758 -0
  162. data/pkg/steam-condenser-1.3.8.1/doc/L4D2Stats.html +1020 -0
  163. data/pkg/steam-condenser-1.3.8.1/doc/L4D2Weapon.html +496 -0
  164. data/pkg/steam-condenser-1.3.8.1/doc/L4DExplosive.html +383 -0
  165. data/pkg/steam-condenser-1.3.8.1/doc/L4DMap.html +789 -0
  166. data/pkg/steam-condenser-1.3.8.1/doc/L4DStats.html +579 -0
  167. data/pkg/steam-condenser-1.3.8.1/doc/L4DWeapon.html +302 -0
  168. data/pkg/steam-condenser-1.3.8.1/doc/M2A_SERVER_BATCH_Packet.html +439 -0
  169. data/pkg/steam-condenser-1.3.8.1/doc/M2C_ISVALIDMD5_Packet.html +390 -0
  170. data/pkg/steam-condenser-1.3.8.1/doc/M2S_REQUESTRESTART_Packet.html +390 -0
  171. data/pkg/steam-condenser-1.3.8.1/doc/MasterServer.html +1104 -0
  172. data/pkg/steam-condenser-1.3.8.1/doc/MasterServerSocket.html +300 -0
  173. data/pkg/steam-condenser-1.3.8.1/doc/PacketFormatError.html +176 -0
  174. data/pkg/steam-condenser-1.3.8.1/doc/Portal2Inventory.html +363 -0
  175. data/pkg/steam-condenser-1.3.8.1/doc/Portal2Item.html +616 -0
  176. data/pkg/steam-condenser-1.3.8.1/doc/Portal2Stats.html +413 -0
  177. data/pkg/steam-condenser-1.3.8.1/doc/RCONAuthRequest.html +325 -0
  178. data/pkg/steam-condenser-1.3.8.1/doc/RCONAuthResponse.html +312 -0
  179. data/pkg/steam-condenser-1.3.8.1/doc/RCONBanError.html +257 -0
  180. data/pkg/steam-condenser-1.3.8.1/doc/RCONExecRequest.html +325 -0
  181. data/pkg/steam-condenser-1.3.8.1/doc/RCONExecResponse.html +416 -0
  182. data/pkg/steam-condenser-1.3.8.1/doc/RCONGoldSrcRequest.html +369 -0
  183. data/pkg/steam-condenser-1.3.8.1/doc/RCONGoldSrcResponse.html +375 -0
  184. data/pkg/steam-condenser-1.3.8.1/doc/RCONNoAuthError.html +256 -0
  185. data/pkg/steam-condenser-1.3.8.1/doc/RCONPacket.html +561 -0
  186. data/pkg/steam-condenser-1.3.8.1/doc/RCONPacketFactory.html +308 -0
  187. data/pkg/steam-condenser-1.3.8.1/doc/RCONSocket.html +725 -0
  188. data/pkg/steam-condenser-1.3.8.1/doc/RCONTerminator.html +312 -0
  189. data/pkg/steam-condenser-1.3.8.1/doc/RequestWithChallenge.html +238 -0
  190. data/pkg/steam-condenser-1.3.8.1/doc/S2A_INFO2_Packet.html +417 -0
  191. data/pkg/steam-condenser-1.3.8.1/doc/S2A_INFO_BasePacket.html +271 -0
  192. data/pkg/steam-condenser-1.3.8.1/doc/S2A_INFO_DETAILED_Packet.html +378 -0
  193. data/pkg/steam-condenser-1.3.8.1/doc/S2A_LOGSTRING_Packet.html +379 -0
  194. data/pkg/steam-condenser-1.3.8.1/doc/S2A_PLAYER_Packet.html +424 -0
  195. data/pkg/steam-condenser-1.3.8.1/doc/S2A_RULES_Packet.html +418 -0
  196. data/pkg/steam-condenser-1.3.8.1/doc/S2C_CHALLENGE_Packet.html +378 -0
  197. data/pkg/steam-condenser-1.3.8.1/doc/S2M_HEARTBEAT2_Packet.html +455 -0
  198. data/pkg/steam-condenser-1.3.8.1/doc/Server.html +886 -0
  199. data/pkg/steam-condenser-1.3.8.1/doc/SourceServer.html +920 -0
  200. data/pkg/steam-condenser-1.3.8.1/doc/SourceSocket.html +359 -0
  201. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser.html +157 -0
  202. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community.html +138 -0
  203. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/AbstractL4DStats.html +1026 -0
  204. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/AbstractL4DWeapon.html +749 -0
  205. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/AlienSwarmMission.html +1557 -0
  206. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/AlienSwarmStats.html +1013 -0
  207. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/AlienSwarmWeapon.html +641 -0
  208. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/AppNews.html +1441 -0
  209. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/CSSMap.html +805 -0
  210. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/CSSStats.html +866 -0
  211. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/CSSWeapon.html +889 -0
  212. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/Cacheable.html +911 -0
  213. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/Cacheable/ClassMethods.html +695 -0
  214. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/DefenseGridStats.html +2593 -0
  215. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/DoDSClass.html +1263 -0
  216. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/DoDSStats.html +520 -0
  217. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/DoDSWeapon.html +803 -0
  218. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/Dota2BetaInventory.html +354 -0
  219. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/Dota2Inventory.html +354 -0
  220. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/Dota2Item.html +388 -0
  221. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/Dota2Match.html +505 -0
  222. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/GameAchievement.html +1100 -0
  223. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/GameClass.html +321 -0
  224. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/GameInventory.html +1469 -0
  225. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/GameItem.html +1900 -0
  226. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/GameItemSchema.html +1444 -0
  227. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/GameLeaderboard.html +1707 -0
  228. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/GameLeaderboardEntry.html +630 -0
  229. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/GameStats.html +1461 -0
  230. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/GameStatsSchema.html +771 -0
  231. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/GameStatsValue.html +596 -0
  232. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/GameStatsValue/Instance.html +262 -0
  233. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/GameWeapon.html +608 -0
  234. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/L4D2Map.html +737 -0
  235. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/L4D2Stats.html +989 -0
  236. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/L4D2Weapon.html +486 -0
  237. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/L4DExplosive.html +375 -0
  238. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/L4DMap.html +775 -0
  239. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/L4DStats.html +564 -0
  240. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/L4DWeapon.html +296 -0
  241. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/Portal2Inventory.html +354 -0
  242. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/Portal2Item.html +603 -0
  243. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/Portal2Stats.html +400 -0
  244. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/SteamGame.html +1862 -0
  245. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/SteamGroup.html +1018 -0
  246. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/SteamId.html +4430 -0
  247. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/TF2BetaInventory.html +345 -0
  248. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/TF2Class.html +1186 -0
  249. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/TF2ClassFactory.html +273 -0
  250. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/TF2Engineer.html +555 -0
  251. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/TF2GoldenWrench.html +760 -0
  252. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/TF2Inventory.html +354 -0
  253. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/TF2Item.html +602 -0
  254. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/TF2Medic.html +463 -0
  255. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/TF2Sniper.html +372 -0
  256. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/TF2Spy.html +553 -0
  257. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/TF2Stats.html +728 -0
  258. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/UserStats.html +760 -0
  259. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/WebApi.html +1116 -0
  260. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Community/XMLData.html +274 -0
  261. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Error.html +380 -0
  262. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Error/PacketFormat.html +173 -0
  263. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Error/RCONBan.html +253 -0
  264. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Error/RCONNoAuth.html +252 -0
  265. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Error/Timeout.html +254 -0
  266. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Error/WebApi.html +354 -0
  267. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Logging.html +616 -0
  268. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers.html +137 -0
  269. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/BaseServer.html +870 -0
  270. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/GameServer.html +2428 -0
  271. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/GoldSrcServer.html +738 -0
  272. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/MasterServer.html +819 -0
  273. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Packets.html +132 -0
  274. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Packets/A2M_GET_SERVERS_BATCH2_Packet.html +427 -0
  275. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Packets/A2S_INFO_Packet.html +260 -0
  276. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Packets/A2S_PLAYER_Packet.html +295 -0
  277. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Packets/A2S_RULES_Packet.html +296 -0
  278. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Packets/A2S_SERVERQUERY_GETCHALLENGE_Packet.html +261 -0
  279. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Packets/BasePacket.html +462 -0
  280. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Packets/M2A_SERVER_BATCH_Packet.html +430 -0
  281. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Packets/RCON.html +119 -0
  282. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Packets/RCON/BasePacket.html +564 -0
  283. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Packets/RCON/RCONAuthRequest.html +317 -0
  284. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Packets/RCON/RCONAuthResponse.html +305 -0
  285. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Packets/RCON/RCONExecRequest.html +317 -0
  286. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Packets/RCON/RCONExecResponse.html +406 -0
  287. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Packets/RCON/RCONGoldSrcRequest.html +363 -0
  288. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Packets/RCON/RCONGoldSrcResponse.html +368 -0
  289. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Packets/RCON/RCONPacketFactory.html +302 -0
  290. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Packets/RCON/RCONTerminator.html +304 -0
  291. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Packets/RequestWithChallenge.html +233 -0
  292. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Packets/S2A_INFO2_Packet.html +416 -0
  293. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Packets/S2A_INFO_BasePacket.html +266 -0
  294. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Packets/S2A_INFO_DETAILED_Packet.html +371 -0
  295. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Packets/S2A_LOGSTRING_Packet.html +373 -0
  296. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Packets/S2A_PLAYER_Packet.html +417 -0
  297. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Packets/S2A_RULES_Packet.html +411 -0
  298. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Packets/S2C_CHALLENGE_Packet.html +370 -0
  299. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Packets/SteamPacketFactory.html +532 -0
  300. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Sockets.html +119 -0
  301. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Sockets/BaseSocket.html +733 -0
  302. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Sockets/GoldSrcSocket.html +862 -0
  303. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Sockets/MasterServerSocket.html +306 -0
  304. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Sockets/RCONSocket.html +709 -0
  305. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/Sockets/SourceSocket.html +367 -0
  306. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/SourceServer.html +892 -0
  307. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/Servers/SteamPlayer.html +1764 -0
  308. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenser/TimeoutError.html +260 -0
  309. data/pkg/steam-condenser-1.3.8.1/doc/SteamCondenserError.html +378 -0
  310. data/pkg/steam-condenser-1.3.8.1/doc/SteamGame.html +2001 -0
  311. data/pkg/steam-condenser-1.3.8.1/doc/SteamGroup.html +1587 -0
  312. data/pkg/steam-condenser-1.3.8.1/doc/SteamId.html +4428 -0
  313. data/pkg/steam-condenser-1.3.8.1/doc/SteamPacket.html +457 -0
  314. data/pkg/steam-condenser-1.3.8.1/doc/SteamPacketFactory.html +574 -0
  315. data/pkg/steam-condenser-1.3.8.1/doc/SteamPlayer.html +1808 -0
  316. data/pkg/steam-condenser-1.3.8.1/doc/SteamSocket.html +728 -0
  317. data/pkg/steam-condenser-1.3.8.1/doc/StringIO.html +986 -0
  318. data/pkg/steam-condenser-1.3.8.1/doc/TF2BetaInventory.html +338 -0
  319. data/pkg/steam-condenser-1.3.8.1/doc/TF2Class.html +1228 -0
  320. data/pkg/steam-condenser-1.3.8.1/doc/TF2ClassFactory.html +281 -0
  321. data/pkg/steam-condenser-1.3.8.1/doc/TF2Engineer.html +572 -0
  322. data/pkg/steam-condenser-1.3.8.1/doc/TF2GoldenWrench.html +776 -0
  323. data/pkg/steam-condenser-1.3.8.1/doc/TF2Inventory.html +363 -0
  324. data/pkg/steam-condenser-1.3.8.1/doc/TF2Item.html +617 -0
  325. data/pkg/steam-condenser-1.3.8.1/doc/TF2Medic.html +476 -0
  326. data/pkg/steam-condenser-1.3.8.1/doc/TF2Sniper.html +381 -0
  327. data/pkg/steam-condenser-1.3.8.1/doc/TF2Spy.html +567 -0
  328. data/pkg/steam-condenser-1.3.8.1/doc/TF2Stats.html +751 -0
  329. data/pkg/steam-condenser-1.3.8.1/doc/WebApi.html +1156 -0
  330. data/pkg/steam-condenser-1.3.8.1/doc/WebApiError.html +375 -0
  331. data/pkg/steam-condenser-1.3.8.1/doc/XMLData.html +280 -0
  332. data/pkg/steam-condenser-1.3.8.1/doc/_index.html +728 -0
  333. data/pkg/steam-condenser-1.3.8.1/doc/class_list.html +54 -0
  334. data/pkg/steam-condenser-1.3.8.1/doc/css/common.css +1 -0
  335. data/pkg/steam-condenser-1.3.8.1/doc/css/full_list.css +57 -0
  336. data/pkg/steam-condenser-1.3.8.1/doc/css/style.css +338 -0
  337. data/pkg/steam-condenser-1.3.8.1/doc/file.CHANGELOG.html +472 -0
  338. data/pkg/steam-condenser-1.3.8.1/doc/file.CONTRIBUTING.html +156 -0
  339. data/pkg/steam-condenser-1.3.8.1/doc/file.LICENSE.html +118 -0
  340. data/pkg/steam-condenser-1.3.8.1/doc/file.README.html +179 -0
  341. data/pkg/steam-condenser-1.3.8.1/doc/file_list.html +65 -0
  342. data/pkg/steam-condenser-1.3.8.1/doc/frames.html +26 -0
  343. data/pkg/steam-condenser-1.3.8.1/doc/index.html +179 -0
  344. data/pkg/steam-condenser-1.3.8.1/doc/js/app.js +219 -0
  345. data/pkg/steam-condenser-1.3.8.1/doc/js/full_list.js +178 -0
  346. data/pkg/steam-condenser-1.3.8.1/doc/js/jquery.js +4 -0
  347. data/pkg/steam-condenser-1.3.8.1/doc/method_list.html +3191 -0
  348. data/pkg/steam-condenser-1.3.8.1/doc/top-level-namespace.html +114 -0
  349. data/pkg/steam-condenser-1.3.8.1/lib/core_ext/stringio.rb +93 -0
  350. data/pkg/steam-condenser-1.3.8.1/lib/errors/packet_format_error.rb +13 -0
  351. data/pkg/steam-condenser-1.3.8.1/lib/errors/rcon_ban_error.rb +22 -0
  352. data/pkg/steam-condenser-1.3.8.1/lib/errors/rcon_no_auth_error.rb +21 -0
  353. data/pkg/steam-condenser-1.3.8.1/lib/errors/steam_condenser_error.rb +26 -0
  354. data/pkg/steam-condenser-1.3.8.1/lib/errors/timeout_error.rb +28 -0
  355. data/pkg/steam-condenser-1.3.8.1/lib/errors/web_api_error.rb +57 -0
  356. data/pkg/steam-condenser-1.3.8.1/lib/steam-condenser.rb +18 -0
  357. data/pkg/steam-condenser-1.3.8.1/lib/steam-condenser/community.rb +24 -0
  358. data/pkg/steam-condenser-1.3.8.1/lib/steam-condenser/servers.rb +24 -0
  359. data/pkg/steam-condenser-1.3.8.1/lib/steam-condenser/version.rb +11 -0
  360. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/alien_swarm/alien_swarm_mission.rb +120 -0
  361. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/alien_swarm/alien_swarm_stats.rb +188 -0
  362. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/alien_swarm/alien_swarm_weapon.rb +49 -0
  363. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/app_news.rb +133 -0
  364. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/cacheable.rb +199 -0
  365. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/css/css_map.rb +61 -0
  366. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/css/css_stats.rb +140 -0
  367. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/css/css_weapon.rb +69 -0
  368. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/defense_grid/defense_grid_stats.rb +238 -0
  369. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/dods/dods_class.rb +90 -0
  370. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/dods/dods_stats.rb +62 -0
  371. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/dods/dods_weapon.rb +67 -0
  372. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/dota2/dota2_beta_inventory.rb +30 -0
  373. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/dota2/dota2_inventory.rb +30 -0
  374. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/dota2/dota2_item.rb +33 -0
  375. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/game_achievement.rb +109 -0
  376. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/game_class.rb +22 -0
  377. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/game_inventory.rb +171 -0
  378. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/game_item.rb +155 -0
  379. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/game_item_schema.rb +131 -0
  380. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/game_leaderboard.rb +212 -0
  381. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/game_leaderboard_entry.rb +43 -0
  382. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/game_stats.rb +175 -0
  383. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/game_weapon.rb +41 -0
  384. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/l4d/abstract_l4d_stats.rb +188 -0
  385. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/l4d/abstract_l4d_weapon.rb +56 -0
  386. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/l4d/l4d2_map.rb +90 -0
  387. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/l4d/l4d2_stats.rb +179 -0
  388. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/l4d/l4d2_weapon.rb +38 -0
  389. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/l4d/l4d_explosive.rb +34 -0
  390. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/l4d/l4d_map.rb +65 -0
  391. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/l4d/l4d_stats.rb +73 -0
  392. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/l4d/l4d_weapon.rb +26 -0
  393. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/portal2/portal2_inventory.rb +30 -0
  394. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/portal2/portal2_item.rb +55 -0
  395. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/portal2/portal2_stats.rb +33 -0
  396. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/steam_game.rb +193 -0
  397. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/steam_group.rb +176 -0
  398. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/steam_id.rb +496 -0
  399. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/tf2/tf2_beta_inventory.rb +28 -0
  400. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/tf2/tf2_class.rb +92 -0
  401. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/tf2/tf2_class_factory.rb +40 -0
  402. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/tf2/tf2_engineer.rb +43 -0
  403. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/tf2/tf2_golden_wrench.rb +70 -0
  404. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/tf2/tf2_inventory.rb +30 -0
  405. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/tf2/tf2_item.rb +55 -0
  406. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/tf2/tf2_medic.rb +35 -0
  407. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/tf2/tf2_sniper.rb +28 -0
  408. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/tf2/tf2_spy.rb +41 -0
  409. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/tf2/tf2_stats.rb +77 -0
  410. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/web_api.rb +139 -0
  411. data/pkg/steam-condenser-1.3.8.1/lib/steam/community/xml_data.rb +27 -0
  412. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/a2m_get_servers_batch2_packet.rb +59 -0
  413. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/a2s_info_packet.rb +24 -0
  414. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/a2s_player_packet.rb +31 -0
  415. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/a2s_rules_packet.rb +32 -0
  416. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/a2s_serverquery_getchallenge_packet.rb +25 -0
  417. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/c2m_checkmd5_packet.rb +31 -0
  418. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/m2a_server_batch_packet.rb +52 -0
  419. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/m2c_isvalidmd5_packet.rb +34 -0
  420. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/m2s_requestrestart_packet.rb +34 -0
  421. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/rcon/rcon_auth_request.rb +28 -0
  422. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/rcon/rcon_auth_response.rb +30 -0
  423. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/rcon/rcon_exec_request.rb +28 -0
  424. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/rcon/rcon_exec_response.rb +37 -0
  425. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/rcon/rcon_goldsrc_request.rb +35 -0
  426. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/rcon/rcon_goldsrc_response.rb +34 -0
  427. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/rcon/rcon_packet.rb +57 -0
  428. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/rcon/rcon_packet_factory.rb +43 -0
  429. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/rcon/rcon_terminator.rb +29 -0
  430. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/request_with_challenge.rb +19 -0
  431. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/s2a_info2_packet.rb +76 -0
  432. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/s2a_info_base_packet.rb +25 -0
  433. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/s2a_info_detailed_packet.rb +64 -0
  434. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/s2a_logstring_packet.rb +30 -0
  435. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/s2a_player_packet.rb +44 -0
  436. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/s2a_rules_packet.rb +48 -0
  437. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/s2c_challenge_packet.rb +35 -0
  438. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/s2m_heartbeat2_packet.rb +72 -0
  439. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/steam_packet.rb +52 -0
  440. data/pkg/steam-condenser-1.3.8.1/lib/steam/packets/steam_packet_factory.rb +113 -0
  441. data/pkg/steam-condenser-1.3.8.1/lib/steam/servers/game_server.rb +393 -0
  442. data/pkg/steam-condenser-1.3.8.1/lib/steam/servers/goldsrc_server.rb +74 -0
  443. data/pkg/steam-condenser-1.3.8.1/lib/steam/servers/master_server.rb +188 -0
  444. data/pkg/steam-condenser-1.3.8.1/lib/steam/servers/server.rb +115 -0
  445. data/pkg/steam-condenser-1.3.8.1/lib/steam/servers/source_server.rb +123 -0
  446. data/pkg/steam-condenser-1.3.8.1/lib/steam/sockets/goldsrc_socket.rb +142 -0
  447. data/pkg/steam-condenser-1.3.8.1/lib/steam/sockets/master_server_socket.rb +34 -0
  448. data/pkg/steam-condenser-1.3.8.1/lib/steam/sockets/rcon_socket.rb +103 -0
  449. data/pkg/steam-condenser-1.3.8.1/lib/steam/sockets/source_socket.rb +73 -0
  450. data/pkg/steam-condenser-1.3.8.1/lib/steam/sockets/steam_socket.rb +91 -0
  451. data/pkg/steam-condenser-1.3.8.1/lib/steam/steam_player.rb +143 -0
  452. data/pkg/steam-condenser-1.3.8.1/steam-condenser.gemspec +25 -0
  453. data/pkg/steam-condenser-1.3.8.1/test/core_ext/test_stringio.rb +59 -0
  454. data/pkg/steam-condenser-1.3.8.1/test/fixtures/invalid.xml +2 -0
  455. data/pkg/steam-condenser-1.3.8.1/test/fixtures/sonofthor.xml +882 -0
  456. data/pkg/steam-condenser-1.3.8.1/test/fixtures/status_goldsrc +3 -0
  457. data/pkg/steam-condenser-1.3.8.1/test/fixtures/status_source +3 -0
  458. data/pkg/steam-condenser-1.3.8.1/test/fixtures/valve-members.xml +261 -0
  459. data/pkg/steam-condenser-1.3.8.1/test/helper.rb +48 -0
  460. data/pkg/steam-condenser-1.3.8.1/test/steam/community/test_cacheable.rb +103 -0
  461. data/pkg/steam-condenser-1.3.8.1/test/steam/community/test_steam_group.rb +94 -0
  462. data/pkg/steam-condenser-1.3.8.1/test/steam/community/test_steam_id.rb +144 -0
  463. data/pkg/steam-condenser-1.3.8.1/test/steam/community/test_web_api.rb +124 -0
  464. data/pkg/steam-condenser-1.3.8.1/test/steam/packets/test_steam_packet.rb +37 -0
  465. data/pkg/steam-condenser-1.3.8.1/test/steam/servers/test_game_server.rb +296 -0
  466. data/pkg/steam-condenser-1.3.8.1/test/steam/servers/test_goldsrc_server.rb +59 -0
  467. data/pkg/steam-condenser-1.3.8.1/test/steam/servers/test_master_server.rb +131 -0
  468. data/pkg/steam-condenser-1.3.8.1/test/steam/servers/test_server.rb +72 -0
  469. data/pkg/steam-condenser-1.3.8.1/test/steam/servers/test_source_server.rb +145 -0
  470. data/pkg/steam-condenser-1.3.8.1/test/steam/sockets/test_goldsrc_socket.rb +127 -0
  471. data/pkg/steam-condenser-1.3.8.1/test/steam/sockets/test_master_server_socket.rb +42 -0
  472. data/pkg/steam-condenser-1.3.8.1/test/steam/sockets/test_rcon_socket.rb +118 -0
  473. data/pkg/steam-condenser-1.3.8.1/test/steam/sockets/test_source_socket.rb +77 -0
  474. data/pkg/steam-condenser-1.3.8.1/test/steam/sockets/test_steam_socket.rb +97 -0
  475. data/test/steam/sockets/test_rcon_socket.rb +3 -7
  476. metadata +360 -2
@@ -0,0 +1,2495 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: GameServer
8
+
9
+ &mdash; Metior — API Documentation
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '';
20
+ framesUrl = "frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="_index.html">Index (G)</a> &raquo;
35
+
36
+
37
+ <span class="title">GameServer</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Module: GameServer
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+ <dt class="r1">Includes:</dt>
79
+ <dd class="r1"><span class='object_link'><a href="Server.html" title="Server (module)">Server</a></span></dd>
80
+
81
+
82
+
83
+
84
+ <dt class="r2">Included in:</dt>
85
+ <dd class="r2"><span class='object_link'><a href="GoldSrcServer.html" title="GoldSrcServer (class)">GoldSrcServer</a></span>, <span class='object_link'><a href="SourceServer.html" title="SourceServer (class)">SourceServer</a></span></dd>
86
+
87
+
88
+
89
+ <dt class="r1 last">Defined in:</dt>
90
+ <dd class="r1 last">lib/steam/servers/game_server.rb</dd>
91
+
92
+ </dl>
93
+ <div class="clear"></div>
94
+
95
+ <h2>Overview</h2><div class="docstring">
96
+ <div class="discussion">
97
+
98
+ <p>This module is included by classes representing different game
99
+ server
100
+ implementations and provides the basic functionality to communicate
101
+ with
102
+ them using the common query protocol</p>
103
+
104
+
105
+ </div>
106
+ </div>
107
+ <div class="tags">
108
+
109
+ <p class="tag_title">Author:</p>
110
+ <ul class="author">
111
+
112
+ <li>
113
+
114
+
115
+
116
+
117
+
118
+ <div class='inline'>
119
+ <p>Sebastian Staudt</p>
120
+ </div>
121
+
122
+ </li>
123
+
124
+ </ul>
125
+
126
+ </div>
127
+
128
+
129
+
130
+
131
+
132
+ <h2>Instance Attribute Summary</h2>
133
+
134
+ <h3 class="inherited">Attributes included from <span class='object_link'><a href="Server.html" title="Server (module)">Server</a></span></h3>
135
+ <p class="inherited"><span class='object_link'><a href="Server.html#host_names-instance_method" title="Server#host_names (method)">#host_names</a></span>, <span class='object_link'><a href="Server.html#ip_addresses-instance_method" title="Server#ip_addresses (method)">#ip_addresses</a></span></p>
136
+
137
+
138
+
139
+ <h2>
140
+ Class Method Summary
141
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
142
+ </h2>
143
+
144
+ <ul class="summary">
145
+
146
+ <li class="public ">
147
+ <span class="summary_signature">
148
+
149
+ <a href="#player_status_attributes-class_method" title="player_status_attributes (class method)">+ (Array&lt;Symbol&gt;) <strong>player_status_attributes</strong>(status_header) </a>
150
+
151
+
152
+
153
+ </span>
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+ <span class="summary_desc"><div class='inline'>
164
+ <p>Parses the player attribute names supplied by <code>rcon status</code>.</p>
165
+ </div></span>
166
+
167
+ </li>
168
+
169
+
170
+ <li class="public ">
171
+ <span class="summary_signature">
172
+
173
+ <a href="#split_player_status-class_method" title="split_player_status (class method)">+ (Hash&lt;Symbol, String&gt;) <strong>split_player_status</strong>(attributes, player_status) </a>
174
+
175
+
176
+
177
+ </span>
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+ <span class="summary_desc"><div class='inline'>
188
+ <p>Splits the player status obtained with <code>rcon status</code>.</p>
189
+ </div></span>
190
+
191
+ </li>
192
+
193
+
194
+ </ul>
195
+
196
+ <h2>
197
+ Instance Method Summary
198
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
199
+ </h2>
200
+
201
+ <ul class="summary">
202
+
203
+ <li class="public ">
204
+ <span class="summary_signature">
205
+
206
+ <a href="#handle_response_for_request-instance_method" title="#handle_response_for_request (instance method)">- (Object) <strong>handle_response_for_request</strong>(request_type, repeat_on_failure = true) </a>
207
+
208
+
209
+
210
+ </span>
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+ <span class="summary_desc"><div class='inline'>
221
+ <p>Sends the specified request to the server and handles the returned
222
+ response.</p>
223
+ </div></span>
224
+
225
+ </li>
226
+
227
+
228
+ <li class="public ">
229
+ <span class="summary_signature">
230
+
231
+ <a href="#init-instance_method" title="#init (instance method)">- (Object) <strong>init</strong> </a>
232
+
233
+
234
+
235
+ </span>
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+ <span class="summary_desc"><div class='inline'>
246
+ <p>Initializes this server object with basic information.</p>
247
+ </div></span>
248
+
249
+ </li>
250
+
251
+
252
+ <li class="public ">
253
+ <span class="summary_signature">
254
+
255
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Object) <strong>initialize</strong>(address, port = 27015) </a>
256
+
257
+
258
+
259
+ </span>
260
+
261
+
262
+
263
+
264
+
265
+
266
+
267
+
268
+
269
+ <span class="summary_desc"><div class='inline'>
270
+ <p>Creates a new instance of a game server object.</p>
271
+ </div></span>
272
+
273
+ </li>
274
+
275
+
276
+ <li class="public ">
277
+ <span class="summary_signature">
278
+
279
+ <a href="#ping-instance_method" title="#ping (instance method)">- (Fixnum) <strong>ping</strong> </a>
280
+
281
+
282
+
283
+ </span>
284
+
285
+
286
+
287
+
288
+
289
+
290
+
291
+
292
+
293
+ <span class="summary_desc"><div class='inline'>
294
+ <p>Returns the last measured response time of this server.</p>
295
+ </div></span>
296
+
297
+ </li>
298
+
299
+
300
+ <li class="public ">
301
+ <span class="summary_signature">
302
+
303
+ <a href="#players-instance_method" title="#players (instance method)">- (Hash) <strong>players</strong>(rcon_password = nil) </a>
304
+
305
+
306
+
307
+ </span>
308
+
309
+
310
+
311
+
312
+
313
+
314
+
315
+
316
+
317
+ <span class="summary_desc"><div class='inline'>
318
+ <p>Returns a list of players currently playing on this server.</p>
319
+ </div></span>
320
+
321
+ </li>
322
+
323
+
324
+ <li class="public ">
325
+ <span class="summary_signature">
326
+
327
+ <a href="#rcon_auth-instance_method" title="#rcon_auth (instance method)">- (Boolean) <strong>rcon_auth</strong>(password) </a>
328
+
329
+
330
+
331
+ </span>
332
+
333
+
334
+
335
+
336
+ <span class="abstract note title">abstract</span>
337
+
338
+
339
+
340
+
341
+ <span class="summary_desc"><div class='inline'>
342
+ <p>Authenticates the connection for RCON communication with the server.</p>
343
+ </div></span>
344
+
345
+ </li>
346
+
347
+
348
+ <li class="public ">
349
+ <span class="summary_signature">
350
+
351
+ <a href="#rcon_authenticated%3F-instance_method" title="#rcon_authenticated? (instance method)">- (Boolean) <strong>rcon_authenticated?</strong> </a>
352
+
353
+
354
+
355
+ </span>
356
+
357
+
358
+
359
+
360
+
361
+
362
+
363
+
364
+
365
+ <span class="summary_desc"><div class='inline'>
366
+ <p>Returns whether the RCON connection to this server is already
367
+ authenticated.</p>
368
+ </div></span>
369
+
370
+ </li>
371
+
372
+
373
+ <li class="public ">
374
+ <span class="summary_signature">
375
+
376
+ <a href="#rcon_exec-instance_method" title="#rcon_exec (instance method)">- (String) <strong>rcon_exec</strong>(command) </a>
377
+
378
+
379
+
380
+ </span>
381
+
382
+
383
+
384
+
385
+ <span class="abstract note title">abstract</span>
386
+
387
+
388
+
389
+
390
+ <span class="summary_desc"><div class='inline'>
391
+ <p>Remotely executes a command on the server via RCON.</p>
392
+ </div></span>
393
+
394
+ </li>
395
+
396
+
397
+ <li class="protected ">
398
+ <span class="summary_signature">
399
+
400
+ <a href="#reply-instance_method" title="#reply (instance method)">- (SteamPacket) <strong>reply</strong> </a>
401
+
402
+
403
+
404
+ </span>
405
+
406
+
407
+
408
+ <span class="note title protected">protected</span>
409
+
410
+
411
+
412
+
413
+
414
+ <span class="summary_desc"><div class='inline'>
415
+ <p>Receives a response from the server.</p>
416
+ </div></span>
417
+
418
+ </li>
419
+
420
+
421
+ <li class="public ">
422
+ <span class="summary_signature">
423
+
424
+ <a href="#rules-instance_method" title="#rules (instance method)">- (Hash&lt;String, String&gt;) <strong>rules</strong> </a>
425
+
426
+
427
+
428
+ </span>
429
+
430
+
431
+
432
+
433
+
434
+
435
+
436
+
437
+
438
+ <span class="summary_desc"><div class='inline'>
439
+ <p>Returns the settings applied on the server.</p>
440
+ </div></span>
441
+
442
+ </li>
443
+
444
+
445
+ <li class="protected ">
446
+ <span class="summary_signature">
447
+
448
+ <a href="#send_request-instance_method" title="#send_request (instance method)">- (Object) <strong>send_request</strong>(packet) </a>
449
+
450
+
451
+
452
+ </span>
453
+
454
+
455
+
456
+ <span class="note title protected">protected</span>
457
+
458
+
459
+
460
+
461
+
462
+ <span class="summary_desc"><div class='inline'>
463
+ <p>Sends a request packet to the server.</p>
464
+ </div></span>
465
+
466
+ </li>
467
+
468
+
469
+ <li class="public ">
470
+ <span class="summary_signature">
471
+
472
+ <a href="#server_info-instance_method" title="#server_info (instance method)">- (Hash) <strong>server_info</strong> </a>
473
+
474
+
475
+
476
+ </span>
477
+
478
+
479
+
480
+
481
+
482
+
483
+
484
+
485
+
486
+ <span class="summary_desc"><div class='inline'>
487
+ <p>Returns a hash with basic information on the server.</p>
488
+ </div></span>
489
+
490
+ </li>
491
+
492
+
493
+ <li class="public ">
494
+ <span class="summary_signature">
495
+
496
+ <a href="#to_s-instance_method" title="#to_s (instance method)">- (String) <strong>to_s</strong> </a>
497
+
498
+
499
+
500
+ </span>
501
+
502
+
503
+
504
+
505
+
506
+
507
+
508
+
509
+
510
+ <span class="summary_desc"><div class='inline'>
511
+ <p>Returns a human-readable text representation of the server.</p>
512
+ </div></span>
513
+
514
+ </li>
515
+
516
+
517
+ <li class="public ">
518
+ <span class="summary_signature">
519
+
520
+ <a href="#update_challenge_number-instance_method" title="#update_challenge_number (instance method)">- (Object) <strong>update_challenge_number</strong> </a>
521
+
522
+
523
+
524
+ </span>
525
+
526
+
527
+
528
+
529
+
530
+
531
+
532
+
533
+
534
+ <span class="summary_desc"><div class='inline'>
535
+ <p>Sends a A2S_SERVERQUERY_GETCHALLENGE request to the server and updates the
536
+ challenge number used to communicate with this server.</p>
537
+ </div></span>
538
+
539
+ </li>
540
+
541
+
542
+ <li class="public ">
543
+ <span class="summary_signature">
544
+
545
+ <a href="#update_ping-instance_method" title="#update_ping (instance method)">- (Fixnum) <strong>update_ping</strong> </a>
546
+
547
+
548
+
549
+ </span>
550
+
551
+
552
+
553
+
554
+
555
+
556
+
557
+
558
+
559
+ <span class="summary_desc"><div class='inline'>
560
+ <p>Sends a A2S_INFO request to the server and measures the time needed for the
561
+ reply.</p>
562
+ </div></span>
563
+
564
+ </li>
565
+
566
+
567
+ <li class="public ">
568
+ <span class="summary_signature">
569
+
570
+ <a href="#update_players-instance_method" title="#update_players (instance method)">- (Object) <strong>update_players</strong>(rcon_password = nil) </a>
571
+
572
+
573
+
574
+ </span>
575
+
576
+
577
+
578
+
579
+
580
+
581
+
582
+
583
+
584
+ <span class="summary_desc"><div class='inline'>
585
+ <p>Sends a A2S_PLAYERS request to the server and updates the players&#39; data
586
+ for this server.</p>
587
+ </div></span>
588
+
589
+ </li>
590
+
591
+
592
+ <li class="public ">
593
+ <span class="summary_signature">
594
+
595
+ <a href="#update_rules-instance_method" title="#update_rules (instance method)">- (Object) <strong>update_rules</strong> </a>
596
+
597
+
598
+
599
+ </span>
600
+
601
+
602
+
603
+
604
+
605
+
606
+
607
+
608
+
609
+ <span class="summary_desc"><div class='inline'>
610
+ <p>Sends a A2S_RULES request to the server and updates the rules of this
611
+ server.</p>
612
+ </div></span>
613
+
614
+ </li>
615
+
616
+
617
+ <li class="public ">
618
+ <span class="summary_signature">
619
+
620
+ <a href="#update_server_info-instance_method" title="#update_server_info (instance method)">- (Object) <strong>update_server_info</strong> </a>
621
+
622
+
623
+
624
+ </span>
625
+
626
+
627
+
628
+
629
+
630
+
631
+
632
+
633
+
634
+ <span class="summary_desc"><div class='inline'>
635
+ <p>Sends a A2S_INFO request to the server and updates this server&#39;s basic
636
+ information.</p>
637
+ </div></span>
638
+
639
+ </li>
640
+
641
+
642
+ </ul>
643
+
644
+
645
+
646
+
647
+
648
+
649
+
650
+
651
+
652
+
653
+
654
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="Server.html" title="Server (module)">Server</a></span></h3>
655
+ <p class="inherited"><span class='object_link'><a href="Server.html#disconnect-instance_method" title="Server#disconnect (method)">#disconnect</a></span>, <span class='object_link'><a href="Server.html#failsafe-instance_method" title="Server#failsafe (method)">#failsafe</a></span>, <span class='object_link'><a href="Server.html#init_socket-instance_method" title="Server#init_socket (method)">#init_socket</a></span>, <span class='object_link'><a href="Server.html#rotate_ip-instance_method" title="Server#rotate_ip (method)">#rotate_ip</a></span></p>
656
+
657
+
658
+ <div id="class_method_details" class="method_details_list">
659
+ <h2>Class Method Details</h2>
660
+
661
+
662
+ <div class="method_details first">
663
+ <h3 class="signature first" id="player_status_attributes-class_method">
664
+
665
+ + (<tt>Array&lt;Symbol&gt;</tt>) <strong>player_status_attributes</strong>(status_header)
666
+
667
+
668
+
669
+
670
+
671
+ </h3><div class="docstring">
672
+ <div class="discussion">
673
+
674
+ <p>Parses the player attribute names supplied by <code>rcon status</code></p>
675
+
676
+
677
+ </div>
678
+ </div>
679
+ <div class="tags">
680
+ <p class="tag_title">Parameters:</p>
681
+ <ul class="param">
682
+
683
+ <li>
684
+
685
+ <span class='name'>status_header</span>
686
+
687
+
688
+ <span class='type'>(<tt>String</tt>)</span>
689
+
690
+
691
+
692
+ &mdash;
693
+ <div class='inline'>
694
+ <p>The header line provided by <code>rcon status</code></p>
695
+ </div>
696
+
697
+ </li>
698
+
699
+ </ul>
700
+
701
+ <p class="tag_title">Returns:</p>
702
+ <ul class="return">
703
+
704
+ <li>
705
+
706
+
707
+ <span class='type'>(<tt>Array&lt;Symbol&gt;</tt>)</span>
708
+
709
+
710
+
711
+ &mdash;
712
+ <div class='inline'>
713
+ <p>Split player attribute names</p>
714
+ </div>
715
+
716
+ </li>
717
+
718
+ </ul>
719
+
720
+ <p class="tag_title">See Also:</p>
721
+ <ul class="see">
722
+
723
+ <li><span class='object_link'><a href="#split_player_status-class_method" title="GameServer.split_player_status (method)">split_player_status</a></span></li>
724
+
725
+ </ul>
726
+
727
+ </div><table class="source_code">
728
+ <tr>
729
+ <td>
730
+ <pre class="lines">
731
+
732
+
733
+ 33
734
+ 34
735
+ 35
736
+ 36
737
+ 37
738
+ 38
739
+ 39
740
+ 40
741
+ 41
742
+ 42
743
+ 43
744
+ 44</pre>
745
+ </td>
746
+ <td>
747
+ <pre class="code"><span class="info file"># File 'lib/steam/servers/game_server.rb', line 33</span>
748
+
749
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_player_status_attributes'>player_status_attributes</span><span class='lparen'>(</span><span class='id identifier rubyid_status_header'>status_header</span><span class='rparen'>)</span>
750
+ <span class='id identifier rubyid_status_header'>status_header</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_attribute'>attribute</span><span class='op'>|</span>
751
+ <span class='kw'>case</span> <span class='id identifier rubyid_attribute'>attribute</span>
752
+ <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>connected</span><span class='tstring_end'>&#39;</span></span>
753
+ <span class='symbol'>:time</span>
754
+ <span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>frag</span><span class='tstring_end'>&#39;</span></span>
755
+ <span class='symbol'>:score</span>
756
+ <span class='kw'>else</span>
757
+ <span class='id identifier rubyid_attribute'>attribute</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
758
+ <span class='kw'>end</span>
759
+ <span class='kw'>end</span>
760
+ <span class='kw'>end</span></pre>
761
+ </td>
762
+ </tr>
763
+ </table>
764
+ </div>
765
+
766
+ <div class="method_details ">
767
+ <h3 class="signature " id="split_player_status-class_method">
768
+
769
+ + (<tt>Hash&lt;Symbol, String&gt;</tt>) <strong>split_player_status</strong>(attributes, player_status)
770
+
771
+
772
+
773
+
774
+
775
+ </h3><div class="docstring">
776
+ <div class="discussion">
777
+
778
+ <p>Splits the player status obtained with <code>rcon status</code></p>
779
+
780
+
781
+ </div>
782
+ </div>
783
+ <div class="tags">
784
+ <p class="tag_title">Parameters:</p>
785
+ <ul class="param">
786
+
787
+ <li>
788
+
789
+ <span class='name'>attributes</span>
790
+
791
+
792
+ <span class='type'>(<tt>Array&lt;Symbol&gt;</tt>)</span>
793
+
794
+
795
+
796
+ &mdash;
797
+ <div class='inline'>
798
+ <p>The attribute names</p>
799
+ </div>
800
+
801
+ </li>
802
+
803
+ <li>
804
+
805
+ <span class='name'>player_status</span>
806
+
807
+
808
+ <span class='type'>(<tt>String</tt>)</span>
809
+
810
+
811
+
812
+ &mdash;
813
+ <div class='inline'>
814
+ <p>The status line of a single player</p>
815
+ </div>
816
+
817
+ </li>
818
+
819
+ </ul>
820
+
821
+ <p class="tag_title">Returns:</p>
822
+ <ul class="return">
823
+
824
+ <li>
825
+
826
+
827
+ <span class='type'>(<tt>Hash&lt;Symbol, String&gt;</tt>)</span>
828
+
829
+
830
+
831
+ &mdash;
832
+ <div class='inline'>
833
+ <p>The attributes with the corresponding values
834
+ for this player</p>
835
+ </div>
836
+
837
+ </li>
838
+
839
+ </ul>
840
+
841
+ <p class="tag_title">See Also:</p>
842
+ <ul class="see">
843
+
844
+ <li><span class='object_link'><a href="#player_status_attributes-class_method" title="GameServer.player_status_attributes (method)">player_status_attributes</a></span></li>
845
+
846
+ </ul>
847
+
848
+ </div><table class="source_code">
849
+ <tr>
850
+ <td>
851
+ <pre class="lines">
852
+
853
+
854
+ 53
855
+ 54
856
+ 55
857
+ 56
858
+ 57
859
+ 58
860
+ 59
861
+ 60
862
+ 61
863
+ 62
864
+ 63
865
+ 64
866
+ 65
867
+ 66
868
+ 67
869
+ 68
870
+ 69
871
+ 70
872
+ 71
873
+ 72
874
+ 73
875
+ 74
876
+ 75
877
+ 76
878
+ 77
879
+ 78</pre>
880
+ </td>
881
+ <td>
882
+ <pre class="code"><span class="info file"># File 'lib/steam/servers/game_server.rb', line 53</span>
883
+
884
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_split_player_status'>split_player_status</span><span class='lparen'>(</span><span class='id identifier rubyid_attributes'>attributes</span><span class='comma'>,</span> <span class='id identifier rubyid_player_status'>player_status</span><span class='rparen'>)</span>
885
+ <span class='id identifier rubyid_player_status'>player_status</span><span class='period'>.</span><span class='id identifier rubyid_sub!'>sub!</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^\d+ +</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span> <span class='op'>!=</span> <span class='symbol'>:userid</span>
886
+
887
+ <span class='id identifier rubyid_first_quote'>first_quote</span> <span class='op'>=</span> <span class='id identifier rubyid_player_status'>player_status</span><span class='period'>.</span><span class='id identifier rubyid_index'>index</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>&quot;</span><span class='tstring_end'>&#39;</span></span>
888
+ <span class='id identifier rubyid_last_quote'>last_quote</span> <span class='op'>=</span> <span class='id identifier rubyid_player_status'>player_status</span><span class='period'>.</span><span class='id identifier rubyid_rindex'>rindex</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>&quot;</span><span class='tstring_end'>&#39;</span></span>
889
+ <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='lbracket'>[</span>
890
+ <span class='id identifier rubyid_player_status'>player_status</span><span class='lbracket'>[</span><span class='int'>0</span><span class='comma'>,</span> <span class='id identifier rubyid_first_quote'>first_quote</span><span class='rbracket'>]</span><span class='comma'>,</span>
891
+ <span class='id identifier rubyid_player_status'>player_status</span><span class='lbracket'>[</span><span class='id identifier rubyid_first_quote'>first_quote</span> <span class='op'>+</span> <span class='int'>1</span><span class='op'>..</span><span class='id identifier rubyid_last_quote'>last_quote</span> <span class='op'>-</span> <span class='int'>1</span><span class='rbracket'>]</span><span class='comma'>,</span>
892
+ <span class='id identifier rubyid_player_status'>player_status</span><span class='lbracket'>[</span><span class='id identifier rubyid_last_quote'>last_quote</span> <span class='op'>+</span> <span class='int'>1</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span>
893
+ <span class='rbracket'>]</span>
894
+ <span class='id identifier rubyid_data'>data</span> <span class='op'>=</span> <span class='lbracket'>[</span> <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='int'>2</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span> <span class='rbracket'>]</span>
895
+ <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_flatten!'>flatten!</span>
896
+
897
+ <span class='kw'>if</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>&gt;</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='symbol'>:state</span><span class='rparen'>)</span>
898
+ <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_insert'>insert</span> <span class='int'>3</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='kw'>nil</span>
899
+ <span class='kw'>elsif</span> <span class='id identifier rubyid_attributes'>attributes</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>&lt;</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span>
900
+ <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_delete_at'>delete_at</span> <span class='int'>1</span>
901
+ <span class='kw'>end</span>
902
+
903
+ <span class='id identifier rubyid_player_data'>player_data</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
904
+ <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_each_index'>each_index</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_i'>i</span><span class='op'>|</span>
905
+ <span class='id identifier rubyid_player_data'>player_data</span><span class='lbracket'>[</span><span class='id identifier rubyid_attributes'>attributes</span><span class='lbracket'>[</span><span class='id identifier rubyid_i'>i</span><span class='rbracket'>]</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='lbracket'>[</span><span class='id identifier rubyid_i'>i</span><span class='rbracket'>]</span>
906
+ <span class='kw'>end</span>
907
+
908
+ <span class='id identifier rubyid_player_data'>player_data</span>
909
+ <span class='kw'>end</span></pre>
910
+ </td>
911
+ </tr>
912
+ </table>
913
+ </div>
914
+
915
+ </div>
916
+
917
+ <div id="instance_method_details" class="method_details_list">
918
+ <h2>Instance Method Details</h2>
919
+
920
+
921
+ <div class="method_details first">
922
+ <h3 class="signature first" id="handle_response_for_request-instance_method">
923
+
924
+ - (<tt>Object</tt>) <strong>handle_response_for_request</strong>(request_type, repeat_on_failure = true)
925
+
926
+
927
+
928
+
929
+
930
+ </h3><div class="docstring">
931
+ <div class="discussion">
932
+
933
+ <p>Sends the specified request to the server and handles the returned response</p>
934
+
935
+ <p>Depending on the given request type this will fill the various
936
+ data
937
+ attributes of the server object.</p>
938
+
939
+
940
+ </div>
941
+ </div>
942
+ <div class="tags">
943
+ <p class="tag_title">Parameters:</p>
944
+ <ul class="param">
945
+
946
+ <li>
947
+
948
+ <span class='name'>request_type</span>
949
+
950
+
951
+ <span class='type'>(<tt>Symbol</tt>)</span>
952
+
953
+
954
+
955
+ &mdash;
956
+ <div class='inline'>
957
+ <p>The type of request to send to the server</p>
958
+ </div>
959
+
960
+ </li>
961
+
962
+ <li>
963
+
964
+ <span class='name'>repeat_on_failure</span>
965
+
966
+
967
+ <span class='type'>(<tt>Boolean</tt>)</span>
968
+
969
+
970
+ <em class="default">(defaults to: <tt>true</tt>)</em>
971
+
972
+
973
+ &mdash;
974
+ <div class='inline'>
975
+ <p>Whether the request should be repeated,
976
+ if the replied packet isn&#39;t
977
+ expected. This is useful to handle
978
+ missing challenge numbers, which will be
979
+ automatically filled in,
980
+ although not requested explicitly.</p>
981
+ </div>
982
+
983
+ </li>
984
+
985
+ </ul>
986
+
987
+ <p class="tag_title">Raises:</p>
988
+ <ul class="raise">
989
+
990
+ <li>
991
+
992
+
993
+ <span class='type'>(<tt><span class='object_link'><a href="SteamCondenserError.html" title="SteamCondenserError (class)">SteamCondenserError</a></span></tt>)</span>
994
+
995
+
996
+
997
+ &mdash;
998
+ <div class='inline'>
999
+ <p>if either the request type or the response
1000
+ packet is not known</p>
1001
+ </div>
1002
+
1003
+ </li>
1004
+
1005
+ </ul>
1006
+
1007
+ </div><table class="source_code">
1008
+ <tr>
1009
+ <td>
1010
+ <pre class="lines">
1011
+
1012
+
1013
+ 203
1014
+ 204
1015
+ 205
1016
+ 206
1017
+ 207
1018
+ 208
1019
+ 209
1020
+ 210
1021
+ 211
1022
+ 212
1023
+ 213
1024
+ 214
1025
+ 215
1026
+ 216
1027
+ 217
1028
+ 218
1029
+ 219
1030
+ 220
1031
+ 221
1032
+ 222
1033
+ 223
1034
+ 224
1035
+ 225
1036
+ 226
1037
+ 227
1038
+ 228
1039
+ 229
1040
+ 230
1041
+ 231
1042
+ 232
1043
+ 233
1044
+ 234
1045
+ 235
1046
+ 236
1047
+ 237
1048
+ 238
1049
+ 239
1050
+ 240</pre>
1051
+ </td>
1052
+ <td>
1053
+ <pre class="code"><span class="info file"># File 'lib/steam/servers/game_server.rb', line 203</span>
1054
+
1055
+ <span class='kw'>def</span> <span class='id identifier rubyid_handle_response_for_request'>handle_response_for_request</span><span class='lparen'>(</span><span class='id identifier rubyid_request_type'>request_type</span><span class='comma'>,</span> <span class='id identifier rubyid_repeat_on_failure'>repeat_on_failure</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
1056
+ <span class='kw'>case</span> <span class='id identifier rubyid_request_type'>request_type</span>
1057
+ <span class='kw'>when</span> <span class='symbol'>:challenge</span> <span class='kw'>then</span>
1058
+ <span class='id identifier rubyid_request_packet'>request_packet</span> <span class='op'>=</span> <span class='const'>A2S_PLAYER_Packet</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
1059
+ <span class='id identifier rubyid_expected_response'>expected_response</span> <span class='op'>=</span> <span class='const'>S2C_CHALLENGE_Packet</span>
1060
+ <span class='kw'>when</span> <span class='symbol'>:info</span> <span class='kw'>then</span>
1061
+ <span class='id identifier rubyid_request_packet'>request_packet</span> <span class='op'>=</span> <span class='const'>A2S_INFO_Packet</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
1062
+ <span class='id identifier rubyid_expected_response'>expected_response</span> <span class='op'>=</span> <span class='const'>S2A_INFO_BasePacket</span>
1063
+ <span class='kw'>when</span> <span class='symbol'>:players</span> <span class='kw'>then</span>
1064
+ <span class='id identifier rubyid_request_packet'>request_packet</span> <span class='op'>=</span> <span class='const'>A2S_PLAYER_Packet</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='ivar'>@challenge_number</span><span class='rparen'>)</span>
1065
+ <span class='id identifier rubyid_expected_response'>expected_response</span> <span class='op'>=</span> <span class='const'>S2A_PLAYER_Packet</span>
1066
+ <span class='kw'>when</span> <span class='symbol'>:rules</span> <span class='kw'>then</span>
1067
+ <span class='id identifier rubyid_request_packet'>request_packet</span> <span class='op'>=</span> <span class='const'>A2S_RULES_Packet</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='ivar'>@challenge_number</span><span class='rparen'>)</span>
1068
+ <span class='id identifier rubyid_expected_response'>expected_response</span> <span class='op'>=</span> <span class='const'>S2A_RULES_Packet</span>
1069
+ <span class='kw'>else</span>
1070
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>SteamCondenserError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Called with wrong request type.</span><span class='tstring_end'>&#39;</span></span>
1071
+ <span class='kw'>end</span>
1072
+
1073
+ <span class='id identifier rubyid_send_request'>send_request</span> <span class='id identifier rubyid_request_packet'>request_packet</span>
1074
+ <span class='id identifier rubyid_response_packet'>response_packet</span> <span class='op'>=</span> <span class='id identifier rubyid_reply'>reply</span>
1075
+
1076
+ <span class='kw'>if</span> <span class='id identifier rubyid_response_packet'>response_packet</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span> <span class='const'>S2A_INFO_BasePacket</span>
1077
+ <span class='ivar'>@info_hash</span> <span class='op'>=</span> <span class='id identifier rubyid_response_packet'>response_packet</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span>
1078
+ <span class='kw'>elsif</span> <span class='id identifier rubyid_response_packet'>response_packet</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span> <span class='const'>S2A_PLAYER_Packet</span>
1079
+ <span class='ivar'>@player_hash</span> <span class='op'>=</span> <span class='id identifier rubyid_response_packet'>response_packet</span><span class='period'>.</span><span class='id identifier rubyid_player_hash'>player_hash</span>
1080
+ <span class='kw'>elsif</span> <span class='id identifier rubyid_response_packet'>response_packet</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span> <span class='const'>S2A_RULES_Packet</span>
1081
+ <span class='ivar'>@rules_hash</span> <span class='op'>=</span> <span class='id identifier rubyid_response_packet'>response_packet</span><span class='period'>.</span><span class='id identifier rubyid_rules_hash'>rules_hash</span>
1082
+ <span class='kw'>elsif</span> <span class='id identifier rubyid_response_packet'>response_packet</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span> <span class='const'>S2C_CHALLENGE_Packet</span>
1083
+ <span class='ivar'>@challenge_number</span> <span class='op'>=</span> <span class='id identifier rubyid_response_packet'>response_packet</span><span class='period'>.</span><span class='id identifier rubyid_challenge_number'>challenge_number</span>
1084
+ <span class='kw'>else</span>
1085
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>SteamCondenserError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Response of type </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_response_packet'>response_packet</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='embexpr_end'>}</span><span class='tstring_content'> cannot be handled by this method.</span><span class='tstring_end'>&quot;</span></span>
1086
+ <span class='kw'>end</span>
1087
+
1088
+ <span class='kw'>unless</span> <span class='id identifier rubyid_response_packet'>response_packet</span><span class='period'>.</span><span class='id identifier rubyid_kind_of?'>kind_of?</span> <span class='id identifier rubyid_expected_response'>expected_response</span>
1089
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Expected </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_expected_response'>expected_response</span><span class='embexpr_end'>}</span><span class='tstring_content'>, got </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_response_packet'>response_packet</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='embexpr_end'>}</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='gvar'>$DEBUG</span>
1090
+ <span class='id identifier rubyid_handle_response_for_request'>handle_response_for_request</span><span class='lparen'>(</span><span class='id identifier rubyid_request_type'>request_type</span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_repeat_on_failure'>repeat_on_failure</span>
1091
+ <span class='kw'>end</span>
1092
+ <span class='kw'>end</span></pre>
1093
+ </td>
1094
+ </tr>
1095
+ </table>
1096
+ </div>
1097
+
1098
+ <div class="method_details ">
1099
+ <h3 class="signature " id="init-instance_method">
1100
+
1101
+ - (<tt>Object</tt>) <strong>init</strong>
1102
+
1103
+
1104
+
1105
+
1106
+
1107
+ </h3><div class="docstring">
1108
+ <div class="discussion">
1109
+
1110
+ <p>Initializes this server object with basic information</p>
1111
+
1112
+
1113
+ </div>
1114
+ </div>
1115
+ <div class="tags">
1116
+
1117
+
1118
+ <p class="tag_title">See Also:</p>
1119
+ <ul class="see">
1120
+
1121
+ <li><span class='object_link'><a href="#update_challenge_number-instance_method" title="GameServer#update_challenge_number (method)">#update_challenge_number</a></span></li>
1122
+
1123
+ <li><span class='object_link'><a href="#update_ping-instance_method" title="GameServer#update_ping (method)">#update_ping</a></span></li>
1124
+
1125
+ <li><span class='object_link'><a href="#update_server_info-instance_method" title="GameServer#update_server_info (method)">#update_server_info</a></span></li>
1126
+
1127
+ </ul>
1128
+
1129
+ </div><table class="source_code">
1130
+ <tr>
1131
+ <td>
1132
+ <pre class="lines">
1133
+
1134
+
1135
+ 247
1136
+ 248
1137
+ 249
1138
+ 250
1139
+ 251</pre>
1140
+ </td>
1141
+ <td>
1142
+ <pre class="code"><span class="info file"># File 'lib/steam/servers/game_server.rb', line 247</span>
1143
+
1144
+ <span class='kw'>def</span> <span class='id identifier rubyid_init'>init</span>
1145
+ <span class='id identifier rubyid_update_ping'>update_ping</span>
1146
+ <span class='id identifier rubyid_update_server_info'>update_server_info</span>
1147
+ <span class='id identifier rubyid_update_challenge_number'>update_challenge_number</span>
1148
+ <span class='kw'>end</span></pre>
1149
+ </td>
1150
+ </tr>
1151
+ </table>
1152
+ </div>
1153
+
1154
+ <div class="method_details ">
1155
+ <h3 class="signature " id="initialize-instance_method">
1156
+
1157
+ - (<tt>Object</tt>) <strong>initialize</strong>(address, port = 27015)
1158
+
1159
+
1160
+
1161
+
1162
+
1163
+ </h3><div class="docstring">
1164
+ <div class="discussion">
1165
+
1166
+ <p>Creates a new instance of a game server object</p>
1167
+
1168
+
1169
+ </div>
1170
+ </div>
1171
+ <div class="tags">
1172
+ <p class="tag_title">Parameters:</p>
1173
+ <ul class="param">
1174
+
1175
+ <li>
1176
+
1177
+ <span class='name'>address</span>
1178
+
1179
+
1180
+ <span class='type'>(<tt>String</tt>)</span>
1181
+
1182
+
1183
+
1184
+ &mdash;
1185
+ <div class='inline'>
1186
+ <p>Either an IP address, a DNS name or one of them
1187
+ combined with the port
1188
+ number. If a port number is given, e.g.
1189
+ &#39;server.example.com:27016&#39;
1190
+ it will override the second argument.</p>
1191
+ </div>
1192
+
1193
+ </li>
1194
+
1195
+ <li>
1196
+
1197
+ <span class='name'>port</span>
1198
+
1199
+
1200
+ <span class='type'>(<tt>Fixnum</tt>)</span>
1201
+
1202
+
1203
+ <em class="default">(defaults to: <tt>27015</tt>)</em>
1204
+
1205
+
1206
+ &mdash;
1207
+ <div class='inline'>
1208
+ <p>The port the server is listening on</p>
1209
+ </div>
1210
+
1211
+ </li>
1212
+
1213
+ </ul>
1214
+
1215
+ <p class="tag_title">Raises:</p>
1216
+ <ul class="raise">
1217
+
1218
+ <li>
1219
+
1220
+
1221
+ <span class='type'>(<tt><span class='object_link'><a href="SteamCondenserError.html" title="SteamCondenserError (class)">SteamCondenserError</a></span></tt>)</span>
1222
+
1223
+
1224
+
1225
+ &mdash;
1226
+ <div class='inline'>
1227
+ <p>if an host name cannot be resolved</p>
1228
+ </div>
1229
+
1230
+ </li>
1231
+
1232
+ </ul>
1233
+
1234
+ </div><table class="source_code">
1235
+ <tr>
1236
+ <td>
1237
+ <pre class="lines">
1238
+
1239
+
1240
+ 87
1241
+ 88
1242
+ 89
1243
+ 90
1244
+ 91</pre>
1245
+ </td>
1246
+ <td>
1247
+ <pre class="code"><span class="info file"># File 'lib/steam/servers/game_server.rb', line 87</span>
1248
+
1249
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_address'>address</span><span class='comma'>,</span> <span class='id identifier rubyid_port'>port</span> <span class='op'>=</span> <span class='int'>27015</span><span class='rparen'>)</span>
1250
+ <span class='kw'>super</span>
1251
+
1252
+ <span class='ivar'>@rcon_authenticated</span> <span class='op'>=</span> <span class='kw'>false</span>
1253
+ <span class='kw'>end</span></pre>
1254
+ </td>
1255
+ </tr>
1256
+ </table>
1257
+ </div>
1258
+
1259
+ <div class="method_details ">
1260
+ <h3 class="signature " id="ping-instance_method">
1261
+
1262
+ - (<tt>Fixnum</tt>) <strong>ping</strong>
1263
+
1264
+
1265
+
1266
+
1267
+
1268
+ </h3><div class="docstring">
1269
+ <div class="discussion">
1270
+
1271
+ <p>Returns the last measured response time of this server</p>
1272
+
1273
+ <p>If the latency hasn&#39;t been measured yet, it is done when calling
1274
+ this
1275
+ method for the first time.</p>
1276
+
1277
+ <p>If this information is vital to you, be sure to call
1278
+ <span class='object_link'><a href="#update_ping-instance_method" title="GameServer#update_ping (method)">#update_ping</a></span>
1279
+ regularly to stay up-to-date.</p>
1280
+
1281
+
1282
+ </div>
1283
+ </div>
1284
+ <div class="tags">
1285
+
1286
+ <p class="tag_title">Returns:</p>
1287
+ <ul class="return">
1288
+
1289
+ <li>
1290
+
1291
+
1292
+ <span class='type'>(<tt>Fixnum</tt>)</span>
1293
+
1294
+
1295
+
1296
+ &mdash;
1297
+ <div class='inline'>
1298
+ <p>The latency of this server in milliseconds</p>
1299
+ </div>
1300
+
1301
+ </li>
1302
+
1303
+ </ul>
1304
+
1305
+ <p class="tag_title">See Also:</p>
1306
+ <ul class="see">
1307
+
1308
+ <li><span class='object_link'><a href="#update_ping-instance_method" title="GameServer#update_ping (method)">#update_ping</a></span></li>
1309
+
1310
+ </ul>
1311
+
1312
+ </div><table class="source_code">
1313
+ <tr>
1314
+ <td>
1315
+ <pre class="lines">
1316
+
1317
+
1318
+ 103
1319
+ 104
1320
+ 105
1321
+ 106</pre>
1322
+ </td>
1323
+ <td>
1324
+ <pre class="code"><span class="info file"># File 'lib/steam/servers/game_server.rb', line 103</span>
1325
+
1326
+ <span class='kw'>def</span> <span class='id identifier rubyid_ping'>ping</span>
1327
+ <span class='id identifier rubyid_update_ping'>update_ping</span> <span class='kw'>if</span> <span class='ivar'>@ping</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
1328
+ <span class='ivar'>@ping</span>
1329
+ <span class='kw'>end</span></pre>
1330
+ </td>
1331
+ </tr>
1332
+ </table>
1333
+ </div>
1334
+
1335
+ <div class="method_details ">
1336
+ <h3 class="signature " id="players-instance_method">
1337
+
1338
+ - (<tt>Hash</tt>) <strong>players</strong>(rcon_password = nil)
1339
+
1340
+
1341
+
1342
+
1343
+
1344
+ </h3><div class="docstring">
1345
+ <div class="discussion">
1346
+
1347
+ <p>Returns a list of players currently playing on this server</p>
1348
+
1349
+ <p>If the players haven&#39;t been fetched yet, it is done when calling
1350
+ this
1351
+ method for the first time.</p>
1352
+
1353
+ <p>As the players and their scores change quite often be sure to update
1354
+ this
1355
+ list regularly by calling <span class='object_link'><a href="#update_players-instance_method" title="GameServer#update_players (method)">#update_players</a></span> if you rely on
1356
+ this
1357
+ information.</p>
1358
+
1359
+
1360
+ </div>
1361
+ </div>
1362
+ <div class="tags">
1363
+ <p class="tag_title">Parameters:</p>
1364
+ <ul class="param">
1365
+
1366
+ <li>
1367
+
1368
+ <span class='name'>rcon_password</span>
1369
+
1370
+
1371
+ <span class='type'>(<tt>String</tt>)</span>
1372
+
1373
+
1374
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
1375
+
1376
+
1377
+ &mdash;
1378
+ <div class='inline'>
1379
+ <p>The RCON password of this server may be
1380
+ provided to gather more detailed
1381
+ information on the players, like
1382
+ STEAM_IDs.</p>
1383
+ </div>
1384
+
1385
+ </li>
1386
+
1387
+ </ul>
1388
+
1389
+ <p class="tag_title">Returns:</p>
1390
+ <ul class="return">
1391
+
1392
+ <li>
1393
+
1394
+
1395
+ <span class='type'>(<tt>Hash</tt>)</span>
1396
+
1397
+
1398
+
1399
+ &mdash;
1400
+ <div class='inline'>
1401
+ <p>The players on this server</p>
1402
+ </div>
1403
+
1404
+ </li>
1405
+
1406
+ </ul>
1407
+
1408
+ <p class="tag_title">See Also:</p>
1409
+ <ul class="see">
1410
+
1411
+ <li>update_players</li>
1412
+
1413
+ </ul>
1414
+
1415
+ </div><table class="source_code">
1416
+ <tr>
1417
+ <td>
1418
+ <pre class="lines">
1419
+
1420
+
1421
+ 122
1422
+ 123
1423
+ 124
1424
+ 125</pre>
1425
+ </td>
1426
+ <td>
1427
+ <pre class="code"><span class="info file"># File 'lib/steam/servers/game_server.rb', line 122</span>
1428
+
1429
+ <span class='kw'>def</span> <span class='id identifier rubyid_players'>players</span><span class='lparen'>(</span><span class='id identifier rubyid_rcon_password'>rcon_password</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
1430
+ <span class='id identifier rubyid_update_players'>update_players</span><span class='lparen'>(</span><span class='id identifier rubyid_rcon_password'>rcon_password</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='ivar'>@player_hash</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
1431
+ <span class='ivar'>@player_hash</span>
1432
+ <span class='kw'>end</span></pre>
1433
+ </td>
1434
+ </tr>
1435
+ </table>
1436
+ </div>
1437
+
1438
+ <div class="method_details ">
1439
+ <h3 class="signature " id="rcon_auth-instance_method">
1440
+
1441
+ - (<tt>Boolean</tt>) <strong>rcon_auth</strong>(password)
1442
+
1443
+
1444
+
1445
+
1446
+
1447
+ </h3><div class="docstring">
1448
+ <div class="discussion">
1449
+ <div class="note abstract">
1450
+ <strong>This method is abstract.</strong>
1451
+ <div class='inline'>
1452
+ <p>Must be be implemented by including classes to handle the
1453
+ authentication</p>
1454
+ </div>
1455
+ </div>
1456
+
1457
+ <p>Authenticates the connection for RCON communication with the server</p>
1458
+
1459
+
1460
+ </div>
1461
+ </div>
1462
+ <div class="tags">
1463
+ <p class="tag_title">Parameters:</p>
1464
+ <ul class="param">
1465
+
1466
+ <li>
1467
+
1468
+ <span class='name'>password</span>
1469
+
1470
+
1471
+ <span class='type'>(<tt>String</tt>)</span>
1472
+
1473
+
1474
+
1475
+ &mdash;
1476
+ <div class='inline'>
1477
+ <p>The RCON password of the server</p>
1478
+ </div>
1479
+
1480
+ </li>
1481
+
1482
+ </ul>
1483
+
1484
+ <p class="tag_title">Returns:</p>
1485
+ <ul class="return">
1486
+
1487
+ <li>
1488
+
1489
+
1490
+ <span class='type'>(<tt>Boolean</tt>)</span>
1491
+
1492
+
1493
+
1494
+ &mdash;
1495
+ <div class='inline'>
1496
+ <p>whether the authentication was successful</p>
1497
+ </div>
1498
+
1499
+ </li>
1500
+
1501
+ </ul>
1502
+ <p class="tag_title">Raises:</p>
1503
+ <ul class="raise">
1504
+
1505
+ <li>
1506
+
1507
+
1508
+ <span class='type'>(<tt>NotImplementedError</tt>)</span>
1509
+
1510
+
1511
+
1512
+ </li>
1513
+
1514
+ </ul>
1515
+
1516
+ <p class="tag_title">See Also:</p>
1517
+ <ul class="see">
1518
+
1519
+ <li><span class='object_link'><a href="#rcon_exec-instance_method" title="GameServer#rcon_exec (method)">#rcon_exec</a></span></li>
1520
+
1521
+ </ul>
1522
+
1523
+ </div><table class="source_code">
1524
+ <tr>
1525
+ <td>
1526
+ <pre class="lines">
1527
+
1528
+
1529
+ 134
1530
+ 135
1531
+ 136</pre>
1532
+ </td>
1533
+ <td>
1534
+ <pre class="code"><span class="info file"># File 'lib/steam/servers/game_server.rb', line 134</span>
1535
+
1536
+ <span class='kw'>def</span> <span class='id identifier rubyid_rcon_auth'>rcon_auth</span><span class='lparen'>(</span><span class='id identifier rubyid_password'>password</span><span class='rparen'>)</span>
1537
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>NotImplementedError</span>
1538
+ <span class='kw'>end</span></pre>
1539
+ </td>
1540
+ </tr>
1541
+ </table>
1542
+ </div>
1543
+
1544
+ <div class="method_details ">
1545
+ <h3 class="signature " id="rcon_authenticated?-instance_method">
1546
+
1547
+ - (<tt>Boolean</tt>) <strong>rcon_authenticated?</strong>
1548
+
1549
+
1550
+
1551
+
1552
+
1553
+ </h3><div class="docstring">
1554
+ <div class="discussion">
1555
+
1556
+ <p>Returns whether the RCON connection to this server is already authenticated</p>
1557
+
1558
+
1559
+ </div>
1560
+ </div>
1561
+ <div class="tags">
1562
+
1563
+ <p class="tag_title">Returns:</p>
1564
+ <ul class="return">
1565
+
1566
+ <li>
1567
+
1568
+
1569
+ <span class='type'>(<tt>Boolean</tt>)</span>
1570
+
1571
+
1572
+
1573
+ &mdash;
1574
+ <div class='inline'>
1575
+ <p><code>true</code> if the RCON connection is authenticated</p>
1576
+ </div>
1577
+
1578
+ </li>
1579
+
1580
+ </ul>
1581
+
1582
+ <p class="tag_title">See Also:</p>
1583
+ <ul class="see">
1584
+
1585
+ <li><span class='object_link'><a href="#rcon_auth-instance_method" title="GameServer#rcon_auth (method)">#rcon_auth</a></span></li>
1586
+
1587
+ </ul>
1588
+
1589
+ </div><table class="source_code">
1590
+ <tr>
1591
+ <td>
1592
+ <pre class="lines">
1593
+
1594
+
1595
+ 142
1596
+ 143
1597
+ 144</pre>
1598
+ </td>
1599
+ <td>
1600
+ <pre class="code"><span class="info file"># File 'lib/steam/servers/game_server.rb', line 142</span>
1601
+
1602
+ <span class='kw'>def</span> <span class='id identifier rubyid_rcon_authenticated?'>rcon_authenticated?</span>
1603
+ <span class='ivar'>@rcon_authenticated</span>
1604
+ <span class='kw'>end</span></pre>
1605
+ </td>
1606
+ </tr>
1607
+ </table>
1608
+ </div>
1609
+
1610
+ <div class="method_details ">
1611
+ <h3 class="signature " id="rcon_exec-instance_method">
1612
+
1613
+ - (<tt>String</tt>) <strong>rcon_exec</strong>(command)
1614
+
1615
+
1616
+
1617
+
1618
+
1619
+ </h3><div class="docstring">
1620
+ <div class="discussion">
1621
+ <div class="note abstract">
1622
+ <strong>This method is abstract.</strong>
1623
+ <div class='inline'>
1624
+ <p>Must be be implemented by including classes to handle the command
1625
+ execution</p>
1626
+ </div>
1627
+ </div>
1628
+
1629
+ <p>Remotely executes a command on the server via RCON</p>
1630
+
1631
+
1632
+ </div>
1633
+ </div>
1634
+ <div class="tags">
1635
+ <p class="tag_title">Parameters:</p>
1636
+ <ul class="param">
1637
+
1638
+ <li>
1639
+
1640
+ <span class='name'>command</span>
1641
+
1642
+
1643
+ <span class='type'>(<tt>String</tt>)</span>
1644
+
1645
+
1646
+
1647
+ &mdash;
1648
+ <div class='inline'>
1649
+ <p>The command to execute on the server</p>
1650
+ </div>
1651
+
1652
+ </li>
1653
+
1654
+ </ul>
1655
+
1656
+ <p class="tag_title">Returns:</p>
1657
+ <ul class="return">
1658
+
1659
+ <li>
1660
+
1661
+
1662
+ <span class='type'>(<tt>String</tt>)</span>
1663
+
1664
+
1665
+
1666
+ &mdash;
1667
+ <div class='inline'>
1668
+ <p>The output of the executed command</p>
1669
+ </div>
1670
+
1671
+ </li>
1672
+
1673
+ </ul>
1674
+ <p class="tag_title">Raises:</p>
1675
+ <ul class="raise">
1676
+
1677
+ <li>
1678
+
1679
+
1680
+ <span class='type'>(<tt>NotImplementedError</tt>)</span>
1681
+
1682
+
1683
+
1684
+ </li>
1685
+
1686
+ </ul>
1687
+
1688
+ <p class="tag_title">See Also:</p>
1689
+ <ul class="see">
1690
+
1691
+ <li><span class='object_link'><a href="#rcon_auth-instance_method" title="GameServer#rcon_auth (method)">#rcon_auth</a></span></li>
1692
+
1693
+ </ul>
1694
+
1695
+ </div><table class="source_code">
1696
+ <tr>
1697
+ <td>
1698
+ <pre class="lines">
1699
+
1700
+
1701
+ 153
1702
+ 154
1703
+ 155</pre>
1704
+ </td>
1705
+ <td>
1706
+ <pre class="code"><span class="info file"># File 'lib/steam/servers/game_server.rb', line 153</span>
1707
+
1708
+ <span class='kw'>def</span> <span class='id identifier rubyid_rcon_exec'>rcon_exec</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='rparen'>)</span>
1709
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>NotImplementedError</span>
1710
+ <span class='kw'>end</span></pre>
1711
+ </td>
1712
+ </tr>
1713
+ </table>
1714
+ </div>
1715
+
1716
+ <div class="method_details ">
1717
+ <h3 class="signature " id="reply-instance_method">
1718
+
1719
+ - (<tt><span class='object_link'><a href="SteamPacket.html" title="SteamPacket (module)">SteamPacket</a></span></tt>) <strong>reply</strong> <span class="extras">(protected)</span>
1720
+
1721
+
1722
+
1723
+
1724
+
1725
+ </h3><div class="docstring">
1726
+ <div class="discussion">
1727
+
1728
+ <p>Receives a response from the server</p>
1729
+
1730
+
1731
+ </div>
1732
+ </div>
1733
+ <div class="tags">
1734
+
1735
+ <p class="tag_title">Returns:</p>
1736
+ <ul class="return">
1737
+
1738
+ <li>
1739
+
1740
+
1741
+ <span class='type'>(<tt><span class='object_link'><a href="SteamPacket.html" title="SteamPacket (module)">SteamPacket</a></span></tt>)</span>
1742
+
1743
+
1744
+
1745
+ &mdash;
1746
+ <div class='inline'>
1747
+ <p>The response packet replied by the server</p>
1748
+ </div>
1749
+
1750
+ </li>
1751
+
1752
+ </ul>
1753
+
1754
+ </div><table class="source_code">
1755
+ <tr>
1756
+ <td>
1757
+ <pre class="lines">
1758
+
1759
+
1760
+ 382
1761
+ 383
1762
+ 384</pre>
1763
+ </td>
1764
+ <td>
1765
+ <pre class="code"><span class="info file"># File 'lib/steam/servers/game_server.rb', line 382</span>
1766
+
1767
+ <span class='kw'>def</span> <span class='id identifier rubyid_reply'>reply</span>
1768
+ <span class='ivar'>@socket</span><span class='period'>.</span><span class='id identifier rubyid_reply'>reply</span>
1769
+ <span class='kw'>end</span></pre>
1770
+ </td>
1771
+ </tr>
1772
+ </table>
1773
+ </div>
1774
+
1775
+ <div class="method_details ">
1776
+ <h3 class="signature " id="rules-instance_method">
1777
+
1778
+ - (<tt>Hash&lt;String, String&gt;</tt>) <strong>rules</strong>
1779
+
1780
+
1781
+
1782
+
1783
+
1784
+ </h3><div class="docstring">
1785
+ <div class="discussion">
1786
+
1787
+ <p>Returns the settings applied on the server. These settings are also
1788
+ called
1789
+ rules.</p>
1790
+
1791
+ <p>If the rules haven&#39;t been fetched yet, it is done when calling this
1792
+ method
1793
+ for the first time.</p>
1794
+
1795
+ <p>As the rules usually don&#39;t change often, there&#39;s almost no need to
1796
+ update
1797
+ this hash. But if you need to, you can achieve this by
1798
+ calling
1799
+ <span class='object_link'><a href="#update_rules-instance_method" title="GameServer#update_rules (method)">#update_rules</a></span>.</p>
1800
+
1801
+
1802
+ </div>
1803
+ </div>
1804
+ <div class="tags">
1805
+
1806
+ <p class="tag_title">Returns:</p>
1807
+ <ul class="return">
1808
+
1809
+ <li>
1810
+
1811
+
1812
+ <span class='type'>(<tt>Hash&lt;String, String&gt;</tt>)</span>
1813
+
1814
+
1815
+
1816
+ &mdash;
1817
+ <div class='inline'>
1818
+ <p>The currently active server rules</p>
1819
+ </div>
1820
+
1821
+ </li>
1822
+
1823
+ </ul>
1824
+
1825
+ <p class="tag_title">See Also:</p>
1826
+ <ul class="see">
1827
+
1828
+ <li><span class='object_link'><a href="#update_rules-instance_method" title="GameServer#update_rules (method)">#update_rules</a></span></li>
1829
+
1830
+ </ul>
1831
+
1832
+ </div><table class="source_code">
1833
+ <tr>
1834
+ <td>
1835
+ <pre class="lines">
1836
+
1837
+
1838
+ 169
1839
+ 170
1840
+ 171
1841
+ 172</pre>
1842
+ </td>
1843
+ <td>
1844
+ <pre class="code"><span class="info file"># File 'lib/steam/servers/game_server.rb', line 169</span>
1845
+
1846
+ <span class='kw'>def</span> <span class='id identifier rubyid_rules'>rules</span>
1847
+ <span class='id identifier rubyid_update_rules'>update_rules</span> <span class='kw'>if</span> <span class='ivar'>@rules_hash</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
1848
+ <span class='ivar'>@rules_hash</span>
1849
+ <span class='kw'>end</span></pre>
1850
+ </td>
1851
+ </tr>
1852
+ </table>
1853
+ </div>
1854
+
1855
+ <div class="method_details ">
1856
+ <h3 class="signature " id="send_request-instance_method">
1857
+
1858
+ - (<tt>Object</tt>) <strong>send_request</strong>(packet) <span class="extras">(protected)</span>
1859
+
1860
+
1861
+
1862
+
1863
+
1864
+ </h3><div class="docstring">
1865
+ <div class="discussion">
1866
+
1867
+ <p>Sends a request packet to the server</p>
1868
+
1869
+
1870
+ </div>
1871
+ </div>
1872
+ <div class="tags">
1873
+ <p class="tag_title">Parameters:</p>
1874
+ <ul class="param">
1875
+
1876
+ <li>
1877
+
1878
+ <span class='name'>packet</span>
1879
+
1880
+
1881
+ <span class='type'>(<tt><span class='object_link'><a href="SteamPacket.html" title="SteamPacket (module)">SteamPacket</a></span></tt>)</span>
1882
+
1883
+
1884
+
1885
+ &mdash;
1886
+ <div class='inline'>
1887
+ <p>The request packet to send to the server</p>
1888
+ </div>
1889
+
1890
+ </li>
1891
+
1892
+ </ul>
1893
+
1894
+
1895
+ </div><table class="source_code">
1896
+ <tr>
1897
+ <td>
1898
+ <pre class="lines">
1899
+
1900
+
1901
+ 389
1902
+ 390
1903
+ 391</pre>
1904
+ </td>
1905
+ <td>
1906
+ <pre class="code"><span class="info file"># File 'lib/steam/servers/game_server.rb', line 389</span>
1907
+
1908
+ <span class='kw'>def</span> <span class='id identifier rubyid_send_request'>send_request</span><span class='lparen'>(</span><span class='id identifier rubyid_packet'>packet</span><span class='rparen'>)</span>
1909
+ <span class='ivar'>@socket</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span> <span class='id identifier rubyid_packet'>packet</span>
1910
+ <span class='kw'>end</span></pre>
1911
+ </td>
1912
+ </tr>
1913
+ </table>
1914
+ </div>
1915
+
1916
+ <div class="method_details ">
1917
+ <h3 class="signature " id="server_info-instance_method">
1918
+
1919
+ - (<tt>Hash</tt>) <strong>server_info</strong>
1920
+
1921
+
1922
+
1923
+
1924
+
1925
+ </h3><div class="docstring">
1926
+ <div class="discussion">
1927
+
1928
+ <p>Returns a hash with basic information on the server.</p>
1929
+
1930
+ <p>If the server information haven&#39;t been fetched yet, it is done
1931
+ when
1932
+ calling this method for the first time.</p>
1933
+
1934
+ <p>The server information usually only changes on map change and when
1935
+ players
1936
+ join or leave. As the latter changes can be monitored by
1937
+ calling
1938
+ <span class='object_link'><a href="#update_players-instance_method" title="GameServer#update_players (method)">#update_players</a></span>, there&#39;s no need to call
1939
+ <span class='object_link'><a href="#update_server_info-instance_method" title="GameServer#update_server_info (method)">#update_server_info</a></span> very
1940
+ often.</p>
1941
+
1942
+
1943
+ </div>
1944
+ </div>
1945
+ <div class="tags">
1946
+
1947
+ <p class="tag_title">Returns:</p>
1948
+ <ul class="return">
1949
+
1950
+ <li>
1951
+
1952
+
1953
+ <span class='type'>(<tt>Hash</tt>)</span>
1954
+
1955
+
1956
+
1957
+ &mdash;
1958
+ <div class='inline'>
1959
+ <p>Server attributes with their values</p>
1960
+ </div>
1961
+
1962
+ </li>
1963
+
1964
+ </ul>
1965
+
1966
+ <p class="tag_title">See Also:</p>
1967
+ <ul class="see">
1968
+
1969
+ <li><span class='object_link'><a href="#update_server_info-instance_method" title="GameServer#update_server_info (method)">#update_server_info</a></span></li>
1970
+
1971
+ </ul>
1972
+
1973
+ </div><table class="source_code">
1974
+ <tr>
1975
+ <td>
1976
+ <pre class="lines">
1977
+
1978
+
1979
+ 186
1980
+ 187
1981
+ 188
1982
+ 189</pre>
1983
+ </td>
1984
+ <td>
1985
+ <pre class="code"><span class="info file"># File 'lib/steam/servers/game_server.rb', line 186</span>
1986
+
1987
+ <span class='kw'>def</span> <span class='id identifier rubyid_server_info'>server_info</span>
1988
+ <span class='id identifier rubyid_update_server_info'>update_server_info</span> <span class='kw'>if</span> <span class='ivar'>@info_hash</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
1989
+ <span class='ivar'>@info_hash</span>
1990
+ <span class='kw'>end</span></pre>
1991
+ </td>
1992
+ </tr>
1993
+ </table>
1994
+ </div>
1995
+
1996
+ <div class="method_details ">
1997
+ <h3 class="signature " id="to_s-instance_method">
1998
+
1999
+ - (<tt>String</tt>) <strong>to_s</strong>
2000
+
2001
+
2002
+
2003
+
2004
+
2005
+ </h3><div class="docstring">
2006
+ <div class="discussion">
2007
+
2008
+ <p>Returns a human-readable text representation of the server</p>
2009
+
2010
+
2011
+ </div>
2012
+ </div>
2013
+ <div class="tags">
2014
+
2015
+ <p class="tag_title">Returns:</p>
2016
+ <ul class="return">
2017
+
2018
+ <li>
2019
+
2020
+
2021
+ <span class='type'>(<tt>String</tt>)</span>
2022
+
2023
+
2024
+
2025
+ &mdash;
2026
+ <div class='inline'>
2027
+ <p>Available information about the server in a human-readable
2028
+ format</p>
2029
+ </div>
2030
+
2031
+ </li>
2032
+
2033
+ </ul>
2034
+
2035
+ </div><table class="source_code">
2036
+ <tr>
2037
+ <td>
2038
+ <pre class="lines">
2039
+
2040
+
2041
+ 347
2042
+ 348
2043
+ 349
2044
+ 350
2045
+ 351
2046
+ 352
2047
+ 353
2048
+ 354
2049
+ 355
2050
+ 356
2051
+ 357
2052
+ 358
2053
+ 359
2054
+ 360
2055
+ 361
2056
+ 362
2057
+ 363
2058
+ 364
2059
+ 365
2060
+ 366
2061
+ 367
2062
+ 368
2063
+ 369
2064
+ 370
2065
+ 371
2066
+ 372
2067
+ 373
2068
+ 374
2069
+ 375</pre>
2070
+ </td>
2071
+ <td>
2072
+ <pre class="code"><span class="info file"># File 'lib/steam/servers/game_server.rb', line 347</span>
2073
+
2074
+ <span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span>
2075
+ <span class='id identifier rubyid_return_string'>return_string</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span>
2076
+
2077
+ <span class='id identifier rubyid_return_string'>return_string</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Ping: </span><span class='embvar'>#</span><span class='ivar'>@ping</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span>
2078
+ <span class='id identifier rubyid_return_string'>return_string</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Challenge number: </span><span class='embvar'>#</span><span class='ivar'>@challenge_number</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span>
2079
+
2080
+ <span class='kw'>unless</span> <span class='ivar'>@info_hash</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
2081
+ <span class='id identifier rubyid_return_string'>return_string</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Info:\n</span><span class='tstring_end'>&quot;</span></span>
2082
+ <span class='ivar'>@info_hash</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span>
2083
+ <span class='id identifier rubyid_return_string'>return_string</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_key'>key</span><span class='embexpr_end'>}</span><span class='tstring_content'>: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span>
2084
+ <span class='kw'>end</span>
2085
+ <span class='kw'>end</span>
2086
+
2087
+ <span class='kw'>unless</span> <span class='ivar'>@player_hash</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
2088
+ <span class='id identifier rubyid_return_string'>return_string</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Players:\n</span><span class='tstring_end'>&quot;</span></span>
2089
+ <span class='ivar'>@player_hash</span><span class='period'>.</span><span class='id identifier rubyid_each_value'>each_value</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_player'>player</span><span class='op'>|</span>
2090
+ <span class='id identifier rubyid_return_string'>return_string</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_player'>player</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span>
2091
+ <span class='kw'>end</span>
2092
+ <span class='kw'>end</span>
2093
+
2094
+ <span class='kw'>unless</span> <span class='ivar'>@rules_hash</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
2095
+ <span class='id identifier rubyid_return_string'>return_string</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Rules:\n</span><span class='tstring_end'>&quot;</span></span>
2096
+ <span class='ivar'>@rules_hash</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span>
2097
+ <span class='id identifier rubyid_return_string'>return_string</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_key'>key</span><span class='embexpr_end'>}</span><span class='tstring_content'>: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_value'>value</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span>
2098
+ <span class='kw'>end</span>
2099
+ <span class='kw'>end</span>
2100
+
2101
+ <span class='id identifier rubyid_return_string'>return_string</span>
2102
+ <span class='kw'>end</span></pre>
2103
+ </td>
2104
+ </tr>
2105
+ </table>
2106
+ </div>
2107
+
2108
+ <div class="method_details ">
2109
+ <h3 class="signature " id="update_challenge_number-instance_method">
2110
+
2111
+ - (<tt>Object</tt>) <strong>update_challenge_number</strong>
2112
+
2113
+
2114
+
2115
+
2116
+
2117
+ </h3><div class="docstring">
2118
+ <div class="discussion">
2119
+
2120
+ <p>Sends a A2S_SERVERQUERY_GETCHALLENGE request to the server and updates
2121
+ the
2122
+ challenge number used to communicate with this server</p>
2123
+
2124
+ <p>There&#39;s usually no need to call this method explicitly,
2125
+ because
2126
+ <span class='object_link'><a href="#handle_response_for_request-instance_method" title="GameServer#handle_response_for_request (method)">#handle_response_for_request</a></span> will automatically get the challenge
2127
+ number
2128
+ when the server assigns a new one.</p>
2129
+
2130
+
2131
+ </div>
2132
+ </div>
2133
+ <div class="tags">
2134
+
2135
+
2136
+ <p class="tag_title">See Also:</p>
2137
+ <ul class="see">
2138
+
2139
+ <li><span class='object_link'><a href="#handle_response_for_request-instance_method" title="GameServer#handle_response_for_request (method)">#handle_response_for_request</a></span></li>
2140
+
2141
+ <li><span class='object_link'><a href="#init-instance_method" title="GameServer#init (method)">#init</a></span></li>
2142
+
2143
+ </ul>
2144
+
2145
+ </div><table class="source_code">
2146
+ <tr>
2147
+ <td>
2148
+ <pre class="lines">
2149
+
2150
+
2151
+ 323
2152
+ 324
2153
+ 325</pre>
2154
+ </td>
2155
+ <td>
2156
+ <pre class="code"><span class="info file"># File 'lib/steam/servers/game_server.rb', line 323</span>
2157
+
2158
+ <span class='kw'>def</span> <span class='id identifier rubyid_update_challenge_number'>update_challenge_number</span>
2159
+ <span class='id identifier rubyid_handle_response_for_request'>handle_response_for_request</span> <span class='symbol'>:challenge</span>
2160
+ <span class='kw'>end</span></pre>
2161
+ </td>
2162
+ </tr>
2163
+ </table>
2164
+ </div>
2165
+
2166
+ <div class="method_details ">
2167
+ <h3 class="signature " id="update_ping-instance_method">
2168
+
2169
+ - (<tt>Fixnum</tt>) <strong>update_ping</strong>
2170
+
2171
+
2172
+
2173
+
2174
+
2175
+ </h3><div class="docstring">
2176
+ <div class="discussion">
2177
+
2178
+ <p>Sends a A2S_INFO request to the server and measures the time needed for
2179
+ the
2180
+ reply</p>
2181
+
2182
+ <p>If this information is vital to you, be sure to call this method
2183
+ regularly
2184
+ to stay up-to-date.</p>
2185
+
2186
+
2187
+ </div>
2188
+ </div>
2189
+ <div class="tags">
2190
+
2191
+ <p class="tag_title">Returns:</p>
2192
+ <ul class="return">
2193
+
2194
+ <li>
2195
+
2196
+
2197
+ <span class='type'>(<tt>Fixnum</tt>)</span>
2198
+
2199
+
2200
+
2201
+ &mdash;
2202
+ <div class='inline'>
2203
+ <p>The latency of this server in milliseconds</p>
2204
+ </div>
2205
+
2206
+ </li>
2207
+
2208
+ </ul>
2209
+
2210
+ <p class="tag_title">See Also:</p>
2211
+ <ul class="see">
2212
+
2213
+ <li><span class='object_link'><a href="#ping-instance_method" title="GameServer#ping (method)">#ping</a></span></li>
2214
+
2215
+ </ul>
2216
+
2217
+ </div><table class="source_code">
2218
+ <tr>
2219
+ <td>
2220
+ <pre class="lines">
2221
+
2222
+
2223
+ 335
2224
+ 336
2225
+ 337
2226
+ 338
2227
+ 339
2228
+ 340
2229
+ 341</pre>
2230
+ </td>
2231
+ <td>
2232
+ <pre class="code"><span class="info file"># File 'lib/steam/servers/game_server.rb', line 335</span>
2233
+
2234
+ <span class='kw'>def</span> <span class='id identifier rubyid_update_ping'>update_ping</span>
2235
+ <span class='id identifier rubyid_send_request'>send_request</span> <span class='const'>A2S_INFO_Packet</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
2236
+ <span class='id identifier rubyid_start_time'>start_time</span> <span class='op'>=</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span>
2237
+ <span class='id identifier rubyid_reply'>reply</span>
2238
+ <span class='id identifier rubyid_end_time'>end_time</span> <span class='op'>=</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span>
2239
+ <span class='ivar'>@ping</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_end_time'>end_time</span> <span class='op'>-</span> <span class='id identifier rubyid_start_time'>start_time</span><span class='rparen'>)</span> <span class='op'>*</span> <span class='int'>1000</span>
2240
+ <span class='kw'>end</span></pre>
2241
+ </td>
2242
+ </tr>
2243
+ </table>
2244
+ </div>
2245
+
2246
+ <div class="method_details ">
2247
+ <h3 class="signature " id="update_players-instance_method">
2248
+
2249
+ - (<tt>Object</tt>) <strong>update_players</strong>(rcon_password = nil)
2250
+
2251
+
2252
+
2253
+
2254
+
2255
+ </h3><div class="docstring">
2256
+ <div class="discussion">
2257
+
2258
+ <p>Sends a A2S_PLAYERS request to the server and updates the players&#39; data
2259
+ for
2260
+ this server</p>
2261
+
2262
+ <p>As the players and their scores change quite often be sure to update
2263
+ this
2264
+ list regularly by calling this method if you rely on this
2265
+ information.</p>
2266
+
2267
+
2268
+ </div>
2269
+ </div>
2270
+ <div class="tags">
2271
+ <p class="tag_title">Parameters:</p>
2272
+ <ul class="param">
2273
+
2274
+ <li>
2275
+
2276
+ <span class='name'>rcon_password</span>
2277
+
2278
+
2279
+ <span class='type'>(<tt>String</tt>)</span>
2280
+
2281
+
2282
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
2283
+
2284
+
2285
+ &mdash;
2286
+ <div class='inline'>
2287
+ <p>The RCON password of this server may be
2288
+ provided to gather more detailed
2289
+ information on the players, like
2290
+ STEAM_IDs.</p>
2291
+ </div>
2292
+
2293
+ </li>
2294
+
2295
+ </ul>
2296
+
2297
+
2298
+ <p class="tag_title">See Also:</p>
2299
+ <ul class="see">
2300
+
2301
+ <li><span class='object_link'><a href="#handle_response_for_request-instance_method" title="GameServer#handle_response_for_request (method)">#handle_response_for_request</a></span></li>
2302
+
2303
+ <li><span class='object_link'><a href="#players-instance_method" title="GameServer#players (method)">#players</a></span></li>
2304
+
2305
+ </ul>
2306
+
2307
+ </div><table class="source_code">
2308
+ <tr>
2309
+ <td>
2310
+ <pre class="lines">
2311
+
2312
+
2313
+ 265
2314
+ 266
2315
+ 267
2316
+ 268
2317
+ 269
2318
+ 270
2319
+ 271
2320
+ 272
2321
+ 273
2322
+ 274
2323
+ 275
2324
+ 276
2325
+ 277
2326
+ 278
2327
+ 279
2328
+ 280
2329
+ 281
2330
+ 282
2331
+ 283
2332
+ 284
2333
+ 285
2334
+ 286
2335
+ 287</pre>
2336
+ </td>
2337
+ <td>
2338
+ <pre class="code"><span class="info file"># File 'lib/steam/servers/game_server.rb', line 265</span>
2339
+
2340
+ <span class='kw'>def</span> <span class='id identifier rubyid_update_players'>update_players</span><span class='lparen'>(</span><span class='id identifier rubyid_rcon_password'>rcon_password</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
2341
+ <span class='id identifier rubyid_handle_response_for_request'>handle_response_for_request</span> <span class='symbol'>:players</span>
2342
+
2343
+ <span class='kw'>unless</span> <span class='ivar'>@rcon_authenticated</span>
2344
+ <span class='kw'>return</span> <span class='kw'>if</span> <span class='id identifier rubyid_rcon_password'>rcon_password</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
2345
+ <span class='id identifier rubyid_rcon_auth'>rcon_auth</span> <span class='id identifier rubyid_rcon_password'>rcon_password</span>
2346
+ <span class='kw'>end</span>
2347
+
2348
+ <span class='id identifier rubyid_players'>players</span> <span class='op'>=</span> <span class='id identifier rubyid_rcon_exec'>rcon_exec</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>status</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_lines'>lines</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_line'>line</span><span class='op'>|</span>
2349
+ <span class='id identifier rubyid_line'>line</span><span class='period'>.</span><span class='id identifier rubyid_start_with?'>start_with?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>#</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_line'>line</span> <span class='op'>!=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>#end\n</span><span class='tstring_end'>&quot;</span></span>
2350
+ <span class='kw'>end</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_line'>line</span><span class='op'>|</span>
2351
+ <span class='id identifier rubyid_line'>line</span><span class='lbracket'>[</span><span class='int'>1</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_strip'>strip</span>
2352
+ <span class='kw'>end</span>
2353
+ <span class='id identifier rubyid_attributes'>attributes</span> <span class='op'>=</span> <span class='const'>GameServer</span><span class='period'>.</span><span class='id identifier rubyid_player_status_attributes'>player_status_attributes</span> <span class='id identifier rubyid_players'>players</span><span class='period'>.</span><span class='id identifier rubyid_shift'>shift</span>
2354
+
2355
+ <span class='id identifier rubyid_players'>players</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_player'>player</span><span class='op'>|</span>
2356
+ <span class='id identifier rubyid_player_data'>player_data</span> <span class='op'>=</span> <span class='const'>GameServer</span><span class='period'>.</span><span class='id identifier rubyid_split_player_status'>split_player_status</span><span class='lparen'>(</span><span class='id identifier rubyid_attributes'>attributes</span><span class='comma'>,</span> <span class='id identifier rubyid_player'>player</span><span class='rparen'>)</span>
2357
+ <span class='id identifier rubyid_player_name'>player_name</span> <span class='op'>=</span> <span class='id identifier rubyid_player_data'>player_data</span><span class='lbracket'>[</span><span class='symbol'>:name</span><span class='rbracket'>]</span>
2358
+ <span class='kw'>if</span> <span class='ivar'>@player_hash</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span> <span class='id identifier rubyid_player_name'>player_name</span>
2359
+ <span class='ivar'>@player_hash</span><span class='lbracket'>[</span><span class='id identifier rubyid_player_name'>player_name</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_add_info'>add_info</span> <span class='id identifier rubyid_player_data'>player_data</span>
2360
+ <span class='kw'>end</span>
2361
+ <span class='kw'>end</span>
2362
+ <span class='kw'>end</span></pre>
2363
+ </td>
2364
+ </tr>
2365
+ </table>
2366
+ </div>
2367
+
2368
+ <div class="method_details ">
2369
+ <h3 class="signature " id="update_rules-instance_method">
2370
+
2371
+ - (<tt>Object</tt>) <strong>update_rules</strong>
2372
+
2373
+
2374
+
2375
+
2376
+
2377
+ </h3><div class="docstring">
2378
+ <div class="discussion">
2379
+
2380
+ <p>Sends a A2S_RULES request to the server and updates the rules of
2381
+ this
2382
+ server</p>
2383
+
2384
+ <p>As the rules usually don&#39;t change often, there&#39;s almost no need to
2385
+ update
2386
+ this hash. But if you need to, you can achieve this by calling this
2387
+ method.</p>
2388
+
2389
+
2390
+ </div>
2391
+ </div>
2392
+ <div class="tags">
2393
+
2394
+
2395
+ <p class="tag_title">See Also:</p>
2396
+ <ul class="see">
2397
+
2398
+ <li><span class='object_link'><a href="#handle_response_for_request-instance_method" title="GameServer#handle_response_for_request (method)">#handle_response_for_request</a></span></li>
2399
+
2400
+ <li><span class='object_link'><a href="#rules-instance_method" title="GameServer#rules (method)">#rules</a></span></li>
2401
+
2402
+ </ul>
2403
+
2404
+ </div><table class="source_code">
2405
+ <tr>
2406
+ <td>
2407
+ <pre class="lines">
2408
+
2409
+
2410
+ 297
2411
+ 298
2412
+ 299</pre>
2413
+ </td>
2414
+ <td>
2415
+ <pre class="code"><span class="info file"># File 'lib/steam/servers/game_server.rb', line 297</span>
2416
+
2417
+ <span class='kw'>def</span> <span class='id identifier rubyid_update_rules'>update_rules</span>
2418
+ <span class='id identifier rubyid_handle_response_for_request'>handle_response_for_request</span> <span class='symbol'>:rules</span>
2419
+ <span class='kw'>end</span></pre>
2420
+ </td>
2421
+ </tr>
2422
+ </table>
2423
+ </div>
2424
+
2425
+ <div class="method_details ">
2426
+ <h3 class="signature " id="update_server_info-instance_method">
2427
+
2428
+ - (<tt>Object</tt>) <strong>update_server_info</strong>
2429
+
2430
+
2431
+
2432
+
2433
+
2434
+ </h3><div class="docstring">
2435
+ <div class="discussion">
2436
+
2437
+ <p>Sends a A2S_INFO request to the server and updates this server&#39;s
2438
+ basic
2439
+ information</p>
2440
+
2441
+ <p>The server information usually only changes on map change and when
2442
+ players
2443
+ join or leave. As the latter changes can be monitored by
2444
+ calling
2445
+ <span class='object_link'><a href="#update_players-instance_method" title="GameServer#update_players (method)">#update_players</a></span>, there&#39;s no need to call this method very
2446
+ often.</p>
2447
+
2448
+
2449
+ </div>
2450
+ </div>
2451
+ <div class="tags">
2452
+
2453
+
2454
+ <p class="tag_title">See Also:</p>
2455
+ <ul class="see">
2456
+
2457
+ <li><span class='object_link'><a href="#handle_response_for_request-instance_method" title="GameServer#handle_response_for_request (method)">#handle_response_for_request</a></span></li>
2458
+
2459
+ <li><span class='object_link'><a href="#server_info-instance_method" title="GameServer#server_info (method)">#server_info</a></span></li>
2460
+
2461
+ </ul>
2462
+
2463
+ </div><table class="source_code">
2464
+ <tr>
2465
+ <td>
2466
+ <pre class="lines">
2467
+
2468
+
2469
+ 310
2470
+ 311
2471
+ 312</pre>
2472
+ </td>
2473
+ <td>
2474
+ <pre class="code"><span class="info file"># File 'lib/steam/servers/game_server.rb', line 310</span>
2475
+
2476
+ <span class='kw'>def</span> <span class='id identifier rubyid_update_server_info'>update_server_info</span>
2477
+ <span class='id identifier rubyid_handle_response_for_request'>handle_response_for_request</span> <span class='symbol'>:info</span>
2478
+ <span class='kw'>end</span></pre>
2479
+ </td>
2480
+ </tr>
2481
+ </table>
2482
+ </div>
2483
+
2484
+ </div>
2485
+
2486
+ </div>
2487
+
2488
+ <div id="footer">
2489
+ Generated on Tue Jul 22 07:10:16 2014 by
2490
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2491
+ 0.8.7.3 (ruby-2.0.0).
2492
+ </div>
2493
+
2494
+ </body>
2495
+ </html>