Had2.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. /**
  3. * This file is part of GameQ.
  4. *
  5. * GameQ is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU Lesser General Public License as published by
  7. * the Free Software Foundation; either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * GameQ is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU Lesser General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Lesser General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. namespace GameQ\Protocols;
  19. /**
  20. * Hidden & Dangerous 2 Protocol Class
  21. *
  22. * @author Wilson Jesus <>
  23. */
  24. class Had2 extends Gamespy2
  25. {
  26. /**
  27. * String name of this protocol class
  28. *
  29. * @type string
  30. */
  31. protected $name = 'had2';
  32. /**
  33. * Longer string name of this protocol class
  34. *
  35. * @type string
  36. */
  37. protected $name_long = "Hidden & Dangerous 2";
  38. /**
  39. * The difference between the client port and query port
  40. *
  41. * @type int
  42. */
  43. protected $port_diff = 3;
  44. /**
  45. * Normalize settings for this protocol
  46. *
  47. * @type array
  48. */
  49. protected $normalize = [
  50. // General
  51. 'general' => [
  52. // target => source
  53. 'dedicated' => 'isdedicated',
  54. 'gametype' => 'gametype',
  55. 'hostname' => 'hostname',
  56. 'mapname' => 'mapname',
  57. 'maxplayers' => 'maxplayers',
  58. 'numplayers' => 'numplayers',
  59. 'password' => 'password',
  60. ],
  61. // Individual
  62. 'player' => [
  63. 'name' => 'player',
  64. 'score' => 'score',
  65. 'deaths' => 'deaths',
  66. 'ping' => 'ping',
  67. ],
  68. ];
  69. }