util_config.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?php
  2. /*
  3. *
  4. * OGP - Open Game Panel
  5. * Copyright (C) 2008 - 2018 The OGP Development Team
  6. *
  7. * http://www.opengamepanel.org/
  8. *
  9. * This program is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License
  11. * as published by the Free Software Foundation; either version 2
  12. * of the License, or any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  22. *
  23. */
  24. // Define commands, user permissions (via *role* => true/false), and what they're referred to on each OS.
  25. // Include arguements here. They cannot be passed in the text input field.
  26. $availableCommands = array(
  27. // 'title' also needs to be specified in the translation files with the same values - as this is what shows on the select list. ex:
  28. array(
  29. 'title' => 'ping',
  30. 'linux' => 'ping -c 4', // By default, ping runs indefinitely on Linux - so set the count to 4; same as Windows default.
  31. 'windows' => 'ping',
  32. // Default: Ping is available to all user roles.
  33. 'subuser' => true,
  34. 'user' => true,
  35. 'admin' => true,
  36. ),
  37. array(
  38. 'title' => 'traceroute',
  39. 'linux' => 'traceroute',
  40. 'windows' => 'tracert',
  41. // Default: Traceroute is only available to admins.
  42. 'subuser' => false,
  43. 'user' => false,
  44. 'admin' => true,
  45. ),
  46. );
  47. // An array of characters which should never be passed to exec()
  48. $blockedCharacters = '"#$%^&*()+=[]\';,\\/{}|:<>?~';
  49. // Should we log attempted form manipulation (ie, editing the form to execute a command the user doesn't have access to) ...
  50. // ... and attempted multi-command input? (ie, ;cd /;ls)
  51. $logMaliciousUsage = true;
  52. // Should we log successfully executed commands...?
  53. // Could spam the logs - so probably set this to false.
  54. $logAllUsage = false;
  55. // Games which Sourcemod supports.
  56. // Needs to be exactly what OGP reports as the game_name.
  57. $supportedGames = array(
  58. 'Counter Strike Global Offensive',
  59. 'Counter Strike Source',
  60. 'Day of Defeat Source',
  61. 'Dystopia',
  62. 'Garrys Mod',
  63. 'Half-Life 2: Deathmatch',
  64. 'Hidden: Source',
  65. 'Pirates, Vikings and Knights II',
  66. 'Team Fortress 2',
  67. 'Team Fortress 2 Beta',
  68. 'Left 4 Dead',
  69. 'Left 4 Dead 2'
  70. );
  71. // Games which amx mod supports.
  72. // Needs to be exactly what OGP reports as the game_name.
  73. $amx_supportedGames = array(
  74. 'Counter-Strike',
  75. 'Counter-Strike Condition Zero',
  76. 'Day of Defeat',
  77. 'Death Match Classic',
  78. 'Team Fortress Classic'
  79. );
  80. // Simple array of where admins are stored depending on the admin mod.
  81. // mod.name => file.location
  82. $adminFiles = array(
  83. 'sourcemod' => 'addons/sourcemod/configs/admins_simple.ini',
  84. 'amx_mod' => 'addons/amxmodx/configs/users.ini',
  85. );
  86. // Flags that sub-users need to add admins to owned parent game-servers.
  87. // This should just be the same as allow_file_management and allow_ftp - as they'll be able to add admins anyway with those flags.
  88. $subuserAdminManagement = 'ft';