serverlist.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. Minetest
  3. Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU Lesser General Public License as published by
  6. the Free Software Foundation; either version 2.1 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public License along
  13. with this program; if not, write to the Free Software Foundation, Inc.,
  14. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  15. */
  16. #include <iostream>
  17. #include "config.h"
  18. #include "content/mods.h"
  19. #include <json/json.h>
  20. #pragma once
  21. namespace ServerList
  22. {
  23. #if USE_CURL
  24. enum AnnounceAction {AA_START, AA_UPDATE, AA_DELETE};
  25. void sendAnnounce(AnnounceAction, u16 port,
  26. const std::vector<std::string> &clients_names = std::vector<std::string>(),
  27. double uptime = 0, u32 game_time = 0, float lag = 0,
  28. const std::string &gameid = "", const std::string &mg_name = "",
  29. const std::vector<ModSpec> &mods = std::vector<ModSpec>(),
  30. bool dedicated = false);
  31. #endif
  32. } // namespace ServerList