Command 548: Difference between revisions

From Project Skyfire
Jump to navigation Jump to search
(Add content)
 
(Add missing table entry)
 
(2 intermediate revisions by the same user not shown)
Line 6: Line 6:
<big>'''The `command` table'''</big>
<big>'''The `command` table'''</big>


This table holds the security levels for the various commands.
Holds help and permission information for commands. This table does NOT create new commands. It only sets / overrides the permission and provides a help text.




Line 27: Line 27:
|
|
|-
|-
|[[#security|security]]
|[[#permission|permission]]
|tinyint(3)
|smallint(5)
|unsigned
|unsigned
|
|
Line 39: Line 39:
|signed
|signed
|
|
|
|YES
|
|
|
|
|}
|}
<br> <big>'''DB Structure'''</big>
<br>
{| border="1"<br>
<pre style="color: red">
CREATE TABLE `command` (
`name` VARCHAR(50) NOT NULL DEFAULT '' COLLATE 'utf8_general_ci',
`permission` SMALLINT NOT NULL DEFAULT '0',
`help` LONGTEXT NULL COLLATE 'utf8_general_ci',
PRIMARY KEY (`name`) USING BTREE
)
COMMENT='Chat System'
COLLATE='utf8_general_ci'
ENGINE=MyISAM
ROW_FORMAT=FIXED
;
</pre>


<br> <big>'''Description of the fields'''</big>  
<br> <big>'''Description of the fields'''</big>  
Line 50: Line 66:
Name of the command.
Name of the command.


===security===
===permission===


The minimum security level required to use the command (1-4 (Player-GM)).
The permission required to use the command. Corresponds with rbac_permissions.id in the auth-database.


===help===
===help===


The in-game syntax for proper use of the command.
The in-game syntax for proper use of the command.

Latest revision as of 20:16, 8 August 2021

Back to world database list of tables.

The `command` table

Holds help and permission information for commands. This table does NOT create new commands. It only sets / overrides the permission and provides a help text.


Structure

Field Type Attribute Key Null Default Comment
name varchar(50) signed PRI NO
permission smallint(5) unsigned NO 0
help longtext signed YES


DB Structure

CREATE TABLE `command` (
	`name` VARCHAR(50) NOT NULL DEFAULT '' COLLATE 'utf8_general_ci',
	`permission` SMALLINT NOT NULL DEFAULT '0',
	`help` LONGTEXT NULL COLLATE 'utf8_general_ci',
	PRIMARY KEY (`name`) USING BTREE
)
COMMENT='Chat System'
COLLATE='utf8_general_ci'
ENGINE=MyISAM
ROW_FORMAT=FIXED
;


Description of the fields

name

Name of the command.

permission

The permission required to use the command. Corresponds with rbac_permissions.id in the auth-database.

help

The in-game syntax for proper use of the command.