{"action":"opened","issue":{"url":"https://api.github.com/repos/Austinb/GameQ/issues/242","labels_url":"https://api.github.com/repos/Austinb/GameQ/issues/242/labels{/name}","comments_url":"https://api.github.com/repos/Austinb/GameQ/issues/242/comments","events_url":"https://api.github.com/repos/Austinb/GameQ/issues/242/events","html_url":"https://github.com/Austinb/GameQ/issues/242","id":66263467,"number":242,"title":"GameQ2 - MOHAA and BF1942 Support","user":{"login":"own3mall","id":11792538,"avatar_url":"https://avatars.githubusercontent.com/u/11792538?v=3","gravatar_id":"","url":"https://api.github.com/users/own3mall","html_url":"https://github.com/own3mall","followers_url":"https://api.github.com/users/own3mall/followers","following_url":"https://api.github.com/users/own3mall/following{/other_user}","gists_url":"https://api.github.com/users/own3mall/gists{/gist_id}","starred_url":"https://api.github.com/users/own3mall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/own3mall/subscriptions","organizations_url":"https://api.github.com/users/own3mall/orgs","repos_url":"https://api.github.com/users/own3mall/repos","events_url":"https://api.github.com/users/own3mall/events{/privacy}","received_events_url":"https://api.github.com/users/own3mall/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-04T02:13:58Z","updated_at":"2015-04-04T02:13:58Z","closed_at":null,"body":"Hi,\r\n\r\nI cannot get GameQ2 to work for any of the game servers I need to scan.  I'd like to scan MOHAA and BF1942 servers, but all I get back is the following:\r\n\r\nReceived the following data!\r\nArray\r\n(\r\n    [bf1942] => Array\r\n        (\r\n            [gq_online] => \r\n            [gq_address] => 109.169.20.199\r\n            [gq_port] => 14567\r\n\r\n            [gq_protocol] => gamespy\r\n            [gq_type] => bf1942\r\n            [gq_name] => Battlefield 1942\r\n            [gq_transport] => udp\r\n            [gq_joinlink] => \r\n        )\r\n\r\n)\r\n\r\nThus, it seems to have not queried the server at all, as this server is online.  I was hoping to at least get back the following information:\r\n\r\n\r\n\t\t$data = $data[$gameKey];\r\n\t\tif(is_array($data)){\r\n\t\t\t// Write server information\r\n\t\t\t$gameIcon = $gameKey;\r\n\t\t\t$currentPlayers = $data[\"numplayers\"];\r\n\t\t\t$maxPlayers = $data[\"maxplayers\"];\r\n\t\t\t$hostname = $data[\"hostname\"];\r\n\t\t\t$gameType = $data[\"gametype\"];\r\n\t\t\t$map = $data[\"mapname\"];\r\n\t\t\t$version = $data[\"version\"];\r\n\t\t\t$fullIP = $ip . \":\" . $port;\r\n\r\nFor MOHAA servers, you need to query each server by sending this command:\r\n\r\n// 5 second timeout\r\n\t\t\t\t$socket = stream_socket_client(\"udp://$fullIP\", $errno, $errstr, 5);\r\n\t\t\t\tstream_set_blocking($socket, true);\r\n\t\t\t\tstream_set_timeout($socket, 5);\r\n\t\t\t\t\r\n\t\t\t\tif (!$socket) {\r\n\t\t\t\t\t// Server is offline\r\n\t\t\t\t\t$errors[] = \"$errstr ($errno)\";\r\n\t\t\t\t\t$errorCount++;\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\t// Server is online\t\t\t\t\r\n\t\t\t\t\t// Get server information\r\n\t\t\t\t\t\r\n\t\t\t\t\t$cmd = \"\\xFF\\xFF\\xFF\\xFF\\x02getstatus\";\r\n\t\t\t\t\tfwrite($socket, $cmd);\r\n\t\t\t\t\t$statusResults = stream_get_contents($socket); \r\n\r\nI'm not sure what you need to send for BF1942 servers, but I was sure hoping to use this library rather than writing my own for BF1942 even though I already wrote one for MOHAA.  However, I was hoping to use a class library that worked for both games.  \r\n\r\nCould you please look into it or add support for those games in version 3 that actually works?"}}