README.txt 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. someone on libreboot irc mentioned xonotic which is based on the
  2. ioquake engine, and then i remembered i still had thing code i wrote
  3. for openarena back in 2012.
  4. it shows stats on a web page, for players in a server. for example
  5. if you have a website for your game server. runs in the backend, so
  6. you have to refresh the page. you could probably write some javascript
  7. thing that just calls this every once in a while dynamically, or just
  8. rewrite this in javascript.
  9. i used this for openarena, but it should work with other games that
  10. use the dpmaster list, like xonotic
  11. NOTE:
  12. This is largely unedited, from what I wrote in 2012. The code
  13. is unchanged. I decided to actually release this out of boredom today,
  14. on 7 April 2023, but I wrote this code some time during 2012.
  15. I also changed the license, for release. I never actually released
  16. this before, but i used the 4-clause openbsd license for some reason.
  17. this release, that you are seeing now, is under MIT license.
  18. (this readme aswell. see COPYING file)
  19. BUG:
  20. Sometimes the mailer will just spam endlessly, detecting wrongly
  21. that a server is offline because the *master list* (dpmaster) was
  22. down or couldn't be pinged or whatever. that should be fixed.
  23. (there's probably an exploit or two in this code aswell. don't
  24. use it unless you've audited it and fixed it - patches welcome i guess)
  25. also it literally just uses the php mailer, so make sure mail is properly
  26. configured on your system that you run this on
  27. other than that, this was a pretty solid half-assed thing i made
  28. in 2012 when i was really into openarena. enjoy!
  29. The original readme text from 2012 is as follows:
  30. ___________________________________
  31. How to use
  32. --
  33. make sure you install first (see below)
  34. on the page where you want to display server statistics, add the following code:
  35. <?php
  36. include "oadisplay.php";
  37. ?>
  38. for the above to work, the page must be a *.php.
  39. However, some webhosts also allow PHP code execution on *.htm or *.html
  40. it is recommended to extract oachecker software into the root of your website.
  41. configurator.php is independant, it can generate its own pages.
  42. but oadisplay.php is supposed to be used on a page of your own.
  43. Before you can use the software, there are some configuration steps that are needed,
  44. NOTE: oagenerate.php and oaparse.php are just libraries (they have useful functions)
  45. dont use these directly, just include oadisplay.php on your page.
  46. it will do the rest.
  47. How to install
  48. --
  49. import sql file into your mysql database using phpmyadmin
  50. edit software/oaprotected/common.php
  51. - look in function dbConfig()
  52. - edit variables 'host','database','user' and 'password'
  53. (mysql host, normally 'localhost' or mysql.domain.com, etc)
  54. (database you want to use)
  55. (database username)
  56. (database password)
  57. upload the contents of the 'software' folder to a location of your choosing.
  58. in your web browser, goto where you installed the software on your webhost,
  59. and open the page 'configurator.php'
  60. By default there is no user/pass needed
  61. Add at least 1 admin (user/pass/email), and then a user/pass will be needed
  62. (the user/pass that you enter)
  63. Add the IP and Port of your OA server in configurator.php
  64. Make sure that the right qStat list is specified
  65. (most OA servers use dpmaster.deathmask.net, so the default entry should be fine)
  66. --
  67. oacron.php
  68. in your webhost control panel (each panel differs depending on hosting software),
  69. set a cron job to run oacron.php every 10 minutes
  70. you could also choose other intervals, but 10 minutes is reasonable.
  71. Consult with your webhosting provider for how to setup a cronjob
  72. Note: Linux webhosting is required for setting cronjobs.
  73. You probably use Linux hosting, most people do.
  74. Thats it.
  75. Add any more users/servers that you want in the future.
  76. You could also add new users for others, and add their server address,
  77. so that they know when the server goes down or comes back online.
  78. --
  79. .htpasswd / .htaccess
  80. set a .htaccess password on the 'oaprotected' folder in your webhost control panel
  81. (or make the .htaccess file yourself in a text editor)