Commit Graph

56 Commits (e98d421aff046a2d9a9b87516779603dc170b209)

Author SHA1 Message Date
MoNTE48 e98d421aff Merge remote-tracking branch 'upstream/stable-0.4' into sync 2019-04-01 20:18:54 +02:00
Maksim Gamarnik e59c141b37 Move killme to builtin, TNT fix and new chicken model by @stujones11 2018-08-31 23:21:40 +02:00
dopik ff17d76d38 /shutdown can't do countdown when using reconnect and/or shutdown message (#7055)
Delay was converted from the param string and not the delay value, thus never using the actual given delay value when used in combination with other string values in the param, in this case reconnect and the shutdown messsage.
2018-06-03 17:32:00 +02:00
raymoo 352e17583d Fix default item callbacks to work with nil users (#5819)
* Fix default item callbacks to work with nil users

* item.lua: Handle node drops for invalid players

The if-condition for the dropping loop is the same as `inv`, which means that the 2nd possible definition of `give_item` is never used.
Remove redundant `local _, dropped_item`
2018-06-03 17:32:00 +02:00
Wuzzy d675078277 Remove “inf” argument from shutdown command help (#5880) 2017-06-02 17:16:30 +02:00
Elijah Duffy e79fb73ca1 Add /clearinv chat command (#4994)
Allow players to clear their own inventory or that of another player with /clearinv command. server privilege is required to clear another player's inventory, no privileges are required to clear your own inventory.'
2017-05-20 12:56:17 +02:00
ShadowNinja dfb4074a5a Use a settings object for the main settings
This unifies the settings APIs.

This also unifies the sync and async registration APIs, since the async
registration API did not support adding non-functions to the API table.
2017-05-06 15:33:19 -04:00
Loïc Blot 799890d946 Player data to Database (#5475)
* Player data to Database

Add player data into databases (SQLite3 & PG only)

PostgreSQL & SQLite: better POO Design for databases

Add --migrate-players argument to server + deprecation warning

* Remove players directory if empty
2017-04-23 14:35:08 +02:00
Dániel Juhász 05ff3806f5 Add /fixlight chat command 2017-04-22 01:24:41 +01:00
Loïc Blot c99bfa77db Implement delayed server shutdown with cancelation (#4664) 2017-04-15 23:19:18 +02:00
red-001 db2bf2cc9e Move chat command handling code from C++ to Lua (#5528) 2017-04-08 20:03:57 +02:00
paramat 1bb70a78a9 Map generation limit: Make per-world
The setting limits map generation but affects nothing else.
Add 'mapgen_limit' to global mapgen parameters.
Move 'blockpos_over_mapgen_limit()' to the only place it is called
from: map.cpp.
Allow teleportation to any part of the world even if over the set
mapgen limit.
Simplify the reading of this limit in mgvalleys.
Remove the 'map_generation_limit' setting.
2017-03-27 03:18:09 +01:00
red-001 792d324efc Change command prefix to "." and add "help" command. 2017-03-26 05:51:14 +01:00
red-001 1c7fd8a35c [CSM] Add client-sided chat commands (#5092) 2017-03-13 23:56:05 +01:00
red-001 0e6509f88d Fix crash that can be caused by the shutdown command. (#5292) 2017-02-25 09:28:25 +01:00
red-001 f183c153e1 Add support for the new arguments of `request_shutdown` to the `/shutdown` chatcommand. (#5252) 2017-02-18 12:16:11 +01:00
Elijah Duffy 7285ef6639 Add chatcommand unregister and override API (#5076)
Introduces two functions to unregister and override chatcommands.
minetest.unregister_chatcommand("<name>") and
minetest.override_chatcommand("<name>", {<redifinition>})
2017-01-20 19:49:20 +01:00
Ezhh 2b202aa7c0 Improve priv descriptions (#5047) 2017-01-17 15:41:25 +01:00
rubenwardy 2f942ce148 Expose and document chatcommands as minetest.registered_chatcommands 2017-01-04 20:56:07 +00:00
Dorian Wouters 6ba3df87e2 Fix /grant & /revoke not working with custom auth handler (#4974)
core.auth_table is not supposed to be accessed directly.
2016-12-31 18:12:26 +01:00
red-001 aec348315e Chat commands: Trim whitespaces from input of `/privs` command 2016-10-20 03:39:03 +01:00
red-001 d4b87e9607 Builtin/../chatcommands: Add /grantme command 2016-10-16 01:13:50 +01:00
Tim 8ceaf9cc13 Builtin/profiler: Replace game profiler (#4245)
Use the setting "profiler.load" to enable profiling.
Other settings can be found in settingtypes.txt.

* /profiler print [filter] - report statistics to in-game console
* /profiler dump [filter] - report statistics to STDOUT and debug.txt
* /profiler save [format [filter]] - saves statistics to a file in your worldpath
	* txt (default) - same treetable format as used by the dump and print commands
	* csv - ready for spreadsheet import
	* json - useful for adhoc D3 visualizations
	* json_pretty - line wrapped and intended json for humans
	* lua - serialized lua table of the profile-data, for adhoc scripts
* /profiler reset - reset all gathered profile data.
	This can be helpful to discard of any startup measurements that often spike during loading or to get more useful min-values.

[filter] allows limiting the output of the data via substring/pattern matching against the modname.

Note: Serialized data structures might be subject to change with changed or added measurements.
	csv might be the most stable, due to flat structure.

Changes to the previous version include:

* Updated and extended API monitoring
* Correct calculation of average (mean) values (undistorted by idleness)
* Reduce instrumentation overhead.
* Fix crashes related to missing parameters for the future and occasional DIV/0's.
* Prevent issues caused by timetravel (overflow, timejump, NTP corrections)
* Prevent modname clashes with internal names.
* Measure each instrumentation individually and label based on registration order.
* Labeling of ABM's and LBM's for easier classification.
  Giving several ABM's or LBM's the same label will treat them as one.
  Missing labels will be autogenerated based on name or registration order.
* Configurable instrumentation and reporting. Skip e.g. builtin if you don't need it.
* Profile the profiler to measure instrumentation overhead.
2016-07-12 21:51:10 +02:00
Ekdohibs e7b84d7db6 Add colored text (not only colored chat).
Add documentation, move files to a proper place and avoid memory leaks.
Make it work with most kind of texts, and allow backgrounds too.
2016-05-31 17:34:29 +02:00
TriBlade9 43390af812 Colored chat working as expected for both freetype and non-freetype builds. @nerzhul improvements * Add unit tests * Fix coding style * move guiChatConsole.hpp to client/ 2016-05-31 17:34:29 +02:00
tenplus1 0d64d63591 Avoid teleporting player if /teleport coords are out-of-range 2016-04-29 00:00:35 +10:00
rubenwardy 21e176b7a0 Builtin: Add basic_privs setting 2016-04-28 07:19:07 +01:00
Auke Kok d8e01b5a2c Make `options` local here.
Undoubtably this may cause problems later if unchecked.

```
2016-03-22 21:57:52: WARNING[Server]: Assignment to undeclared global "options" inside a function at .../sofar/git/minetest/bin/../builtin/game/chatcommands.lua:862.
```
2016-03-24 16:52:26 +01:00
Auke Kok 9cf7a3ef96 Add consistent monotonic day counter - get_day_count()
I've written several experimental bits of code that revolve around the
need for a consistent calendar, but implementing one is extremely hard
in mods due to time changes and mods overriding core.get_timeofday(),
which will conflict.

The second part of the problem is that doing this from a mod requires
constant maintenance of a settings file.

An implementation in core is trivial, however, and solves all of
these problems at virtually no cost: No extra branches in server
steps, and a single branch when minetest.set_time_of_day(), which is
entirely reasonable.

We store the day_count value in env_meta.txt.

The use case is obvious: This change allows mods to create an actual
virtual calendar, or properly account for seasonal changes, etc..

We add a "/days" chatcommand that displays the current day count. No
permissions are needed. It can only retrieve the day count, not
modify it.
2016-03-09 01:45:23 +01:00
Rui914 7a9e8367db Faster insertion into table 2016-03-06 23:42:04 +00:00
Kahrl c1946cc258 Log /clearobjects mode 2016-02-11 04:22:58 +00:00
Kahrl 02cbda530b Add '/clearobjects quick' 2016-02-11 04:22:58 +00:00
Splizard 3f429363a2 Add admin command which says who the administator is for the server. 2016-02-04 13:23:02 +01:00
kwolekr 4072700558 Add callback parameter for core.emerge_area() 2015-11-02 18:43:09 -05:00
Rui914 f4e29e66bb minetest. to core. 2015-10-31 02:28:06 +01:00
kwolekr 23316c9f92 Add /emergeblocks command and core.emerge_area() Lua API 2015-09-23 15:56:24 -04:00
kwolekr 2fb4917d8e SAPI: Track last executed mod and include in error messages 2015-08-12 23:56:12 -04:00
Marcin 7527fea2ae Add ability to specify coordinates for /spawnentity 2015-07-18 08:35:36 +02:00
Craig Davison e49c838c0b Remove reference to deprecated privilege 2015-06-14 23:53:30 +02:00
est31 51c32c262f Nicer time setting logging
Now logs

ACTION[ServerThread]: player sets time to 6:03

instead of

ACTION[ServerThread]: player sets time to 6:3
2015-06-02 06:49:05 +02:00
LeMagnesium 6aecfb8151 Added hour:minute format to time command
* The time command now accepts parameters in the form <hour>:<minute>,
    and if invoked with no parameters returns the current time in said format.
2015-05-16 18:15:34 -04:00
est31 36ada329b5 Add reason to kicked log message and use present tense 2015-04-05 04:18:47 +02:00
SmallJoker ae0d39fcbc Radius parameter for /deleteblocks here 2015-03-05 00:10:53 +10:00
est31 ef9fd92918 Add /setpassword and /clearpassword logging 2015-02-27 23:00:28 +01:00
Loic Blot ad693a80de Fix unused (and so, broken) enable_rollback_recording. This option must be reloaded at server loop but loaded when server starts, for data consistency (not a hot load variable)
ok @ShadowNinja
2015-02-18 09:28:39 +01:00
kwolekr 3ccfc96d0d Prevent null concatenation when /deleteblocks is provided an incorrect format 2015-01-27 22:36:53 -05:00
kwolekr 4e33a698b7 Simplify deleteblocks chat command argument parsing
Add optional core.pos_to_string decimal place rounding
Move core.string_to_pos to builtin/common/misc_helpers.lua for consistency
2015-01-15 18:05:13 -05:00
kwolekr 66b0d25786 Add ability to delete MapBlocks from map
Also add a Lua API and chatcommand for this
2015-01-15 16:48:56 -05:00
Craig Davison f7c264cec7 Fix some undeclared global variables 2014-11-26 22:50:08 +10:00
Ryan Newell c4ddc515f9 Add last_login field to auth.txt
Also shortens some related code and adds more parameters to string.split.
2014-11-08 12:49:50 -05:00