// This file must only be included from SettingsList.hpp

#ifndef DECL_SERVER_ONLY_SETTING
#   define DECL_SERVER_ONLY_SETTING(...)
#endif

DECL_SERVER_ONLY_SETTING
(
    bool, allowRegisterRequests, false,
    "Allow registration requests",

    "Whether or not new users should be able to request accounts.",

    {ofs << (allowRegisterRequests ? "yes" : "no");},

    PARSE_BOOL("yes", "no"),

    !
)

DECL_SERVER_ONLY_SETTING
(
    bool, autoApproveRegisterRequests, false,
    "Auto-approve registration requests",

    "Whether or not new account requests should be immediately accepted without admin approval.",

    {ofs << (autoApproveRegisterRequests ? "yes" : "no");},

    PARSE_BOOL("yes", "no"),

    !
)

DECL_SERVER_ONLY_SETTING
(
    std::string, motto, "A Voxelverse server!",
    "Server motto",

    "The motto displayed to users who ping the server, e.g. on the multiplayer screen.\n"
    "Maximum 32 characters.",

    {ofs << motto;},

    {motto = value; return "";},

    !
)

DECL_SERVER_ONLY_SETTING
(
    int, serverPort, 14201,
    "The port number on which the server should listen",

    nullptr,

    {ofs << serverPort;},

    PARSE_INTEGER,

    !
)
