Adding a virtualserver channel limit

This commit is contained in:
WolverinDEV 2020-01-26 16:33:48 +01:00
parent 00e8aca68e
commit c9bd9054f6
6 changed files with 7 additions and 0 deletions

View File

@ -56,6 +56,7 @@ const std::vector<ErrorType> ts::avariableErrors = {
{0x030F, "channel_invalid_security_hash" , "invalid security hash supplied by client" },
{0x0310, "channel_is_deleted" , "target channel is deleted" },
{0x0311, "channel_name_invalid" , "channel name is invalid" },
{0x0312, "channel_limit_reached" , "the virtualserver channel limit has been reached" },
{0x0400, "server_invalid_id" , "invalid serverID" },
{0x0401, "server_running" , "server is running" },

View File

@ -68,6 +68,7 @@ namespace ts {
channel_invalid_security_hash = 0x30f,
channel_is_deleted = 0x310,
channel_name_invalid = 0x311,
channel_limit_reached = 0x312,
server_invalid_id = 0x400,
server_running = 0x401,

View File

@ -60,6 +60,7 @@ deque<std::shared_ptr<PermissionTypeEntry>> ts::permission::availablePermissions
make_shared<PermissionTypeEntry>(PermissionType::b_virtualserver_permission_reset, PermissionGroup::vs_admin, "b_virtualserver_permission_reset", "Reset the server permission settings to default values"),
make_shared<PermissionTypeEntry>(PermissionType::b_virtualserver_modify_name, PermissionGroup::vs_settings, "b_virtualserver_modify_name", "Modify server name"),
make_shared<PermissionTypeEntry>(PermissionType::b_virtualserver_modify_welcomemessage, PermissionGroup::vs_settings, "b_virtualserver_modify_welcomemessage", "Modify welcome message"),
make_shared<PermissionTypeEntry>(PermissionType::b_virtualserver_modify_maxchannels, PermissionGroup::vs_settings, "b_virtualserver_modify_maxchannels", "Modify servers max channels"),
make_shared<PermissionTypeEntry>(PermissionType::b_virtualserver_modify_maxclients, PermissionGroup::vs_settings, "b_virtualserver_modify_maxclients", "Modify servers max clients"),
make_shared<PermissionTypeEntry>(PermissionType::b_virtualserver_modify_reserved_slots, PermissionGroup::vs_settings, "b_virtualserver_modify_reserved_slots", "Modify reserved slots"),
make_shared<PermissionTypeEntry>(PermissionType::b_virtualserver_modify_password, PermissionGroup::vs_settings, "b_virtualserver_modify_password", "Modify server password"),

View File

@ -106,6 +106,7 @@ namespace ts {
/* virtual_server::settings */
b_virtualserver_modify_name,
b_virtualserver_modify_welcomemessage,
b_virtualserver_modify_maxchannels,
b_virtualserver_modify_maxclients,
b_virtualserver_modify_reserved_slots,
b_virtualserver_modify_password,

View File

@ -219,6 +219,7 @@ namespace ts {
make_shared<PropertyDescription>(VIRTUALSERVER_MIN_ANDROID_VERSION, "VIRTUALSERVER_MIN_ANDROID_VERSION", "1407159763", TYPE_UNSIGNED_NUMBER, FLAG_SERVER_VARIABLE | FLAG_USER_EDITABLE), //only available on request (=> requestServerVariables)
make_shared<PropertyDescription>(VIRTUALSERVER_MIN_IOS_VERSION, "VIRTUALSERVER_MIN_IOS_VERSION", "1407159763", TYPE_UNSIGNED_NUMBER, FLAG_SERVER_VARIABLE | FLAG_USER_EDITABLE), //only available on request (=> requestServerVariables)
make_shared<PropertyDescription>(VIRTUALSERVER_MIN_WINPHONE_VERSION, "VIRTUALSERVER_MIN_WINPHONE_VERSION", "1407159763", TYPE_UNSIGNED_NUMBER, FLAG_SERVER_VARIABLE | FLAG_USER_EDITABLE), //only available on request (=> requestServerVariables)
make_shared<PropertyDescription>(VIRTUALSERVER_MAX_CHANNELS, "VIRTUALSERVER_MAX_CHANNELS", "1000", TYPE_UNSIGNED_NUMBER, FLAG_SERVER_VARIABLE | FLAG_USER_EDITABLE), //only available on request (=> requestServerVariables)
make_shared<PropertyDescription>(VIRTUALSERVER_LAST_CLIENT_CONNECT, "VIRTUALSERVER_LAST_CLIENT_CONNECT", "0", TYPE_UNSIGNED_NUMBER, FLAG_SERVER_VARIABLE | FLAG_NEW | FLAG_SS), //only available on request (=> requestServerVariables)
make_shared<PropertyDescription>(VIRTUALSERVER_LAST_QUERY_CONNECT, "VIRTUALSERVER_LAST_QUERY_CONNECT", "0", TYPE_UNSIGNED_NUMBER, FLAG_SERVER_VARIABLE | FLAG_NEW | FLAG_SS), //only available on request (=> requestServerVariables)

View File

@ -204,6 +204,8 @@ namespace ts {
VIRTUALSERVER_MIN_IOS_VERSION, //only available on request (=> requestServerVariables)
VIRTUALSERVER_MIN_WINPHONE_VERSION, //only available on request (=> requestServerVariables)
VIRTUALSERVER_MAX_CHANNELS,
VIRTUALSERVER_LAST_CLIENT_CONNECT,
VIRTUALSERVER_LAST_QUERY_CONNECT,
VIRTUALSERVER_LAST_CLIENT_DISCONNECT,