steam-condenser 1.2.0 → 1.2.1

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