diff --git a/src/GameQ/Protocols/Conanexiles.php b/src/GameQ/Protocols/Conanexiles.php new file mode 100644 index 00000000..a097e1d8 --- /dev/null +++ b/src/GameQ/Protocols/Conanexiles.php @@ -0,0 +1,42 @@ +. + */ + +namespace GameQ\Protocols; + +/** + * Class Conanexiles + * + * @package GameQ\Protocols + * @author Austin Bischoff + */ +class Conanexiles extends Source +{ + /** + * String name of this protocol class + * + * @type string + */ + protected $name = 'conanexiles'; + + /** + * Longer string name of this protocol class + * + * @type string + */ + protected $name_long = "Conan Exiles"; +} diff --git a/tests/Protocols/Conanexiles.php b/tests/Protocols/Conanexiles.php new file mode 100644 index 00000000..28a50c00 --- /dev/null +++ b/tests/Protocols/Conanexiles.php @@ -0,0 +1,54 @@ +. + */ + +namespace GameQ\Tests\Protocols; + +/** + * Test Class for Conanexiles + * + * @package GameQ\Tests\Protocols + */ +class Conanexiles extends Base +{ + /** + * Test responses for Dods + * + * @dataProvider loadData + * + * @param $responses + * @param $result + */ + public function testResponses($responses, $result) + { + + // Pull the first key off the array this is the server ip:port + $server = key($result); + + $testResult = $this->queryTest( + $server, + 'conanexiles', + $responses, + false, + [ + \GameQ\Server::SERVER_OPTIONS_QUERY_PORT => $result[ $server ]['gq_port_query'], + ] + ); + + $this->assertEquals($result[$server], $testResult, '', 0.00000001); + } +} diff --git a/tests/Protocols/Providers/Conanexiles/1_response.txt b/tests/Protocols/Providers/Conanexiles/1_response.txt new file mode 100644 index 00000000..580cab2f Binary files /dev/null and b/tests/Protocols/Providers/Conanexiles/1_response.txt differ diff --git a/tests/Protocols/Providers/Conanexiles/1_result.json b/tests/Protocols/Providers/Conanexiles/1_result.json new file mode 100644 index 00000000..c7967e44 --- /dev/null +++ b/tests/Protocols/Providers/Conanexiles/1_result.json @@ -0,0 +1 @@ +{"85.114.155.195:27015":{"CSF_i":"0","HOSTIP":"1433574339","HOSTPORT":"7777","OWNINGID":"90109545464288261","OWNINGNAME":"[GER] Blood & Sand [PvP(RP)HVx2] Admins, Rules, No Avatars","P2PADDR":"90109545464288261","P2PPORT":"7777","S05_b":"true","S0_b":"true","S15_b":"false","S18_b":"true","S2_b":"false","S6_f":"0.100000","S7_b":"true","SESSIONFLAGS":"523","Sa_b":"true","Sb_f":"0.800000","Sf_f":"1.000000","Sk_f":"0.250000","So_f":"1200.000000","Sr_f":"10000.000000","Su_i":"4","Sv_f":"1.000000","Sx_i":"12","Sy_i":"0","dedicated":"d","game_descr":"Conan Exiles","game_dir":"conanexiles","game_id":440900,"gq_address":"85.114.155.195","gq_joinlink":"steam:\/\/connect\/85.114.155.195:27015\/","gq_name":"Conan Exiles","gq_online":true,"gq_port_client":27015,"gq_port_query":27015,"gq_protocol":"source","gq_transport":"udp","gq_type":"conanexiles","hostname":"[GER] Blood & Sand [PvP(RP)HVx2] Admins, Rules, No Avatars","keywords":"BUILDID:256536549,OWNINGID:90109545464288261,OWNINGNAME:[GER] Blood & Sand [PvP(RP)HVx2] Admins, Rules, No Avatars,P2PPORT:7777","map":"The Exiled Lands","max_players":70,"num_bots":0,"num_players":18,"num_rules":28,"os":"w","password":0,"players":[{"id":0,"name":"Miller","score":0,"time":14230.8125},{"id":0,"name":"Monshy","score":0,"time":14149.408203125},{"id":0,"name":"Tristan","score":0,"time":12823.291992188},{"id":0,"name":"Hauptmann Stahl","score":0,"time":10072.771484375},{"id":0,"name":"Memo","score":0,"time":9202.734375},{"id":0,"name":"Mat-Thorne","score":0,"time":8856.5234375},{"id":0,"name":"zumhieressen","score":0,"time":6606.5903320312},{"id":0,"name":"Maroner","score":0,"time":6271.3994140625},{"id":0,"name":"El Fiero","score":0,"time":4555.3115234375},{"id":0,"name":"Akatsuki","score":0,"time":3905.6616210938},{"id":0,"name":"martin.geez","score":0,"time":2906.0234375},{"id":0,"name":"Bane","score":0,"time":2733.3444824219},{"id":0,"name":"lthola","score":0,"time":2363.2619628906},{"id":0,"name":"LuckyLouGER","score":0,"time":1922.4068603516},{"id":0,"name":"Barbarella","score":0,"time":1574.6242675781},{"id":0,"name":"Sir_Hect0r_2.0","score":0,"time":1255.36328125},{"id":0,"name":"Yemaja","score":0,"time":451.47943115234},{"id":0,"name":"The Doctor","score":0,"time":133.0213470459}],"port":7777,"protocol":17,"sc_f":"10.000000","se_f":"0.500000","secure":1,"sl_f":"2.000000","steam_id":90109545464288261,"steamappid":0,"version":"1.0.0.0"}} \ No newline at end of file diff --git a/tests/Protocols/Providers/Conanexiles/2_response.txt b/tests/Protocols/Providers/Conanexiles/2_response.txt new file mode 100644 index 00000000..2fe3da67 Binary files /dev/null and b/tests/Protocols/Providers/Conanexiles/2_response.txt differ diff --git a/tests/Protocols/Providers/Conanexiles/2_result.json b/tests/Protocols/Providers/Conanexiles/2_result.json new file mode 100644 index 00000000..b71ed329 --- /dev/null +++ b/tests/Protocols/Providers/Conanexiles/2_result.json @@ -0,0 +1 @@ +{"31.186.250.173:7777":{"CSF_i":"0","HOSTIP":"532347565","HOSTPORT":"7777","OWNINGID":"90109540268569604","OWNINGNAME":"KH#1[UK\/EU]ALLx6[24\/06]EVENTS\/NOGOD KHGAMING.CO.UK","P2PADDR":"90109540268569604","P2PPORT":"7777","S05_b":"true","S0_b":"true","S15_b":"false","S18_b":"true","S7_b":"true","SESSIONFLAGS":"523","Sa_b":"true","Sb_f":"0.500000","Sf_f":"6.000000","Sg_f":"10.000000","Sj_f":"1.300000","Sk_f":"0.500000","Sm_f":"2.000000","So_f":"900.000000","Su_i":"2","Sw_f":"120.000000","Sx_i":"8","Sy_i":"0","dedicated":"d","game_descr":"Conan Exiles","game_dir":"conanexiles","game_id":440900,"gq_address":"31.186.250.173","gq_joinlink":"steam:\/\/connect\/31.186.250.173:7777\/","gq_name":"Conan Exiles","gq_online":true,"gq_port_client":7777,"gq_port_query":27015,"gq_protocol":"source","gq_transport":"udp","gq_type":"conanexiles","hostname":"KH#1[UK\/EU]ALLx6[24\/06]EVENTS\/NOGOD KHGAMING.CO.UK","keywords":"BUILDID:256536549,OWNINGID:90109540268569604,OWNINGNAME:KH#1[UK\/EU]ALLx6[24\/06]EVENTS\/NOGOD KHGAMING.CO.UK,HOSTIP:532347565","map":"The Exiled Lands","max_players":70,"num_bots":0,"num_players":22,"num_rules":28,"os":"w","password":0,"players":[{"id":0,"name":"Games Foundry","score":0,"time":24031.859375},{"id":0,"name":"Stanislav Rink","score":0,"time":12920.913085938},{"id":0,"name":"Rastafreaak","score":0,"time":9190.6064453125},{"id":0,"name":"Igas","score":0,"time":6897.5263671875},{"id":0,"name":"\"CONAN EXILES\"","score":0,"time":6269.919921875},{"id":0,"name":"carlos89j","score":0,"time":5068.6474609375},{"id":0,"name":"VikingLord","score":0,"time":4934.224609375},{"id":0,"name":"Moraiz92","score":0,"time":3930.3786621094},{"id":0,"name":"Ashen-Shugar","score":0,"time":3794.3669433594},{"id":0,"name":"Claire","score":0,"time":3778.5329589844},{"id":0,"name":"Badbonez","score":0,"time":3544.4113769531},{"id":0,"name":"♥ Cyria |I| Dana ♥","score":0,"time":3197.2294921875},{"id":0,"name":"C4","score":0,"time":2557.4655761719},{"id":0,"name":"kisbye1","score":0,"time":1639.34765625},{"id":0,"name":"Matthi","score":0,"time":1590.5541992188},{"id":0,"name":"kosete83","score":0,"time":1562.9281005859},{"id":0,"name":"Depravao","score":0,"time":971.13580322266},{"id":0,"name":"BitsnPieces","score":0,"time":867.36468505859},{"id":0,"name":"dat_Shane","score":0,"time":650.52447509766},{"id":0,"name":"Palczi","score":0,"time":426.59994506836},{"id":0,"name":"GAbrieL","score":0,"time":215.14616394043},{"id":0,"name":"Silverman","score":0,"time":193.0185546875}],"port":7777,"protocol":17,"sc_f":"10.000000","se_f":"0.500000","secure":1,"sl_f":"6.000000","steam_id":90109540268569604,"steamappid":0,"version":"1.0.0.0"}} \ No newline at end of file diff --git a/tests/Protocols/Providers/Conanexiles/3_response.txt b/tests/Protocols/Providers/Conanexiles/3_response.txt new file mode 100644 index 00000000..aaa6f092 Binary files /dev/null and b/tests/Protocols/Providers/Conanexiles/3_response.txt differ diff --git a/tests/Protocols/Providers/Conanexiles/3_result.json b/tests/Protocols/Providers/Conanexiles/3_result.json new file mode 100644 index 00000000..154e486f --- /dev/null +++ b/tests/Protocols/Providers/Conanexiles/3_result.json @@ -0,0 +1 @@ +{"193.111.186.177:7777":{"ALLOWDOWNLOADCHARS_i":"0","ALLOWDOWNLOADITEMS_i":"0","CUSTOMSERVERNAME_s":"(orp2)(wiped 13\/6)gamersreunited-10x(g)10x(t)5x(xp)","DayTime_s":"11:41","GameMode_s":"TestGameMode_xtcrisland_C","MATCHTIMEOUT_f":"120.000000","MOD0_s":"599476919:80B7AFED4294E3805C8C079C70A1AF74","MOD1_s":"731604991:8E24D60643B4AD865ADCCDB6BD0EC89A","MOD2_s":"609425335:AB0E60CF432B2C7019771399AEDA5F4A","MOD3_s":"566885854:4A5A1F1C49F88442D00B3186474D171A","ModId_l":"0","NUMOPENPUBCONN":"49","Networking_i":"0","OFFICIALSERVER_i":"0","OWNINGID":"90109502901488645","OWNINGNAME":"90109502901488645","P2PADDR":"90109502901488645","P2PPORT":"7777","SEARCHKEYWORDS_s":"Custom","SERVERUSESBATTLEYE_b":"true","SESSIONFLAGS":"683","SESSIONISPVE_i":"0","ServerPassword_b":"false","dedicated":"d","game_descr":"ARK: Survival Evolved","game_dir":"ark_survival_evolved","game_id":346110,"gq_address":"193.111.186.177","gq_joinlink":"steam:\/\/connect\/193.111.186.177:7777\/","gq_name":"Conan Exiles","gq_online":true,"gq_port_client":7777,"gq_port_query":27015,"gq_protocol":"source","gq_transport":"udp","gq_type":"conanexiles","hostname":"(ORP2)(Wiped 13\/6)GamersReunited-10x(G)10x(T)5x(XP) - (v259.35)","keywords":",OWNINGID:90109502901488645,OWNINGNAME:90109502901488645,NUMOPENPUBCONN:49,P2PADDR:90109502901488645,P2PPORT:7777,ModId_l:0","map":"TheIsland","max_players":50,"num_bots":0,"num_players":4,"num_rules":23,"os":"w","password":0,"players":[{"id":0,"name":"","score":0,"time":139524.46875},{"id":0,"name":"","score":0,"time":90719.78125},{"id":0,"name":"","score":0,"time":70353.6171875},{"id":0,"name":"banther","score":0,"time":14043.213867188}],"port":7777,"protocol":17,"secure":1,"steam_id":90109502901488645,"steamappid":0,"version":"1.0.0.0"}} \ No newline at end of file