From bf761d9522917cbbe168d0fad0a847e054ce0ba2 Mon Sep 17 00:00:00 2001 From: Eranio <76605008+Erani0@users.noreply.github.com> Date: Sat, 27 Aug 2022 21:42:52 +0200 Subject: [PATCH 1/5] Add Pterodactyl Games Add Barotrauma Add Black Mesa Add Citadel Forged with fire Add Half Life Add Fistful of Frags Add Modiverse Add No More Room in Hell Add Open Fortress Add Stormworks Build and Rescue Add Sven Co-op Signed-off-by: Eranio --- src/GameQ/Protocols/Barotrauma.php | 49 ++++++++++++++++ src/GameQ/Protocols/Blackmesa.php | 50 +++++++++++++++++ src/GameQ/Protocols/Citadel.php | 50 +++++++++++++++++ src/GameQ/Protocols/Fof.php | 43 ++++++++++++++ src/GameQ/Protocols/Hl1.php | 43 ++++++++++++++ src/GameQ/Protocols/Modiverse.php | 43 ++++++++++++++ src/GameQ/Protocols/Nmrih.php | 43 ++++++++++++++ src/GameQ/Protocols/Of.php | 43 ++++++++++++++ src/GameQ/Protocols/Sco.php | 50 +++++++++++++++++ src/GameQ/Protocols/Stormworks.php | 50 +++++++++++++++++ tests/Protocols/Barotrauma.php | 48 ++++++++++++++++ tests/Protocols/Blackmesa.php | 49 ++++++++++++++++ tests/Protocols/Citadel.php | 49 ++++++++++++++++ tests/Protocols/Fof.php | 53 ++++++++++++++++++ tests/Protocols/Hl1.php | 53 ++++++++++++++++++ tests/Protocols/Modiverse.php | 53 ++++++++++++++++++ tests/Protocols/Nmrih.php | 53 ++++++++++++++++++ tests/Protocols/Of.php | 53 ++++++++++++++++++ .../Providers/Barotrauma/1_response.txt | Bin 0 -> 495 bytes .../Providers/Barotrauma/1_result.json | 1 + .../Providers/Blackmesa/1_response.txt | Bin 0 -> 9553 bytes .../Providers/Blackmesa/1_result.json | 1 + .../Providers/Citadel/1_response.txt | Bin 0 -> 117 bytes .../Protocols/Providers/Citadel/1_result.json | 1 + tests/Protocols/Providers/Fof/1_response.txt | Bin 0 -> 2473 bytes tests/Protocols/Providers/Fof/1_result.json | 1 + tests/Protocols/Providers/Hl1/1_response.txt | Bin 0 -> 1800 bytes tests/Protocols/Providers/Hl1/1_result.json | 1 + .../Providers/Modiverse/1_response.txt | Bin 0 -> 346 bytes .../Providers/Modiverse/1_result.json | 1 + .../Protocols/Providers/Nmrih/1_response.txt | Bin 0 -> 1923 bytes tests/Protocols/Providers/Nmrih/1_result.json | 1 + tests/Protocols/Providers/Of/1_response.txt | Bin 0 -> 9584 bytes tests/Protocols/Providers/Of/1_result.json | 1 + tests/Protocols/Providers/Sco/1_response.txt | Bin 0 -> 917 bytes tests/Protocols/Providers/Sco/1_result.json | 1 + .../Providers/Stormworks/1_response.txt | Bin 0 -> 111 bytes .../Providers/Stormworks/1_result.json | 1 + tests/Protocols/Sco.php | 53 ++++++++++++++++++ tests/Protocols/Stormworks.php | 53 ++++++++++++++++++ 40 files changed, 991 insertions(+) create mode 100644 src/GameQ/Protocols/Barotrauma.php create mode 100644 src/GameQ/Protocols/Blackmesa.php create mode 100644 src/GameQ/Protocols/Citadel.php create mode 100644 src/GameQ/Protocols/Fof.php create mode 100644 src/GameQ/Protocols/Hl1.php create mode 100644 src/GameQ/Protocols/Modiverse.php create mode 100644 src/GameQ/Protocols/Nmrih.php create mode 100644 src/GameQ/Protocols/Of.php create mode 100644 src/GameQ/Protocols/Sco.php create mode 100644 src/GameQ/Protocols/Stormworks.php create mode 100644 tests/Protocols/Barotrauma.php create mode 100644 tests/Protocols/Blackmesa.php create mode 100644 tests/Protocols/Citadel.php create mode 100644 tests/Protocols/Fof.php create mode 100644 tests/Protocols/Hl1.php create mode 100644 tests/Protocols/Modiverse.php create mode 100644 tests/Protocols/Nmrih.php create mode 100644 tests/Protocols/Of.php create mode 100644 tests/Protocols/Providers/Barotrauma/1_response.txt create mode 100644 tests/Protocols/Providers/Barotrauma/1_result.json create mode 100644 tests/Protocols/Providers/Blackmesa/1_response.txt create mode 100644 tests/Protocols/Providers/Blackmesa/1_result.json create mode 100644 tests/Protocols/Providers/Citadel/1_response.txt create mode 100644 tests/Protocols/Providers/Citadel/1_result.json create mode 100644 tests/Protocols/Providers/Fof/1_response.txt create mode 100644 tests/Protocols/Providers/Fof/1_result.json create mode 100644 tests/Protocols/Providers/Hl1/1_response.txt create mode 100644 tests/Protocols/Providers/Hl1/1_result.json create mode 100644 tests/Protocols/Providers/Modiverse/1_response.txt create mode 100644 tests/Protocols/Providers/Modiverse/1_result.json create mode 100644 tests/Protocols/Providers/Nmrih/1_response.txt create mode 100644 tests/Protocols/Providers/Nmrih/1_result.json create mode 100644 tests/Protocols/Providers/Of/1_response.txt create mode 100644 tests/Protocols/Providers/Of/1_result.json create mode 100644 tests/Protocols/Providers/Sco/1_response.txt create mode 100644 tests/Protocols/Providers/Sco/1_result.json create mode 100644 tests/Protocols/Providers/Stormworks/1_response.txt create mode 100644 tests/Protocols/Providers/Stormworks/1_result.json create mode 100644 tests/Protocols/Sco.php create mode 100644 tests/Protocols/Stormworks.php diff --git a/src/GameQ/Protocols/Barotrauma.php b/src/GameQ/Protocols/Barotrauma.php new file mode 100644 index 00000000..643428a2 --- /dev/null +++ b/src/GameQ/Protocols/Barotrauma.php @@ -0,0 +1,49 @@ +. + */ + +namespace GameQ\Protocols; + +/** + * Barotrauma Protocol Class + * + * @package GameQ\Protocols + * @author Jesse Lukas + */ +class Barotrauma extends Source +{ + /** + * String name of this protocol class + * + * @type string + */ + protected $name = 'barotrauma'; + + /** + * Longer string name of this protocol class + * + * @type string + */ + protected $name_long = "Barotrauma"; + + /** + * query_port = client_port + 1 + * + * @type int + */ + protected $port_diff = 1; +} diff --git a/src/GameQ/Protocols/Blackmesa.php b/src/GameQ/Protocols/Blackmesa.php new file mode 100644 index 00000000..eabdb372 --- /dev/null +++ b/src/GameQ/Protocols/Blackmesa.php @@ -0,0 +1,50 @@ +. + */ + +namespace GameQ\Protocols; + +/** + * Blackmesa Protocol Class + * + * @package GameQ\Protocols + * @author Jesse Lukas + */ +class Blackmesa extends Source +{ + /** + * String name of this protocol class + * + * @type string + */ + protected $name = 'blackmesa'; + + /** + * Longer string name of this protocol class + * + * @type string + */ + protected $name_long = "Black Mesa"; + + /** + * query_port = client_port + 1 + * + * @type int + * protected $port_diff = 1; + */ + +} diff --git a/src/GameQ/Protocols/Citadel.php b/src/GameQ/Protocols/Citadel.php new file mode 100644 index 00000000..6728c248 --- /dev/null +++ b/src/GameQ/Protocols/Citadel.php @@ -0,0 +1,50 @@ +. + */ + +namespace GameQ\Protocols; + +/** + * Citadel Protocol Class + * + * @package GameQ\Protocols + * @author Jesse Lukas + */ +class Citadel extends Source +{ + /** + * String name of this protocol class + * + * @type string + */ + protected $name = 'citadel'; + + /** + * Longer string name of this protocol class + * + * @type string + */ + protected $name_long = "Citadel"; + + /** + * query_port = client_port + 1 + * + * @type int + * protected $port_diff = 1; + */ + +} diff --git a/src/GameQ/Protocols/Fof.php b/src/GameQ/Protocols/Fof.php new file mode 100644 index 00000000..a35c4c0a --- /dev/null +++ b/src/GameQ/Protocols/Fof.php @@ -0,0 +1,43 @@ +. + */ + +namespace GameQ\Protocols; + +/** + * Class Fistful of Frags + * + * @package GameQ\Protocols + * @author Austin Bischoff + * @author Jesse Lukas +*/ +class Fof extends Source +{ + /** + * String name of this protocol class + * + * @type string + */ + protected $name = 'fof'; + + /** + * Longer string name of this protocol class + * + * @type string + */ + protected $name_long = "Fistful of Frags"; +} diff --git a/src/GameQ/Protocols/Hl1.php b/src/GameQ/Protocols/Hl1.php new file mode 100644 index 00000000..e17667b6 --- /dev/null +++ b/src/GameQ/Protocols/Hl1.php @@ -0,0 +1,43 @@ +. + */ + +namespace GameQ\Protocols; + +/** + * Class Hl1 + * + * @package GameQ\Protocols + * @author Austin Bischoff + * @author Jesse Lukas + */ +class Hl1 extends Source +{ + /** + * String name of this protocol class + * + * @type string + */ + protected $name = 'hl1'; + + /** + * Longer string name of this protocol class + * + * @type string + */ + protected $name_long = "Half Life"; +} diff --git a/src/GameQ/Protocols/Modiverse.php b/src/GameQ/Protocols/Modiverse.php new file mode 100644 index 00000000..64b41ed5 --- /dev/null +++ b/src/GameQ/Protocols/Modiverse.php @@ -0,0 +1,43 @@ +. + */ + +namespace GameQ\Protocols; + +/** + * Class Modiverse + * + * @package GameQ\Protocols + * @author Austin Bischoff + * @author Jesse Lukas + */ +class Modiverse extends Source +{ + /** + * String name of this protocol class + * + * @type string + */ + protected $name = 'modiverse'; + + /** + * Longer string name of this protocol class + * + * @type string + */ + protected $name_long = "Modiverse"; +} diff --git a/src/GameQ/Protocols/Nmrih.php b/src/GameQ/Protocols/Nmrih.php new file mode 100644 index 00000000..acae3b6e --- /dev/null +++ b/src/GameQ/Protocols/Nmrih.php @@ -0,0 +1,43 @@ +. + */ + +namespace GameQ\Protocols; + +/** + * Class No More Room in Hell + * + * @package GameQ\Protocols + * @author Austin Bischoff + * @author Jesse Lukas + */ +class Nmrih extends Source +{ + /** + * No More Room in Hell protocol class + * + * @type string + */ + protected $name = 'nmrih'; + + /** + * Longer string name of this protocol class + * + * @type string + */ + protected $name_long = "No More Room in Hell"; +} diff --git a/src/GameQ/Protocols/Of.php b/src/GameQ/Protocols/Of.php new file mode 100644 index 00000000..bce7612d --- /dev/null +++ b/src/GameQ/Protocols/Of.php @@ -0,0 +1,43 @@ +. + */ + +namespace GameQ\Protocols; + +/** + * Class Open Fortress + * + * @package GameQ\Protocols + * @author Austin Bischoff + * @author Jesse Lukas + */ +class Of extends Source +{ + /** + * Open Fortress protocol class + * + * @type string + */ + protected $name = 'of'; + + /** + * Longer string name of this protocol class + * + * @type string + */ + protected $name_long = "Open Fortress"; +} diff --git a/src/GameQ/Protocols/Sco.php b/src/GameQ/Protocols/Sco.php new file mode 100644 index 00000000..a920fbd8 --- /dev/null +++ b/src/GameQ/Protocols/Sco.php @@ -0,0 +1,50 @@ +. + */ + +namespace GameQ\Protocols; + +/** + * Class Sven Co-op + * + * @package GameQ\Protocols + * @author Austin Bischoff + * @author Jesse Lukas + */ +class Sco extends Source +{ + /** + * Sven Co-op protocol class + * + * @type string + */ + protected $name = 'sco'; + + /** + * Longer string name of this protocol class + * + * @type string + */ + protected $name_long = "Sven Co-op"; + + /** + * query_port = client_port + 1 + * + * @type int + */ + protected $port_diff = 1; +} diff --git a/src/GameQ/Protocols/Stormworks.php b/src/GameQ/Protocols/Stormworks.php new file mode 100644 index 00000000..735b5776 --- /dev/null +++ b/src/GameQ/Protocols/Stormworks.php @@ -0,0 +1,50 @@ +. + */ + +namespace GameQ\Protocols; + +/** + * Class Stormworks + * + * @package GameQ\Protocols + * @author Austin Bischoff + * @author Jesse Lukas + */ +class Stormworks extends Source +{ + /** + * Stormworks protocol class + * + * @type string + */ + protected $name = 'stormworks'; + + /** + * Longer string name of this protocol class + * + * @type string + */ + protected $name_long = "Stormworks"; + + /** + * query_port = client_port + 1 + * + * @type int + */ + protected $port_diff = 1; +} diff --git a/tests/Protocols/Barotrauma.php b/tests/Protocols/Barotrauma.php new file mode 100644 index 00000000..7bb1b8f4 --- /dev/null +++ b/tests/Protocols/Barotrauma.php @@ -0,0 +1,48 @@ +. + */ + +namespace GameQ\Protocols; + +/** + * Barotrauma Protocol Class + * + * @package GameQ\Protocols + */ +class Barotrauma extends Source +{ + /** + * String name of this protocol class + * + * @type string + */ + protected $name = 'barotrauma'; + + /** + * Longer string name of this protocol class + * + * @type string + */ + protected $name_long = "Barotrauma"; + + /** + * query_port = client_port + 1 + * + * @type int + */ + protected $port_diff = 1; +} diff --git a/tests/Protocols/Blackmesa.php b/tests/Protocols/Blackmesa.php new file mode 100644 index 00000000..4139965f --- /dev/null +++ b/tests/Protocols/Blackmesa.php @@ -0,0 +1,49 @@ +. + */ + +namespace GameQ\Protocols; + +/** + * Blackmesa Protocol Class + * + * @package GameQ\Protocols + */ +class Blackmesa extends Source +{ + /** + * String name of this protocol class + * + * @type string + */ + protected $name = 'blackmesa'; + + /** + * Longer string name of this protocol class + * + * @type string + */ + protected $name_long = "Black Mesa"; + + /** + * query_port = client_port + 1 + * + * @type int + * protected $port_diff = 1; + */ + +} diff --git a/tests/Protocols/Citadel.php b/tests/Protocols/Citadel.php new file mode 100644 index 00000000..381bf7e7 --- /dev/null +++ b/tests/Protocols/Citadel.php @@ -0,0 +1,49 @@ +. + */ + +namespace GameQ\Protocols; + +/** + * Citadel Protocol Class + * + * @package GameQ\Protocols + */ +class Citadel extends Source +{ + /** + * String name of this protocol class + * + * @type string + */ + protected $name = 'citadel'; + + /** + * Longer string name of this protocol class + * + * @type string + */ + protected $name_long = "Citadel"; + + /** + * query_port = client_port + 1 + * + * @type int + * protected $port_diff = 1; + */ + +} diff --git a/tests/Protocols/Fof.php b/tests/Protocols/Fof.php new file mode 100644 index 00000000..e05a891c --- /dev/null +++ b/tests/Protocols/Fof.php @@ -0,0 +1,53 @@ +. + */ + +namespace GameQ\Tests\Protocols; + +/** + * Test Class for Fistful of Frags + * + * @package GameQ\Tests\Protocols + */ +class Fof extends Base +{ + /** + * Test responses for Fistful of Frags + * + * @dataProvider loadData + * + * @param $responses + * @param $result + */ + public function testResponses($responses, $result) + { + \GameQ\Tests\MockDNS::mockHosts([ + 'g-one.org' => '164.132.202.2:27024' + ]); + + // Pull the first key off the array this is the server ip:port + $server = key($result); + + $testResult = $this->queryTest( + $server, + 'fof', + $responses + ); + + $this->assertEquals($result[$server], $testResult); + } +} diff --git a/tests/Protocols/Hl1.php b/tests/Protocols/Hl1.php new file mode 100644 index 00000000..f805a269 --- /dev/null +++ b/tests/Protocols/Hl1.php @@ -0,0 +1,53 @@ +. + */ + +namespace GameQ\Tests\Protocols; + +/** + * Test Class for Half Life + * + * @package GameQ\Tests\Protocols + */ +class Hl1 extends Base +{ + /** + * Test responses for Half Life + * + * @dataProvider loadData + * + * @param $responses + * @param $result + */ + public function testResponses($responses, $result) + { + \GameQ\Tests\MockDNS::mockHosts([ + 'g-one.org' => '46.174.52.4:27222' + ]); + + // Pull the first key off the array this is the server ip:port + $server = key($result); + + $testResult = $this->queryTest( + $server, + 'hl1', + $responses + ); + + $this->assertEquals($result[$server], $testResult); + } +} diff --git a/tests/Protocols/Modiverse.php b/tests/Protocols/Modiverse.php new file mode 100644 index 00000000..ea8377be --- /dev/null +++ b/tests/Protocols/Modiverse.php @@ -0,0 +1,53 @@ +. + */ + +namespace GameQ\Tests\Protocols; + +/** + * Test Class for Modiverse + * + * @package GameQ\Tests\Protocols + */ +class Modiverse extends Base +{ + /** + * Test responses for Modiverse + * + * @dataProvider loadData + * + * @param $responses + * @param $result + */ + public function testResponses($responses, $result) + { + \GameQ\Tests\MockDNS::mockHosts([ + 'g-one.org' => '23.88.96.146:27016' + ]); + + // Pull the first key off the array this is the server ip:port + $server = key($result); + + $testResult = $this->queryTest( + $server, + 'modiverse', + $responses + ); + + $this->assertEquals($result[$server], $testResult); + } +} diff --git a/tests/Protocols/Nmrih.php b/tests/Protocols/Nmrih.php new file mode 100644 index 00000000..3102799f --- /dev/null +++ b/tests/Protocols/Nmrih.php @@ -0,0 +1,53 @@ +. + */ + +namespace GameQ\Tests\Protocols; + +/** + * Test Class for No More Room in Hell + * + * @package GameQ\Tests\Protocols + */ +class Nmrih extends Base +{ + /** + * Test responses for No More Room in Hell + * + * @dataProvider loadData + * + * @param $responses + * @param $result + */ + public function testResponses($responses, $result) + { + \GameQ\Tests\MockDNS::mockHosts([ + 'g-one.org' => '176.9.10.34:27055' + ]); + + // Pull the first key off the array this is the server ip:port + $server = key($result); + + $testResult = $this->queryTest( + $server, + 'of', + $responses + ); + + $this->assertEquals($result[$server], $testResult); + } +} diff --git a/tests/Protocols/Of.php b/tests/Protocols/Of.php new file mode 100644 index 00000000..1bbcb7c7 --- /dev/null +++ b/tests/Protocols/Of.php @@ -0,0 +1,53 @@ +. + */ + +namespace GameQ\Tests\Protocols; + +/** + * Test Class for Open Fortress + * + * @package GameQ\Tests\Protocols + */ +class Of extends Base +{ + /** + * Test responses for Open Fortress + * + * @dataProvider loadData + * + * @param $responses + * @param $result + */ + public function testResponses($responses, $result) + { + \GameQ\Tests\MockDNS::mockHosts([ + 'g-one.org' => '74.91.127.161:27015' + ]); + + // Pull the first key off the array this is the server ip:port + $server = key($result); + + $testResult = $this->queryTest( + $server, + 'of', + $responses + ); + + $this->assertEquals($result[$server], $testResult); + } +} diff --git a/tests/Protocols/Providers/Barotrauma/1_response.txt b/tests/Protocols/Providers/Barotrauma/1_response.txt new file mode 100644 index 0000000000000000000000000000000000000000..18dcb14ed8fff19c2cb035d5c49cdf4c339571fe GIT binary patch literal 495 zcmZuu%TB{U3^Yf2LtOamv*^WIPoWwQ8W#w$zV7LqJBT|!+!LqM`Yl`+z3*cT+M|cQaF>8ZDn&T zsni((qsnIb89IP18tW>iD4D>CR><6F^MfqVl(b>$^7D*SCg;4_5Nd)WRc=BWy?&nw^AP8 zPTm)qGsa$@yqcu!-fW7$8T;dJ0pXud~NHkw}1ZIr%`YH$2NkGGPlK z{q?QCzspjY3YqH)KTp+!UHS2(xZO|85BruMp>F833gq=^P5Pc61@Tk^8#aW`U*8vPGToN4kJpec4 zGpxmCXA71Hs9wgacmvKSBIfBzi4SWqY0qX;CM%Ie5PT6Wi)T?PS2%nousLD_&x#}h z&omAIVzc?#^nN0?-#B%Vq4kDKWryOTD6vfdS3D6_ zu_Q(J18JJ@jIV`zPr2Tt&_g;GO(=>A%2zt#t3t&Bf-Ip$mi9{VbxPuO_)3aAN%t$M z97R>sc@oLIf{>-AQ$*%;I5+55f@djlakEx+UcISf%&#!;riT)zEp5W3w`jGBAXA=J z;GRJPx9lFyFCkEn-Eo!G<-n?o7PMh9@C7dmSeakSzDFMwMP_$9Wx04(rD7{m#;ouo z$A_p?MI~aRV3s6P(L<@01+Sh+vAe;pMNYpE-*gD}4wQjig|HvKE36z0;JZSUgVef! z7AX(#bY@dS=!w|KI28w4;Gw>?>UX}lBHLiI2hGrRmf4}jv>96#)`m!T{nTY0-|9_a zY>Qo9G~*%{YQ484ARCXqRuEt!B2pg*?7^~fVL<0Sh$`)*%N_)V9&bcy<}G^AO35;l zxiH|vWcbNk*qt8^u5+$#?bZw-7!I~v6)NH-#~KlBVk4l1W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OJbF+=O%M>)GteM&H(w zw4=C?z841VYFh>op>l-VzF7vDVxV92?SR8ra;YKuP#`UgCO(W4aeCa}N{fuy%2n^g zt|A}0vCfYDbb zC%5vtARRTl|;3-BDi)PCR5Yys#y5~iC^-$bmj khmtK8v-5c~TAI5G_3^Q4Rg`w)rkuNtD!xW?)&Gv^e~KKcmH+?% literal 0 HcmV?d00001 diff --git a/tests/Protocols/Providers/Blackmesa/1_result.json b/tests/Protocols/Providers/Blackmesa/1_result.json new file mode 100644 index 00000000..93d8903b --- /dev/null +++ b/tests/Protocols/Providers/Blackmesa/1_result.json @@ -0,0 +1 @@ +{"164.132.202.2:27026":{"bm_lagcompensation_default_maxspeed":"300","bm_lagcompensation_max_usercmds":"5","bm_lagcompensation_playerdist":"0","bm_lagcompensation_speedmult":"1.5","deathmatch":"1","decalfrequency":"10","dedicated":"d","game_descr":"Black Mesa","game_dir":"bms","game_id":362890,"gq_address":"164.132.202.2","gq_joinlink":"steam:\/\/connect\/164.132.202.2:27026\/","gq_name":"Black Mesa","gq_online":true,"gq_port_client":27026,"gq_port_query":27026,"gq_protocol":"source","gq_transport":"udp","gq_type":"blackmesa","hostname":"\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001 [EU] www.fastpath.fr | 24\/7 #BMS","item_ammo_box_lifetime":"30","keywords":"128tick,fastpath.fr,gravity,increased_maxplayers,rank,stats,","map":"dm_rail","max_players":32,"metamod_version":"1.12.0-dev+1159V","mp_allowNPCs":"1","mp_autocrosshair":"1","mp_coop":"0","mp_fadetoblack":"0","mp_falldamage":"0","mp_flashlight":"0","mp_footsteps":"1","mp_forcerespawn":"1","mp_fraglimit":"0","mp_friendlyfire":"0","mp_round_intermission_time":"10","mp_teamlist":"hgrunt;scientist;","mp_teamplay":"0","mp_teamplay_ff_penalty":"1","mp_timelimit":"3600","mp_warmup_intermission_time":"5","mp_warmup_time":"30","mp_weapon_zoom_time":"0","mp_weaponstay":"0","nextlevel":"","num_bots":6,"num_players":19,"num_rules":275,"os":"l","password":0,"player_respawn_protection_time":"3","players":[{"id":0,"name":"Swedistani Pighammed ","score":53,"time":463382.0625},{"id":0,"name":"lileinsteinjr ","score":55,"time":463382.0625},{"id":0,"name":"doky doky ","score":58,"time":463382.0625},{"id":0,"name":"aejo ","score":48,"time":463382.0625},{"id":0,"name":"Shorwe ","score":40,"time":463382.0625},{"id":0,"name":"syncdawn ","score":49,"time":463382.0625},{"id":0,"name":"","score":0,"time":30738.369140625},{"id":0,"name":"","score":0,"time":30727.447265625},{"id":0,"name":"","score":0,"time":30721.291015625},{"id":0,"name":"","score":0,"time":30718.275390625},{"id":0,"name":"","score":0,"time":30716.072265625},{"id":0,"name":"","score":0,"time":30715.087890625},{"id":0,"name":"","score":0,"time":30672.244140625},{"id":0,"name":"DAV.","score":65,"time":1500.1717529296875},{"id":0,"name":"Asydenco","score":61,"time":1228.734375},{"id":0,"name":"DimitrescusLover","score":53,"time":997.6719360351562},{"id":0,"name":"SummeHermelin0","score":36,"time":929.4530029296875},{"id":0,"name":"metin0972","score":13,"time":370.5624694824219},{"id":0,"name":"windsurfingsbest","score":3,"time":172.3749237060547}],"port":27026,"protocol":17,"r_AirboatViewDampenDamp":"1.0","r_AirboatViewDampenFreq":"7.0","r_AirboatViewZHeight":"0.0","r_JeepViewDampenDamp":"1.0","r_JeepViewDampenFreq":"7.0","r_JeepViewZHeight":"10.0","r_VehicleViewDampen":"1","secure":1,"sk_ammo_357_max":"18","sk_ammo_9mm_max":"150","sk_ammo_bolt_max":"10","sk_ammo_buckshot_max":"64","sk_ammo_energy_max":"100","sk_ammo_grenade_frag_max":"10","sk_ammo_grenade_mp5_max":"3","sk_ammo_grenade_rpg_max":"6","sk_ammo_grenade_satchel_max":"5","sk_ammo_grenade_tripmine_max":"6","sk_ammo_hornet_max":"8","sk_ammo_snark_max":"15","sk_detenator_apache_rpg_health":"1","sk_detenator_apache_rpg_intial_speed":"250","sk_detenator_apache_rpg_max_speed":"2000","sk_detenator_apache_rpg_npc_dmg":"30","sk_detenator_apache_rpg_npc_dmg_radius":"75","sk_detenator_apache_rpg_track_acceleration":"400","sk_detenator_apache_rpg_track_drag":"0.8","sk_detenator_apache_rpg_track_max_distance":"4048","sk_detenator_bolt_airspeed":"2000","sk_detenator_bolt_dot_bounce":"-0.5","sk_detenator_bolt_gravity":"40","sk_detenator_bolt_plr_dmg":"115","sk_detenator_bolt_plr_xplode_direct_hit_dmg":"75","sk_detenator_bolt_plr_xplode_dmg":"50","sk_detenator_bolt_plr_xplode_radius":"128","sk_detenator_energy_max_speed":"3200","sk_detenator_energy_plr_commit_radius":"400","sk_detenator_energy_plr_dmg":"3","sk_detenator_energy_plr_dmg_radius":"128","sk_detenator_energy_track_acceleration":"650","sk_detenator_energy_track_drag":"0.2","sk_detenator_energy_track_max_distance":"1024","sk_detenator_frag_elasticity":"0.45","sk_detenator_frag_friction":"0.2","sk_detenator_frag_fuse_time":"3","sk_detenator_frag_gravity":"400","sk_detenator_frag_npc_dmg":"60","sk_detenator_frag_npc_dmg_radius":"200","sk_detenator_frag_plr_dmg":"100","sk_detenator_frag_plr_dmg_radius":"250","sk_detenator_frag_throw_forward_speed_primary":"750.0","sk_detenator_frag_throw_forward_speed_secondary":"500.0","sk_detenator_frag_throw_up_speed_primary":"225.0","sk_detenator_frag_throw_up_speed_secondary":"100.0","sk_detenator_hornet_autoaim_scale":"10","sk_detenator_hornet_drunk_degrees":"3","sk_detenator_hornet_drunk_frequency":"0.2","sk_detenator_hornet_fuse_time":"5","sk_detenator_hornet_health":"1","sk_detenator_hornet_intial_speed":"200","sk_detenator_hornet_max_speed":"800","sk_detenator_hornet_npc_dmg":"9","sk_detenator_hornet_npc_dmg_radius":"25","sk_detenator_hornet_plr_dmg":"10","sk_detenator_hornet_plr_dmg_radius":"30","sk_detenator_hornet_track_acceleration":"300","sk_detenator_hornet_track_drag":"0.4","sk_detenator_hornet_track_lock_distance":"20","sk_detenator_hornet_track_lock_dot":"0.2","sk_detenator_hornet_track_max_distance":"512","sk_detenator_mp5_airspeed":"1000","sk_detenator_mp5_gravity":"400","sk_detenator_mp5_plr_dmg":"115","sk_detenator_mp5_plr_dmg_radius":"250","sk_detenator_nuke_dmg":"10","sk_detenator_nuke_dmg_radius":"1024","sk_detenator_nuke_health":"1","sk_detenator_nuke_intial_speed":"100","sk_detenator_nuke_lifetime":"4","sk_detenator_nuke_max_speed":"800","sk_detenator_nuke_sprite_radius":"60","sk_detenator_nuke_track_acceleration":"100","sk_detenator_nuke_track_drag":"0","sk_detenator_rpg_commit_radius":"0","sk_detenator_rpg_health":"1","sk_detenator_rpg_intial_speed":"192","sk_detenator_rpg_max_speed":"1344","sk_detenator_rpg_npc_dmg":"30","sk_detenator_rpg_npc_dmg_radius":"75","sk_detenator_rpg_plr_dmg":"175","sk_detenator_rpg_plr_dmg_radius":"300","sk_detenator_rpg_suicide_radius":"32","sk_detenator_rpg_track_acceleration":"960","sk_detenator_rpg_track_drag":"0.375","sk_detenator_rpg_track_max_distance":"65536","sk_detenator_rpg_track_min_dot":"-1","sk_detenator_satchel_airspeed":"420","sk_detenator_satchel_elasticity":"0.45","sk_detenator_satchel_friction":"0.2","sk_detenator_satchel_gravity":"400","sk_detenator_satchel_plr_dmg":"150","sk_detenator_satchel_plr_dmg_radius":"300","sk_detenator_spit_airspeed":"1000","sk_detenator_spit_gravity":"400","sk_detenator_spit_plr_dmg":"4","sk_detenator_spit_plr_dmg_radius":"96","sk_detenator_tow_intial_speed":"1500","sk_detenator_tow_max_speed":"3000","sk_detenator_tow_npc_dmg":"150","sk_detenator_tow_npc_dmg_radius":"375","sk_detenator_tow_plr_dmg":"150","sk_detenator_tow_plr_dmg_radius":"375","sk_detenator_tow_track_acceleration":"300","sk_detenator_tripmine_health":"1","sk_detenator_tripmine_npc_dmg":"150","sk_detenator_tripmine_npc_dmg_radius":"300","sk_detenator_tripmine_plr_dmg":"150","sk_detenator_tripmine_plr_dmg_radius":"300","sk_dmg_sentry":"4","sk_dmg_sniper_penetrate_npc":"0","sk_dmg_sniper_penetrate_plr":"0","sk_electrocluster_chunk_collision_radius":"8.0","sk_electrocluster_chunk_explosion_damage":"8.0","sk_electrocluster_chunk_explosion_radius":"32.0","sk_electrocluster_chunk_projectile_force_impulse":"512.0","sk_electrocluster_chunk_projectile_lifetime_minimum":"4","sk_electrocluster_chunk_projectile_lifetime_randomization":"3","sk_electrocluster_intermediate_cluster_impact_homing_direction_post_factor":"0.375","sk_electrocluster_intermediate_cluster_impact_reflected_direction_factor":"0.375","sk_electrocluster_intermediate_cluster_size":"4","sk_electrocluster_intermediate_collision_radius":"12.0","sk_electrocluster_intermediate_explosion_damage":"16.0","sk_electrocluster_intermediate_explosion_radius":"32.0","sk_electrocluster_intermediate_projectile_force_impulse":"512.0","sk_electrocluster_intermediate_projectile_impact_randomization":"0.325","sk_electrocluster_parent_cluster_impact_homing_direction_post_factor":"0.375","sk_electrocluster_parent_cluster_impact_reflected_direction_factor":"0.375","sk_electrocluster_parent_cluster_size":"5","sk_electrocluster_parent_collision_radius":"16.0","sk_electrocluster_parent_explosion_damage":"20.0","sk_electrocluster_parent_explosion_radius":"64.0","sk_electrocluster_parent_projectile_impact_randomization":"0.5","sk_electrocluster_parent_projectile_speed_limit":"4096.0","sk_electrocluster_parent_projectile_speed_power":"4.0","sk_electrocluster_parent_projectile_speed_scale":"128.0","sk_grenade_mortar_gravity":"400","sk_grenade_mortar_max_speed":"2000","sk_grenade_mortar_track_acceleration":"400","sk_grenade_mortar_track_drag":"0.8","sk_item_respawn_delay":"15","sk_item_weapon_snark_hive_health":"10","sk_item_weapon_snark_hive_pickup":"4","sk_max_50cal":"0","sk_max_sentry":"50","sk_max_sniper_round":"30","sk_npc_dmg_50cal":"6","sk_npc_dmg_sniper_round":"20","sk_plr_dmg_50cal":"6","sk_plr_dmg_sniper_round":"20","sk_thunderball_collision_radius":"64.0","sk_thunderball_delta_speed_multiplier":"2.5","sk_thunderball_discharge_intervals":"15.0","sk_thunderball_explosion_damage":"25.0","sk_thunderball_explosion_radius":"128.0","sk_thunderball_fully_discharge_time":"15.0","sk_thunderball_lighting_damage":"3.0","sk_thunderball_lighting_enemy_priority_chance":"0.65","sk_thunderball_lighting_radius":"384.0","sk_weapon_gluon_dmg_scale":"1.0","sk_weapon_gluon_plr_ammo_per_tick":"2","sk_weapon_gluon_plr_ammo_tick":"0.2","sk_weapon_gluon_plr_dmg_per_tick":"23","sk_weapon_gluon_plr_dmg_tick":"0.1","sk_weapon_gluon_plr_spread":"1.5 1.5","sk_weapon_hivehand_plr_regen_attack_delay":"0.5","sk_weapon_hivehand_plr_regen_tick":"0.2","sk_weapon_hivehand_plr_secondary_phase":"8","sk_weapon_hivehand_plr_secondary_radius":"0.025","sk_weapon_satchel_max_active":"10","sk_weapon_snark_jumprange":"256","sk_weapon_snark_jumpspeed":"320","sk_weapon_snark_lifetime":"14.5","sk_weapon_snark_npc_dmg_bite":"4","sk_weapon_snark_npc_dmg_pop":"1","sk_weapon_snark_plr_dmg_bite":"8","sk_weapon_snark_plr_dmg_pop":"1","sk_weapon_tau_beam_charged_dmg":"120","sk_weapon_tau_beam_dmg_radius":"64","sk_weapon_tau_beam_penetration_bias":"0.9","sk_weapon_tau_beam_penetration_depth":"48","sk_weapon_tau_beam_spread_max":"128","sk_weapon_tau_beam_spread_min":"32","sk_weapon_tau_beam_undercharged_dmg":"20","sk_weapon_tau_charge_max_velocity":"650","sk_weapon_tau_full_charge_required_ammo":"12.0","sk_weapon_tau_full_charge_time":"1.5","sk_weapon_tau_idle_spin_speed":"1700","sk_weapon_tau_max_coil_speed":"1200","sk_weapon_tau_min_charge_time":"0.3","sk_weapon_tau_overcharge_bais":"0.9","sk_weapon_tau_overcharge_damage":"25","sk_weapon_tau_overcharge_radius":"200","sk_weapon_tau_overcharge_time":"7.5","sk_weapon_tau_primary_attack_delay":"0.3","sk_weapon_tripmine_max_active":"10","sm_nextmap":"dm_stack","sourcemod_version":"1.11.0.6902","steam_id":85568392924873718,"steamappid":0,"sv_accelerate":"10","sv_accelerate_cap":"25.0","sv_airaccelerate":"10","sv_alltalk":"0","sv_bounce":"0","sv_cheats":"0","sv_contact":"www.fastpath.fr","sv_falldamagescale":"1","sv_footsteps":"1","sv_friction":"4","sv_gravity":"800","sv_maxspeed":"320","sv_maxusrcmdprocessticks":"24","sv_noclipaccelerate":"5","sv_noclipspeed":"5","sv_password":"0","sv_pausable":"0","sv_rollangle":"0","sv_rollspeed":"200","sv_show_enemy_hp":"0","sv_specaccelerate":"5","sv_specnoclip":"1","sv_specspeed":"3","sv_speed_crouch_crop":"0.333333333333","sv_speed_mp":"320","sv_speed_run":"190","sv_speed_sprint":"320","sv_speed_usedampen_allow":"1","sv_speed_walk":"90","sv_steamgroup":"5513290","sv_stepsize":"18","sv_stopspeed":"100","sv_tags":"128tick,fastpath.fr,gravity,increased_maxplayers,rank,stats","sv_voiceenable":"1","sv_vote_quorum_ratio":"0.6","sv_wateraccelerate":"10","sv_waterfriction":"1","tv_enable":"0","tv_password":"1","tv_relaypassword":"1","version":"100001"}} \ No newline at end of file diff --git a/tests/Protocols/Providers/Citadel/1_response.txt b/tests/Protocols/Providers/Citadel/1_response.txt new file mode 100644 index 0000000000000000000000000000000000000000..5aae53005ff39e09d94e2bce367acf409fa63a06 GIT binary patch literal 117 zcmezW|NnnaLFdep#FW&W;MAhB)FKAY^t{qy2B;WAKv)0+5Qs3OKT9_!^T88 zmN!aAHv~B_hPejWf`pBYjSS873>AXh{cIHi!d+|)6`VYSZ4DSM3%a^Y;{+ss(L0P zIcPx0aZeHy6v2ZaQ6qZOfQUZ_51pGinW*5+lV{hjs(W^48X|AvGr5ytgrf!rXl46a^GwzI7>V; z!I@Mkt4hll+jn43BH3KG+hsR5#h>3C2evTR?yOo7ZycI3d`R?PdfBft3$Jj5|Z&dG9w{E|2`)c)Nb*uWk`r`KM)mMN6HU~AY z_MQ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sTACr#}q}mJV17-&WYL%$OA%URFSltt{SNT<21J zfNv_az+4}x*hscu@S;LbSi+3C>z?-SYnGA7?11!ifk~};I@ftm>$DDcykZ%AUAek@ z-y7YZBTFP2QztPQc5l1CUyi#M@A@^xd6~`=9FhGGm3=o$QJS-|DB;TryOwN)#W;AX zX-3!GgJ~Uu62{^fb!~IQq!e~lXWkR3P&#WWV%wJEFO-;>#}({WTsK1DZ>7p}>c}>! zZf|t)t~tDVU+bL@U5s}($VQX??c}~z{^MrQO_a#$=q987_+}cPTz8A^2)^G?RRhpJ z2A0lci!u&qWR8A0ItbeshCmtUWo&ZfmRVgGAV@vMTnfx=ELoP8EJXu>hbtK{^RlHx zB+e{^?Ke@!K}si2@d67YbOvGTh?cA!9Y(;l&dEuF%+3|Fd`?6Oa$2(j|1L4(D>$U% zd}|w!ZMzczCMnJe!L4%`!NX%b)z*rwUf6nd0P-PMTZGmc6nl!vZ6VOa204*^g2buR zQzkz-Sc)vsO9!H5l*-m;*gBw0I)|Y0*q4mDOw&O13OrO=%?nzoITM95&*N#CWhsC}cgD%s4U@~-E6>Ph!W30{BTHuHQlxXLtTUKtZAm|O?eSv4u|SivB^B8t zw5n1lVb}4@NHo4NK0K-)W{F(QM6n@|I-Lo*5e&*%%1T-#@5>@nlEQ;|T9lc6Yq*;Q z2N1P8%xP8DJlp;sMX&v-n+G38wW2Jg(AoYW$(%v=Q! z4+t614A<-OG67w zLla|jOLGeosFa_hud5Zh%{sxZ!NH#Xer`UF?!i`O7REZB@kv%CMWv}aq4C951`KsQ z!XO7QaMjds0p0%J1SO@vWPmw^0mCU!DUeeb(47J@ h!_mbh2#YSDOn`q-2!lBgFd(~_0q9}|phFo97yw*$WMBXQ literal 0 HcmV?d00001 diff --git a/tests/Protocols/Providers/Modiverse/1_result.json b/tests/Protocols/Providers/Modiverse/1_result.json new file mode 100644 index 00000000..5134a4dd --- /dev/null +++ b/tests/Protocols/Providers/Modiverse/1_result.json @@ -0,0 +1 @@ +{"23.88.96.146:27016":{"CONMETHOD":"P2P","I_b":"true","OWNINGID":"90162918914379784","OWNINGNAME":"G-One.org Server","P2PADDR":"90162918914379784","P2PPORT":"7777","SESSIONFLAGS":"683","U_s":"0","dedicated":"d","game_descr":"KillerJim Mod","game_dir":"KJMod","game_id":1281150,"gq_address":"23.88.96.146","gq_joinlink":"steam:\/\/connect\/23.88.96.146:27016\/","gq_name":"Modiverse","gq_online":true,"gq_port_client":27016,"gq_port_query":27016,"gq_protocol":"source","gq_transport":"udp","gq_type":"modiverse","hostname":"G-One.org Server","keywords":"BUILDID:0,OWNINGID:90162918914379784,OWNINGNAME:G-One.org Server,SESSIONFLAGS:683,I_b:true,U_s:0","map":"Paradise","max_players":128,"num_bots":0,"num_players":0,"num_rules":8,"os":"l","password":0,"port":7777,"protocol":17,"secure":1,"steam_id":90162918914379784,"steamappid":0,"version":"1.0.0.0"}} \ No newline at end of file diff --git a/tests/Protocols/Providers/Nmrih/1_response.txt b/tests/Protocols/Providers/Nmrih/1_response.txt new file mode 100644 index 0000000000000000000000000000000000000000..49c5b7fc2ff97b95ee60723c5fe5eea1e9bd47fa GIT binary patch literal 1923 zcmZux&2Ah;5N;=XfLtODh+8yAP@L7S?HEG{iiI7=h(wXC_<&`NYI|yCI_~M7bob0= ztvn1bfDmuMnWxADaOH}r>Yj}^c6{(`ebrU<)$iry<>lcQS^9hY_{Z$@;9&PGJ3!Zf zIe-S;uGR|7MfM=u_YztZrm^|!&d8vwA;GCyys+7G>o7aAw#k&qo}t!4h|y=Fpzm}% z9dC>`#h-tuwcozF_xsV4H9LEatDC__#?zW|F%y!#D5gxE=9a0-j6uk{;`nOwqin`&IGqGN}lIEI?vg1CR0%$ zgt~zsYr%p9T{?Wzp^*zQornelG`3hZnvN$A3heJsr(2T~(X=^eZRamu{^ZF6i(RnN zS?_C5?g|PB%?vaci3u!}hndFQp>JVs@}L^@#Fbo>P++h#4f1>mXk9=96%H~Ly4I?y z!ysE5e86^~P+BLEd2rC>3xbAFDSqjo(yCEQ7fzum^rBR52vS?E3RvXER;mmGwP?X^ zz1U!?v2;0E<`7~ED=r&&>!|R>U^+yfLyw#*m3JJo_0mykG)Awne2L&qJfAC5sIsI) zxQvm251^4)Ad%pDrgX2+1~sBJdXW?yL@OUeT{)VGM_y9efdNW}m92*5QzDtN*@!%Y z?VO=4GDF4Y2(2{~X?RcM((|b>_%>+lkru|~yUNWhgcF7HJ@Su+|I_$QKBap~(Y zuKV>Fre;UQ&xq|Oy?v}$akW$|{lwC{`~+(yHD39m!uuw#D9PRiWvZ3Ae>h_mC)Pk4 z?}mnR^r}GNsW1|+tqC=EyuJ0^hVXq3Qc@QjHHmkM0p)IDyhgd~e6UTv+?4cMYija2 zlk4*tO%(M$Dr8OD%hN@;v?hQIVm_abZ(h7H)9iB|9wj>+7Gk(njFv0g!=h8^9&WL+ za?mS!zcYzpDEXS#GIAM&yi}Tok4BmeXzG27Scpv;n$)bVIZ;;7^hEM=nwp!#644Khnu<{7Kt}<%`b5qloQusXv~?IS kQM^z*gCE|nz$<9ynGJS)szZNuS?KplFGzAo=VAr=AN_TjtpET3 literal 0 HcmV?d00001 diff --git a/tests/Protocols/Providers/Nmrih/1_result.json b/tests/Protocols/Providers/Nmrih/1_result.json new file mode 100644 index 00000000..e08dd66c --- /dev/null +++ b/tests/Protocols/Providers/Nmrih/1_result.json @@ -0,0 +1 @@ +{"176.9.10.34:27055":{"coop":"0","countrynick_version":"1.1.1","deathmatch":"1","decalfrequency":"10","dedicated":"d","game_descr":"No More Room in Hell","game_dir":"nmrih","game_id":224260,"gq_address":"176.9.10.34","gq_joinlink":"steam:\/\/connect\/176.9.10.34:27055\/","gq_name":"No More Room in Hell","gq_online":true,"gq_port_client":27055,"gq_port_query":27055,"gq_protocol":"source","gq_transport":"udp","gq_type":"nmrih","hostname":" ==> [GGA] GermanGamerAllianz - Escape","keywords":"objective,classic,ff:off,","map":"nmo_junction","max_players":8,"metamod_version":"1.11.0-dev+1140V","mp_allowNPCs":"1","mp_autocrosshair":"1","mp_autoteambalance":"1","mp_disable_respawn_times":"0","mp_fadetoblack":"0","mp_falldamage":"0","mp_flashlight":"0","mp_footsteps":"1","mp_forceautoteam":"0","mp_forcerespawn":"1","mp_fraglimit":"0","mp_friendlyfire":"0","mp_holiday_nogifts":"0","mp_limitteams":"2","mp_match_end_at_timelimit":"0","mp_maxrounds":"0","mp_respawnwavetime":"10.0","mp_scrambleteams_auto":"1","mp_scrambleteams_auto_windifference":"2","mp_stalemate_enable":"0","mp_stalemate_meleeonly":"0","mp_teamlist":"hgrunt;scientist","mp_teamplay":"0","mp_timelimit":"20","mp_tournament":"0","mp_weaponstay":"0","mp_winlimit":"1","nextlevel":"","num_bots":0,"num_players":4,"num_rules":83,"os":"l","password":0,"players":[{"id":0,"name":"[ESP]MRFIRULAIS","score":43,"time":548.0643310546875},{"id":0,"name":"[RUS]aztarsano","score":21,"time":528.9498291015625},{"id":0,"name":"[ESP]el uri (tu pai)","score":1,"time":523},{"id":0,"name":"","score":0,"time":3.765009880065918}],"port":27055,"protocol":17,"r_AirboatViewDampenDamp":"1.0","r_AirboatViewDampenFreq":"7.0","r_AirboatViewZHeight":"0.0","r_JeepViewDampenDamp":"1.0","r_JeepViewDampenFreq":"7.0","r_JeepViewZHeight":"10.0","r_VehicleViewDampen":"1","secure":0,"sm_gamevoting_version":"1.5b","sm_nextmap":"nmo_lakeside","sourcemod_version":"1.10.0.6492","steam_id":90162896035094529,"steamappid":0,"sv_accelerate":"10","sv_airaccelerate":"10","sv_allow_custom_balance":"0","sv_alltalk":"1","sv_bounce":"0","sv_cheats":"0","sv_contact":"www.GermanGamerAllianz.de","sv_difficulty":"classic","sv_footsteps":"1","sv_friction":"4","sv_gravity":"800","sv_maphack":"1","sv_maphack_filename":"","sv_maxspeed":"320","sv_maxusrcmdprocessticks":"24","sv_noclipaccelerate":"5","sv_noclipspeed":"5","sv_password":"0","sv_pausable":"0","sv_resupplytime":"60","sv_rollangle":"0","sv_rollspeed":"200","sv_specaccelerate":"5","sv_specnoclip":"1","sv_specspeed":"3","sv_steamgroup":"1846466","sv_stepsize":"18","sv_stopspeed":"100","sv_tags":"","sv_voiceenable":"1","sv_vote_quorum_ratio":"0.60","sv_wateraccelerate":"10","sv_waterfriction":"1","tf_arena_max_streak":"3","tf_arena_preround_time":"10","tf_arena_round_time":"0","tf_arena_use_queue":"1","tv_enable":"0","tv_password":"0","tv_relaypassword":"0","version":"1.1.2.3"}} \ No newline at end of file diff --git a/tests/Protocols/Providers/Of/1_response.txt b/tests/Protocols/Providers/Of/1_response.txt new file mode 100644 index 0000000000000000000000000000000000000000..0d1a81ee3410da23020557431284005336d4ff50 GIT binary patch literal 9584 zcmb_i&95a#b+0i4Nf1a$L@cq&Ly8m$-dx{%-+S{R6ybQ@7>r~-Jhm4^s8hGQy1V9f zclA_P-}kO@K!c)$MIw0tOEw50fucmL%pza1l$G;Gj4))GUA9bq=T!CQyMAJU7q;&? zr_MQb>U{Tm_UzfSSN`ZxTh=m`i7NLCmma-+bgmK|OQ({fhsy4hJ$ePeHy$26kc|^W z9R>1rWaGQSrQ&rZ%cGZ#byhWv_{ELqpTCh5;>MlRlhwW3Yw`2H*MIQNlP~@Dhe{tiBBF;^fEtu@T-hcgpNYs1pW~zGcU1i^U z7dKvr9gzR<+@C)X(w6&DR!5J_k;~Ollb43i{p3$S{XpdVT3IM!x8gZK-6ucxK-`y2 zu9an?|9tH?=i*_mtLRm|ReOg0_hE36boqL&UNTl! znaF|p#Am;FE*|W3MX$+ve&^`?Tx2qhwyR34LGmYOpE(z=>Nr=jIC|CCjcyz9$3Xn+ z<4>K7(k@C>6sBU(r+)Z{=i=8t{^_s&?LR(v^3NZ9_j?~a`MVFE{7lp!UwrfZ`=V?e zJI%%_nXtU?@4t0lyi&?cS4zALy7MQ0eP6ux!k3gay25WE{`Wg?-WS%GtyWRY|6%a) ztslHZ5BVEB3|;F~C1Ew$=#tEzY}ZZAcmo7mWdA4w)90-ioU^geN8#&8ru@B0G;>n^MCG^C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zz>C07%!~bm$Z^g?%xGzc(32GZ)IX>C604K&Err`#S^)tWMimNf{IyCED&ZVD1Z%Es z0)K5rn>$*AK!IJ*hOUCYUO?jFAsSL>5{89(&{DLi8Fu%yVSuI=YJ;q0UEI3Hs-*3A imXmz45g)@RRu|6Tp~vdFr#;D__4 zr*rOoxH(y0FF;hSwtlOPI+`g>1i}~`3-6R9LD+f7(+pzc3@Rn4X$8p!a!^&Rww;!w z(ZUkKKxMB@1?w#T9HC|EKe>?`ROdrNlpb=9gzejzYlRz-l-$-)*%79Up%qi{t5=;? zzVJ%2hBr)68!Ux+;~2HAa15j?N@4k(ZHd-vPrTMWWWl*bB*u~-lvEA_0FKEc#IHa4C~v?871~sa;M;s4WHBV z>4I&vvP4|&)rppbBnZyal|KbkcVf`AhwChA;4PH~<<8Fy_#($yGJZllGyFBF3YO~` zYa1gXaKif$yQ5Us;l#(C<;6?r->m04l;JVb;MAhB)FKAw#G+Ing^)mIGB7YGFr<_-Fc|6?fFQ%h r{9F!(7L(0E4vb}ndZv1ox(2#tCJc-AaR8MvFmTn>Z~^W4@4^58`z<9P literal 0 HcmV?d00001 diff --git a/tests/Protocols/Providers/Stormworks/1_result.json b/tests/Protocols/Providers/Stormworks/1_result.json new file mode 100644 index 00000000..ccd353c3 --- /dev/null +++ b/tests/Protocols/Providers/Stormworks/1_result.json @@ -0,0 +1 @@ +{"23.88.96.146:28015":{"dedicated":"d","game_descr":"Stormworks","game_dir":"Stormworks","game_id":573090,"gq_address":"23.88.96.146","gq_joinlink":"steam:\/\/connect\/23.88.96.146:28015\/","gq_name":"Stormworks","gq_online":true,"gq_port_client":28015,"gq_port_query":28016,"gq_protocol":"source","gq_transport":"udp","gq_type":"stormworks","hostname":"Stormworks-Server","keywords":"v1.5.9-0-64","map":"Career","max_players":32,"num_bots":0,"num_players":0,"os":"w","password":0,"port":28015,"protocol":17,"secure":0,"steam_id":90162922181099528,"steamappid":0,"version":"1.0.0.0"}} \ No newline at end of file diff --git a/tests/Protocols/Sco.php b/tests/Protocols/Sco.php new file mode 100644 index 00000000..56e78ed5 --- /dev/null +++ b/tests/Protocols/Sco.php @@ -0,0 +1,53 @@ +. + */ + +namespace GameQ\Tests\Protocols; + +/** + * Test Class for Sven Co-op + * + * @package GameQ\Tests\Protocols + */ +class Sco extends Base +{ + /** + * Test responses for Sven Co-op + * + * @dataProvider loadData + * + * @param $responses + * @param $result + */ + public function testResponses($responses, $result) + { + \GameQ\Tests\MockDNS::mockHosts([ + 'g-one.org' => '176.9.61.5:27027' + ]); + + // Pull the first key off the array this is the server ip:port + $server = key($result); + + $testResult = $this->queryTest( + $server, + 'sco', + $responses + ); + + $this->assertEquals($result[$server], $testResult); + } +} diff --git a/tests/Protocols/Stormworks.php b/tests/Protocols/Stormworks.php new file mode 100644 index 00000000..3ee186f2 --- /dev/null +++ b/tests/Protocols/Stormworks.php @@ -0,0 +1,53 @@ +. + */ + +namespace GameQ\Tests\Protocols; + +/** + * Test Class for Stormworks + * + * @package GameQ\Tests\Protocols + */ +class Stormworks extends Base +{ + /** + * Test responses for Stormworks + * + * @dataProvider loadData + * + * @param $responses + * @param $result + */ + public function testResponses($responses, $result) + { + \GameQ\Tests\MockDNS::mockHosts([ + 'g-one.org' => '23.88.96.146:28015' + ]); + + // Pull the first key off the array this is the server ip:port + $server = key($result); + + $testResult = $this->queryTest( + $server, + 'stormworks', + $responses + ); + + $this->assertEquals($result[$server], $testResult); + } +} From 2e9a966c8192ab958f3323680af07df9b3be48ab Mon Sep 17 00:00:00 2001 From: Eranio Date: Sun, 28 Aug 2022 15:58:02 +0200 Subject: [PATCH 2/5] Fix --- src/GameQ/Protocols/Blackmesa.php | 5 ++--- src/GameQ/Protocols/Citadel.php | 5 ++--- tests/Protocols/Blackmesa.php | 5 ++--- tests/Protocols/Citadel.php | 5 ++--- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/GameQ/Protocols/Blackmesa.php b/src/GameQ/Protocols/Blackmesa.php index eabdb372..cc91ef61 100644 --- a/src/GameQ/Protocols/Blackmesa.php +++ b/src/GameQ/Protocols/Blackmesa.php @@ -43,8 +43,7 @@ class Blackmesa extends Source /** * query_port = client_port + 1 * - * @type int + * @type int * protected $port_diff = 1; */ - -} +} \ No newline at end of file diff --git a/src/GameQ/Protocols/Citadel.php b/src/GameQ/Protocols/Citadel.php index 6728c248..4732930e 100644 --- a/src/GameQ/Protocols/Citadel.php +++ b/src/GameQ/Protocols/Citadel.php @@ -43,8 +43,7 @@ class Citadel extends Source /** * query_port = client_port + 1 * - * @type int + * @type int * protected $port_diff = 1; */ - -} +} \ No newline at end of file diff --git a/tests/Protocols/Blackmesa.php b/tests/Protocols/Blackmesa.php index 4139965f..a4cb24f3 100644 --- a/tests/Protocols/Blackmesa.php +++ b/tests/Protocols/Blackmesa.php @@ -42,8 +42,7 @@ class Blackmesa extends Source /** * query_port = client_port + 1 * - * @type int + * @type int * protected $port_diff = 1; */ - -} +} \ No newline at end of file diff --git a/tests/Protocols/Citadel.php b/tests/Protocols/Citadel.php index 381bf7e7..15af5934 100644 --- a/tests/Protocols/Citadel.php +++ b/tests/Protocols/Citadel.php @@ -42,8 +42,7 @@ class Citadel extends Source /** * query_port = client_port + 1 * - * @type int + * @type int * protected $port_diff = 1; */ - -} +} \ No newline at end of file From 3e6eb0029ac34c15e3837c0581fb8630ed1408a8 Mon Sep 17 00:00:00 2001 From: Eranio Date: Sun, 28 Aug 2022 16:07:31 +0200 Subject: [PATCH 3/5] Fix#2 --- src/GameQ/Protocols/Blackmesa.php | 2 +- src/GameQ/Protocols/Citadel.php | 2 +- tests/Protocols/Blackmesa.php | 2 +- tests/Protocols/Citadel.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/GameQ/Protocols/Blackmesa.php b/src/GameQ/Protocols/Blackmesa.php index cc91ef61..d03ef9df 100644 --- a/src/GameQ/Protocols/Blackmesa.php +++ b/src/GameQ/Protocols/Blackmesa.php @@ -46,4 +46,4 @@ class Blackmesa extends Source * @type int * protected $port_diff = 1; */ -} \ No newline at end of file +} diff --git a/src/GameQ/Protocols/Citadel.php b/src/GameQ/Protocols/Citadel.php index 4732930e..5b4694f4 100644 --- a/src/GameQ/Protocols/Citadel.php +++ b/src/GameQ/Protocols/Citadel.php @@ -46,4 +46,4 @@ class Citadel extends Source * @type int * protected $port_diff = 1; */ -} \ No newline at end of file +} diff --git a/tests/Protocols/Blackmesa.php b/tests/Protocols/Blackmesa.php index a4cb24f3..710e1e05 100644 --- a/tests/Protocols/Blackmesa.php +++ b/tests/Protocols/Blackmesa.php @@ -45,4 +45,4 @@ class Blackmesa extends Source * @type int * protected $port_diff = 1; */ -} \ No newline at end of file +} diff --git a/tests/Protocols/Citadel.php b/tests/Protocols/Citadel.php index 15af5934..c2557d96 100644 --- a/tests/Protocols/Citadel.php +++ b/tests/Protocols/Citadel.php @@ -45,4 +45,4 @@ class Citadel extends Source * @type int * protected $port_diff = 1; */ -} \ No newline at end of file +} From bbb894a9cfa67a597bda5eae1f0a90b18c43a6b7 Mon Sep 17 00:00:00 2001 From: Eranio Date: Sun, 28 Aug 2022 17:30:44 +0200 Subject: [PATCH 4/5] Fix#3 --- src/GameQ/Protocols/Blackmesa.php | 7 ------ src/GameQ/Protocols/Citadel.php | 7 ------ tests/Protocols/Barotrauma.php | 39 ++++++++++++++++--------------- tests/Protocols/Blackmesa.php | 39 ++++++++++++++++--------------- tests/Protocols/Citadel.php | 39 ++++++++++++++++--------------- tests/Protocols/Fof.php | 4 ---- tests/Protocols/Hl1.php | 4 ---- tests/Protocols/Modiverse.php | 4 ---- tests/Protocols/Nmrih.php | 4 ---- tests/Protocols/Of.php | 4 ---- tests/Protocols/Sco.php | 4 ---- tests/Protocols/Stormworks.php | 4 ---- 12 files changed, 60 insertions(+), 99 deletions(-) diff --git a/src/GameQ/Protocols/Blackmesa.php b/src/GameQ/Protocols/Blackmesa.php index d03ef9df..efaafdfb 100644 --- a/src/GameQ/Protocols/Blackmesa.php +++ b/src/GameQ/Protocols/Blackmesa.php @@ -39,11 +39,4 @@ class Blackmesa extends Source * @type string */ protected $name_long = "Black Mesa"; - - /** - * query_port = client_port + 1 - * - * @type int - * protected $port_diff = 1; - */ } diff --git a/src/GameQ/Protocols/Citadel.php b/src/GameQ/Protocols/Citadel.php index 5b4694f4..3d1074b1 100644 --- a/src/GameQ/Protocols/Citadel.php +++ b/src/GameQ/Protocols/Citadel.php @@ -39,11 +39,4 @@ class Citadel extends Source * @type string */ protected $name_long = "Citadel"; - - /** - * query_port = client_port + 1 - * - * @type int - * protected $port_diff = 1; - */ } diff --git a/tests/Protocols/Barotrauma.php b/tests/Protocols/Barotrauma.php index 7bb1b8f4..3a4b8488 100644 --- a/tests/Protocols/Barotrauma.php +++ b/tests/Protocols/Barotrauma.php @@ -16,33 +16,34 @@ * along with this program. If not, see . */ -namespace GameQ\Protocols; +namespace GameQ\Tests\Protocols; /** - * Barotrauma Protocol Class + * Test Class for Barotrauma * - * @package GameQ\Protocols + * @package GameQ\Tests\Protocols */ -class Barotrauma extends Source +class Barotrauma extends Base { /** - * String name of this protocol class + * Test responses for Barotrauma * - * @type string - */ - protected $name = 'barotrauma'; - - /** - * Longer string name of this protocol class + * @dataProvider loadData * - * @type string + * @param $responses + * @param $result */ - protected $name_long = "Barotrauma"; + public function testResponses($responses, $result) + { + // Pull the first key off the array this is the server ip:port + $server = key($result); - /** - * query_port = client_port + 1 - * - * @type int - */ - protected $port_diff = 1; + $testResult = $this->queryTest( + $server, + 'barotrauma', + $responses + ); + + $this->assertEquals($result[$server], $testResult); + } } diff --git a/tests/Protocols/Blackmesa.php b/tests/Protocols/Blackmesa.php index 710e1e05..3d9cb29d 100644 --- a/tests/Protocols/Blackmesa.php +++ b/tests/Protocols/Blackmesa.php @@ -16,33 +16,34 @@ * along with this program. If not, see . */ -namespace GameQ\Protocols; +namespace GameQ\Tests\Protocols; /** - * Blackmesa Protocol Class + * Test Class for Blackmesa * - * @package GameQ\Protocols + * @package GameQ\Tests\Protocols */ -class Blackmesa extends Source +class Blackmesa extends Base { /** - * String name of this protocol class + * Test responses for Blackmesa * - * @type string - */ - protected $name = 'blackmesa'; - - /** - * Longer string name of this protocol class + * @dataProvider loadData * - * @type string + * @param $responses + * @param $result */ - protected $name_long = "Black Mesa"; + public function testResponses($responses, $result) + { + // Pull the first key off the array this is the server ip:port + $server = key($result); - /** - * query_port = client_port + 1 - * - * @type int - * protected $port_diff = 1; - */ + $testResult = $this->queryTest( + $server, + 'blackmesa', + $responses + ); + + $this->assertEquals($result[$server], $testResult); + } } diff --git a/tests/Protocols/Citadel.php b/tests/Protocols/Citadel.php index c2557d96..6303d1ec 100644 --- a/tests/Protocols/Citadel.php +++ b/tests/Protocols/Citadel.php @@ -16,33 +16,34 @@ * along with this program. If not, see . */ -namespace GameQ\Protocols; +namespace GameQ\Tests\Protocols; /** - * Citadel Protocol Class + * Test Class for Citadel * - * @package GameQ\Protocols + * @package GameQ\Tests\Protocols */ -class Citadel extends Source +class Citadel extends Base { /** - * String name of this protocol class + * Test responses for Citadel * - * @type string - */ - protected $name = 'citadel'; - - /** - * Longer string name of this protocol class + * @dataProvider loadData * - * @type string + * @param $responses + * @param $result */ - protected $name_long = "Citadel"; + public function testResponses($responses, $result) + { + // Pull the first key off the array this is the server ip:port + $server = key($result); - /** - * query_port = client_port + 1 - * - * @type int - * protected $port_diff = 1; - */ + $testResult = $this->queryTest( + $server, + 'citadel', + $responses + ); + + $this->assertEquals($result[$server], $testResult); + } } diff --git a/tests/Protocols/Fof.php b/tests/Protocols/Fof.php index e05a891c..82c0620f 100644 --- a/tests/Protocols/Fof.php +++ b/tests/Protocols/Fof.php @@ -35,10 +35,6 @@ class Fof extends Base */ public function testResponses($responses, $result) { - \GameQ\Tests\MockDNS::mockHosts([ - 'g-one.org' => '164.132.202.2:27024' - ]); - // Pull the first key off the array this is the server ip:port $server = key($result); diff --git a/tests/Protocols/Hl1.php b/tests/Protocols/Hl1.php index f805a269..da5448a7 100644 --- a/tests/Protocols/Hl1.php +++ b/tests/Protocols/Hl1.php @@ -35,10 +35,6 @@ class Hl1 extends Base */ public function testResponses($responses, $result) { - \GameQ\Tests\MockDNS::mockHosts([ - 'g-one.org' => '46.174.52.4:27222' - ]); - // Pull the first key off the array this is the server ip:port $server = key($result); diff --git a/tests/Protocols/Modiverse.php b/tests/Protocols/Modiverse.php index ea8377be..76dd943a 100644 --- a/tests/Protocols/Modiverse.php +++ b/tests/Protocols/Modiverse.php @@ -35,10 +35,6 @@ class Modiverse extends Base */ public function testResponses($responses, $result) { - \GameQ\Tests\MockDNS::mockHosts([ - 'g-one.org' => '23.88.96.146:27016' - ]); - // Pull the first key off the array this is the server ip:port $server = key($result); diff --git a/tests/Protocols/Nmrih.php b/tests/Protocols/Nmrih.php index 3102799f..53bed481 100644 --- a/tests/Protocols/Nmrih.php +++ b/tests/Protocols/Nmrih.php @@ -35,10 +35,6 @@ class Nmrih extends Base */ public function testResponses($responses, $result) { - \GameQ\Tests\MockDNS::mockHosts([ - 'g-one.org' => '176.9.10.34:27055' - ]); - // Pull the first key off the array this is the server ip:port $server = key($result); diff --git a/tests/Protocols/Of.php b/tests/Protocols/Of.php index 1bbcb7c7..77897360 100644 --- a/tests/Protocols/Of.php +++ b/tests/Protocols/Of.php @@ -35,10 +35,6 @@ class Of extends Base */ public function testResponses($responses, $result) { - \GameQ\Tests\MockDNS::mockHosts([ - 'g-one.org' => '74.91.127.161:27015' - ]); - // Pull the first key off the array this is the server ip:port $server = key($result); diff --git a/tests/Protocols/Sco.php b/tests/Protocols/Sco.php index 56e78ed5..da44c874 100644 --- a/tests/Protocols/Sco.php +++ b/tests/Protocols/Sco.php @@ -35,10 +35,6 @@ class Sco extends Base */ public function testResponses($responses, $result) { - \GameQ\Tests\MockDNS::mockHosts([ - 'g-one.org' => '176.9.61.5:27027' - ]); - // Pull the first key off the array this is the server ip:port $server = key($result); diff --git a/tests/Protocols/Stormworks.php b/tests/Protocols/Stormworks.php index 3ee186f2..25e1eae6 100644 --- a/tests/Protocols/Stormworks.php +++ b/tests/Protocols/Stormworks.php @@ -35,10 +35,6 @@ class Stormworks extends Base */ public function testResponses($responses, $result) { - \GameQ\Tests\MockDNS::mockHosts([ - 'g-one.org' => '23.88.96.146:28015' - ]); - // Pull the first key off the array this is the server ip:port $server = key($result); From a9618a40efac5e0c88eb9816fd1c61f88bbbcb04 Mon Sep 17 00:00:00 2001 From: Eranio Date: Sun, 28 Aug 2022 17:32:27 +0200 Subject: [PATCH 5/5] Update Nmrih.php --- tests/Protocols/Nmrih.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Protocols/Nmrih.php b/tests/Protocols/Nmrih.php index 53bed481..c6284519 100644 --- a/tests/Protocols/Nmrih.php +++ b/tests/Protocols/Nmrih.php @@ -40,7 +40,7 @@ public function testResponses($responses, $result) $testResult = $this->queryTest( $server, - 'of', + 'nmrih', $responses );