|
|
@ -22,56 +22,59 @@ class ACommandUserGroups extends Command |
|
|
|
|
|
|
|
|
|
|
|
protected function BuildData(CommandDataBuilder builder) |
|
|
|
protected function BuildData(CommandDataBuilder builder) |
|
|
|
{ |
|
|
|
{ |
|
|
|
builder.Name(P("usergroups")) |
|
|
|
builder.Name(P("usergroups")); |
|
|
|
.Group(P("admin")) |
|
|
|
builder.Group(P("admin")); |
|
|
|
.Summary(P("User groups management.")) |
|
|
|
builder.Summary(P("User groups management.")); |
|
|
|
.Describe(P("Allows to add/remove user groups and users to these:" |
|
|
|
builder.Describe(P("Allows to add/remove user groups and users to these: groups. Changes made" |
|
|
|
@ "groups. Changes made by it will always affect current session," |
|
|
|
@ "by it will always affect current session, but might fail to be saved in case user groups" |
|
|
|
@ "but might fail to be saved in case user groups are stored in" |
|
|
|
@ "are stored in a database that is either corrupted or in read-only mode.")); |
|
|
|
@ "a database that is either corrupted or in read-only mode.")); |
|
|
|
|
|
|
|
builder.SubCommand(P("list")) |
|
|
|
builder.SubCommand(P("list")); |
|
|
|
.Describe(P("Lists specified groups along with users that belong to" |
|
|
|
builder.Describe(P("Lists specified groups along with users that belong to them. If no groups" |
|
|
|
@ "them. If no groups were specified at all - lists all available" |
|
|
|
@ "were specified at all - lists all available groups.")); |
|
|
|
@ "groups.")) |
|
|
|
builder.OptionalParams(); |
|
|
|
.OptionalParams() |
|
|
|
builder.ParamTextList(P("groups")); |
|
|
|
.ParamTextList(P("groups")); |
|
|
|
|
|
|
|
builder.SubCommand(P("add")) |
|
|
|
builder.SubCommand(P("add")); |
|
|
|
.Describe(P("Adds a new group")) |
|
|
|
builder.Describe(P("Adds a new group")); |
|
|
|
.ParamText(P("group_name")); |
|
|
|
builder.ParamText(P("group_name")); |
|
|
|
builder.SubCommand(P("remove")) |
|
|
|
|
|
|
|
.Describe(P("Removes a group")) |
|
|
|
builder.SubCommand(P("remove")); |
|
|
|
.ParamText(P("group_name")); |
|
|
|
builder.Describe(P("Removes a group")); |
|
|
|
builder.SubCommand(P("addplayer")) |
|
|
|
builder.ParamText(P("group_name")); |
|
|
|
.Describe(F("Adds new user to the group, specified by the player" |
|
|
|
|
|
|
|
@ "selector. Can add several players at once." |
|
|
|
builder.SubCommand(P("addplayer")); |
|
|
|
@ "Allows to also optionally specify annotation" |
|
|
|
builder.Describe(F("Adds new user to the group, specified by the player selector. Can add" |
|
|
|
@ "(human-readable name) that can be thought of as" |
|
|
|
@ "several players at once. Allows to also optionally specify annotation (human-readable" |
|
|
|
@ "a {$TextEmphasis comment}. If annotation isn't specified" |
|
|
|
@ "name) that can be thought of as a {$TextEmphasis comment}. If annotation isn't" |
|
|
|
@ "current nickname will be used as one.")) |
|
|
|
@ "specified current nickname will be used as one.")); |
|
|
|
.ParamText(P("group_name")) |
|
|
|
builder.ParamText(P("group_name")); |
|
|
|
.ParamPlayers(P("player_selector")) |
|
|
|
builder.ParamPlayers(P("player_selector")); |
|
|
|
.OptionalParams() |
|
|
|
builder.OptionalParams(); |
|
|
|
.ParamText(P("annotation")); |
|
|
|
builder.ParamText(P("annotation")); |
|
|
|
builder.SubCommand(P("removeplayer")) |
|
|
|
|
|
|
|
.Describe(P("Removes user from the group, specified by player selector." |
|
|
|
builder.SubCommand(P("removeplayer")); |
|
|
|
@ "Can remove several players at once.")) |
|
|
|
builder.Describe(P("Removes user from the group, specified by player selector." |
|
|
|
.ParamText(P("group_name")) |
|
|
|
@ "Can remove several players at once.")); |
|
|
|
.ParamPlayers(P("player_selector")); |
|
|
|
builder.ParamText(P("group_name")); |
|
|
|
builder.SubCommand(P("adduser")) |
|
|
|
builder.ParamPlayers(P("player_selector")); |
|
|
|
.Describe(F("Adds new user to the group. Allows to also optionally" |
|
|
|
|
|
|
|
@ "specify annotation (human-readable name) that can be thought of" |
|
|
|
builder.SubCommand(P("adduser")); |
|
|
|
@ "as a {$TextEmphasis comment}.")) |
|
|
|
builder.Describe(F("Adds new user to the group. Allows to also optionally specify annotation" |
|
|
|
.ParamText(P("group_name")) |
|
|
|
@ "(human-readable name) that can be thought of as a {$TextEmphasis comment}.")); |
|
|
|
.ParamText(P("user_id")) |
|
|
|
builder.ParamText(P("group_name")); |
|
|
|
.OptionalParams() |
|
|
|
builder.ParamText(P("user_id")); |
|
|
|
.ParamText(P("annotation")); |
|
|
|
builder.OptionalParams(); |
|
|
|
builder.SubCommand(P("removeuser")) |
|
|
|
builder.ParamText(P("annotation")); |
|
|
|
.Describe(P("Removes user from the group. User can be specified by both" |
|
|
|
|
|
|
|
@ "user's id or annotation, with id taking priority.")) |
|
|
|
builder.SubCommand(P("removeuser")); |
|
|
|
.ParamText(P("group_name")) |
|
|
|
builder.Describe(P("Removes user from the group. User can be specified by both user's id or" |
|
|
|
.ParamText(P("user_name")); |
|
|
|
@ "annotation, with id taking priority.")); |
|
|
|
builder.Option(P("force")) |
|
|
|
builder.ParamText(P("group_name")); |
|
|
|
.Describe(P("Allows to force usage of invalid user IDs.")); |
|
|
|
builder.ParamText(P("user_name")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
builder.Option(P("force")); |
|
|
|
|
|
|
|
builder.Describe(P("Allows to force usage of invalid user IDs.")); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected function Executed(CallData arguments, EPlayer instigator) |
|
|
|
protected function Executed(CallData arguments, EPlayer instigator) |
|
|
|