Difference between revisions of "Server commands"
m (→World manipulation: refined defintion) |
(Restructured the entire page: Moved a lot of “poorly documented commands” into the main section; clarified missing privilege information) |
||
Line 13: | Line 13: | ||
* <code>/help all</code> - Lists the available commands—depending on your privileges—on the server and a short description and syntax reference to each one. | * <code>/help all</code> - Lists the available commands—depending on your privileges—on the server and a short description and syntax reference to each one. | ||
* <code>/help privs</code> - Lists all privileges on the server that could possibly be granted to players and shows a short description about each of them. | * <code>/help privs</code> - Lists all privileges on the server that could possibly be granted to players and shows a short description about each of them. | ||
− | === Chat === | + | |
− | + | === Player-related === | |
+ | ==== Informational ==== | ||
+ | * <code>/privs [player]</code> - List of privileges granted to [player], if not specified, your own privileges. | ||
+ | |||
+ | ==== Chat ==== | ||
+ | These commands require the “shout” privilege to work. | ||
* <code>/msg <player> <message></code> - Send a private message <message> to <player> | * <code>/msg <player> <message></code> - Send a private message <message> to <player> | ||
* <code>/me <action></code> - Makes a text in the format “* <your name> <action>” appear in the chat log. E.g. “/me eats pizza.” leads to “* Alfred eats pizza.” (if your name is “Alfred”) | * <code>/me <action></code> - Makes a text in the format “* <your name> <action>” appear in the chat log. E.g. “/me eats pizza.” leads to “* Alfred eats pizza.” (if your name is “Alfred”) | ||
See [[Chat]] for details. | See [[Chat]] for details. | ||
− | === | + | ==== Items ==== |
− | |||
− | |||
− | |||
− | |||
− | == | ||
− | |||
* <code>/giveme <itemstring> [count]</code> - Give certain item [count] times (default: 1 times) to yourself. For a list of items to use this with, see the [[Itemstrings]] page. Requires the “give” privilege. | * <code>/giveme <itemstring> [count]</code> - Give certain item [count] times (default: 1 times) to yourself. For a list of items to use this with, see the [[Itemstrings]] page. Requires the “give” privilege. | ||
* <code>/give <player> <itemstring> [count]</code> - Give certain item [count] times (default: 1 times) to the player. Requires the “give” privilege. | * <code>/give <player> <itemstring> [count]</code> - Give certain item [count] times (default: 1 times) to the player. Requires the “give” privilege. | ||
* <code>/pulverize</code> - Destroys the wielded item. Can be used by any player. | * <code>/pulverize</code> - Destroys the wielded item. Can be used by any player. | ||
− | |||
− | |||
− | |||
− | |||
− | === Privilege manipulation === | + | ==== Teleportation ==== |
+ | Teleportation is the immediate displacement of any player to a given position. All of these commands require the “teleport” privilege. | ||
+ | * <code>/teleport <x>,<y>,<z></code> - Teleport yourself to given [[coordinates]]. | ||
+ | * <code>/teleport <player></code> - Teleport yourself to the player with the name <target_player>.. | ||
+ | * <code>/teleport <player> <x>,<y>,<z></code> - Teleports <player> to given coordinates. Also requires the “bring” privilege. | ||
+ | * <code>/teleport <player1> <player2></code> - Teleports <player1> to <player2>. Also requires the “bring” privilege. | ||
+ | |||
+ | === Moderation === | ||
+ | ==== Password manipulation ==== | ||
+ | These commands allow to set and reset the passwords of any player and require the “password” privilege to work. | ||
+ | * <code>/setpassword <player> <password></code> - set password of <player> to <password> | ||
+ | * <code>/clearpassword <player></code> - make password of <player> empty | ||
+ | |||
+ | ==== Privilege manipulation ==== | ||
All these commands require you to have the “privs” (to manipulate all privileges) or “basic_privs” (to manipulate “interact” and “shout” privileges) privilege. | All these commands require you to have the “privs” (to manipulate all privileges) or “basic_privs” (to manipulate “interact” and “shout” privileges) privilege. | ||
* <code>/grant <player> <privilege></code> - Give the <privilege> to <player>. | * <code>/grant <player> <privilege></code> - Give the <privilege> to <player>. | ||
Line 41: | Line 49: | ||
* <code>/revoke <player> all</code> - Take away as much privileges as possible from <player>. | * <code>/revoke <player> all</code> - Take away as much privileges as possible from <player>. | ||
− | === World manipulation === | + | ==== Ban management ==== |
+ | These commands ban/unban a certain player and require the “ban” privilege. | ||
+ | * <code>/ban</code> - show list of banned players | ||
+ | * <code>/ban <player name></code> - ban IP of player | ||
+ | * <code>/unban <player name></code> - remove ban of player with the specified name | ||
+ | * <code>/unban <IP address></code> - remove ban of player with the specified IP address | ||
+ | |||
+ | === Server-related === | ||
+ | ==== Informational ==== | ||
+ | Request some information from the server; the answer from the server will also be written into the chatlog. | ||
+ | * <code>/status</code> - Server’s Minetest version, time the server is running in seconds (called “uptime”), list of connected players and the [[Message Of The Day|message of the day]] (if it exists). | ||
+ | * <code>/mods</code> - List of mods installed on the server. | ||
+ | |||
+ | ==== World manipulation ==== | ||
* <code>/time <nowiki><time></nowiki></code> - Set the [[Time of day|time of day]] (tod). 0 tod and 24000 tod are midnight, 12000 tod is noon, 18600 tod is sunset, 4750 tod is sunrise. (time of day = hour * 1000). Requires the “settime” privilege. | * <code>/time <nowiki><time></nowiki></code> - Set the [[Time of day|time of day]] (tod). 0 tod and 24000 tod are midnight, 12000 tod is noon, 18600 tod is sunset, 4750 tod is sunrise. (time of day = hour * 1000). Requires the “settime” privilege. | ||
* <code>/set -n time_speed <speed></code> - Set the speed of [[Day/night cycle|day/night cycle]] where <code><speed></code> is the time speed (read as “<code><speed></code> times faster than in real life”). 72 is the default, which means a day-night cycle lasts 20 minutes by default. Requires the “server” privilege. | * <code>/set -n time_speed <speed></code> - Set the speed of [[Day/night cycle|day/night cycle]] where <code><speed></code> is the time speed (read as “<code><speed></code> times faster than in real life”). 72 is the default, which means a day-night cycle lasts 20 minutes by default. Requires the “server” privilege. | ||
+ | * <code>/spawnentity <entity></code> - spawns an [http://dev.minetest.net/LuaEntitySAO#Lua_Entity entity] of type <entity> near your position (requires “give” and “interact” privileges) | ||
− | === Server maintenance === | + | ==== Server maintenance ==== |
All of these commands require the “server” privilege. | All of these commands require the “server” privilege. | ||
* <code>/shutdown</code> - Shuts down the server. (In versions prior to 0.4.0, this can only be done by the user called "name" in the server's [[minetest.conf]].) | * <code>/shutdown</code> - Shuts down the server. (In versions prior to 0.4.0, this can only be done by the user called "name" in the server's [[minetest.conf]].) | ||
Line 55: | Line 77: | ||
== Poorly documented commands == | == Poorly documented commands == | ||
The following commands also exist in Minetest, but these need better documentation. | The following commands also exist in Minetest, but these need better documentation. | ||
− | |||
− | |||
− | |||
=== Server maintenence === | === Server maintenence === | ||
* <code>/auth_reload</code> - reload authentification data (requires “server” privilege) | * <code>/auth_reload</code> - reload authentification data (requires “server” privilege) | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
=== Rollback === | === Rollback === |
Revision as of 21:09, 27 October 2013
Server commands are special commands to the server that can be entered by any player via the chat to cause the server to do something. There are a few commands which can be issued by everyone, but some commands only work if you have certain privileges granted on the server. Use “/privs” to see your own privileges. If not noted otherwise, the commands in this article are assumed to require no privileges. This article will only cover the commands that come with Minetest 0.4.7. Mods may add additional commands; refer to the mod’s documentation or use “/help all” in this case.
Issuing a command
To issue a command, simply type it like a chat message or use the console. Alternatively, you can just press the “/” key (only in default controls) which simply opens a chat window where the “/” has already been typed for you and then type the command right away. Although you use the chat window to issue the command, the command itself will not appear in the chat. Since every command starts with “/”, this means that ordinary chat messages can’t start with “/”; they will be interpreted as a command instead, even if such a command does not exist. You can tell wheather or not a command was successful by the server’s respone. If you see something “-!- Invalid command: /blargh” in the chat, you probably mis-spelled something. The most commands will cause the server to write you something else on the chat log for you, if successful.
General syntax
All commands start with “/”. After that, one word follows which is itself followed by some or none arguments. You’ll find the exact syntax in the command reference.
In the following command reference, text enclosed in <>
and []
are place-holders which have to replaced with an actual value. Arguments in <>
are required whereas arguments in []
are optional.
Command reference
Quick documentation
Show short documentation of server commands and privileges; it will appear in the chat log, too. In case the help is too long, you can open the console with F10 to view everything agiain.
/help
- Shows a list of the available commands—depending on your privileges—on the server./help <command>
- Shows short description about the given command. You can view the help of a command even if you do not have the privilege to issue it./help all
- Lists the available commands—depending on your privileges—on the server and a short description and syntax reference to each one./help privs
- Lists all privileges on the server that could possibly be granted to players and shows a short description about each of them.
Informational
/privs [player]
- List of privileges granted to [player], if not specified, your own privileges.
Chat
These commands require the “shout” privilege to work.
/msg <player> <message>
- Send a private message <message> to <player>/me <action>
- Makes a text in the format “* <your name> <action>” appear in the chat log. E.g. “/me eats pizza.” leads to “* Alfred eats pizza.” (if your name is “Alfred”)
See Chat for details.
Items
/giveme <itemstring> [count]
- Give certain item [count] times (default: 1 times) to yourself. For a list of items to use this with, see the Itemstrings page. Requires the “give” privilege./give <player> <itemstring> [count]
- Give certain item [count] times (default: 1 times) to the player. Requires the “give” privilege./pulverize
- Destroys the wielded item. Can be used by any player.
Teleportation
Teleportation is the immediate displacement of any player to a given position. All of these commands require the “teleport” privilege.
/teleport <x>,<y>,<z>
- Teleport yourself to given coordinates./teleport <player>
- Teleport yourself to the player with the name <target_player>../teleport <player> <x>,<y>,<z>
- Teleports <player> to given coordinates. Also requires the “bring” privilege./teleport <player1> <player2>
- Teleports <player1> to <player2>. Also requires the “bring” privilege.
Moderation
Password manipulation
These commands allow to set and reset the passwords of any player and require the “password” privilege to work.
/setpassword <player> <password>
- set password of <player> to <password>/clearpassword <player>
- make password of <player> empty
Privilege manipulation
All these commands require you to have the “privs” (to manipulate all privileges) or “basic_privs” (to manipulate “interact” and “shout” privileges) privilege.
/grant <player> <privilege>
- Give the <privilege> to <player>./grant <player> all
- Give all available privileges to <player>./revoke <player> <privilege>
- Take away a <privilege> from <player>./revoke <player> all
- Take away as much privileges as possible from <player>.
Ban management
These commands ban/unban a certain player and require the “ban” privilege.
/ban
- show list of banned players/ban <player name>
- ban IP of player/unban <player name>
- remove ban of player with the specified name/unban <IP address>
- remove ban of player with the specified IP address
Informational
Request some information from the server; the answer from the server will also be written into the chatlog.
/status
- Server’s Minetest version, time the server is running in seconds (called “uptime”), list of connected players and the message of the day (if it exists)./mods
- List of mods installed on the server.
World manipulation
/time <time>
- Set the time of day (tod). 0 tod and 24000 tod are midnight, 12000 tod is noon, 18600 tod is sunset, 4750 tod is sunrise. (time of day = hour * 1000). Requires the “settime” privilege./set -n time_speed <speed>
- Set the speed of day/night cycle where<speed>
is the time speed (read as “<speed>
times faster than in real life”). 72 is the default, which means a day-night cycle lasts 20 minutes by default. Requires the “server” privilege./spawnentity <entity>
- spawns an entity of type <entity> near your position (requires “give” and “interact” privileges)
Server maintenance
All of these commands require the “server” privilege.
/shutdown
- Shuts down the server. (In versions prior to 0.4.0, this can only be done by the user called "name" in the server's minetest.conf.)/set <variable>
- Read the server <variable> (→minetest.conf) with the given name and let the server show it to you./set <variable> <new value>
- Set the existing server <variable> to the given <new value>./set -n <variable> <initial value>
- Create a new server variable named <variable> and set it to <initial value>./clearobjects
- Clears all objects/entities (removes all dropped item stacks and mobs). Note this may crash the server or slow it down insanely for about 30 to 60 seconds.
Poorly documented commands
The following commands also exist in Minetest, but these need better documentation.
Server maintenence
/auth_reload
- reload authentification data (requires “server” privilege)
Rollback
Allows to use Rollback. Requires the “rollback” privilege.
/rollback_check [range] [seconds]
- check who has last touched a node or near it, max. [seconds] ago. (default [range]=0, default [seconds]=86400, which equals 24 hours in real time)/rollback <player name> [seconds]
- revert actions of a player; default for [seconds] is 60/rollback :<actor name> [seconds]:
- revert actions of an actor; default for [seconds] is 60