Commit Graph

263 Commits

Author SHA1 Message Date
Marcus Whybrow
3e40faf2df Improve update output 2012-08-12 00:57:54 +01:00
Marcus Whybrow
0b47c6c7e1 Bump version to 0.8.1 2012-08-12 00:45:16 +01:00
Marcus Whybrow
b90fbba906 Add recursive update ability
Allows the update command to be updated + removed refusal to check for
updates if the versions are the same.
2012-08-12 00:43:04 +01:00
Marcus Whybrow
8aba5416fb Bump version to 0.8.0 2012-08-11 23:44:34 +01:00
Marcus Whybrow
a42993889f Integrate versioning files with server commands 2012-08-11 23:18:42 +01:00
Marcus Whybrow
8618de4edb Add versioning files to upgrade command.
Also add preview of which files will be updated and created.
2012-08-10 04:13:06 +01:00
Marcus Whybrow
5fa9d343fe WIP: Use new server_command wrapper func
Also improve download code to also download versions
2012-08-10 02:41:49 +01:00
Marcus Whybrow
5fbb6c649d WIP: Add versioning determination + get closest version func
Simplified confirmation server settings to accept just "expected
output"  and not have multiple settings for each command, such as
"success", "failure1" and "failure2".
2012-08-09 13:13:58 +01:00
Marcus Whybrow
65c55de586 Add update command + new command element <flags> 2012-08-08 17:36:42 +01:00
Marcus Whybrow
de8f405b25 Add VERSIONING_STORAGE_PATH setting 2012-08-08 15:22:23 +01:00
Marcus Whybrow
5f1861a681 Add variables for locating other MSM files 2012-08-08 15:21:59 +01:00
Marcus Whybrow
19e0f84c71 Bump version to 0.7.5 2012-08-08 01:33:04 +01:00
Marcus Whybrow
1974d9812e Bumped version to 0.7.4. 2012-08-02 10:41:42 +01:00
Marcus Whybrow
dd30caaa1d Bumped version to 0.7.3. 2012-07-24 22:17:35 +01:00
Marcus Whybrow
00b39ec017 Fixed global start and stop commands from failing.
Added lazy loading of necessary server properties.
2012-07-24 22:15:24 +01:00
Marcus Whybrow
44bab2fcec Bumped version to 0.7.2. 2012-07-24 14:54:40 +01:00
Marcus Whybrow
cbb8d2f616 Added three missing server username lazy loads. 2012-07-24 14:19:37 +01:00
Marcus Whybrow
381b627bb6 Bumped version to 0.7.1. 2012-07-22 08:08:15 +01:00
Marcus Whybrow
7e89f4dd12 Fixes #54. Loads server username inside the server_set_jar function. 2012-07-22 08:05:20 +01:00
Marcus Whybrow
a3dc7c6865 Bumped version to 0.7.0. 2012-07-20 10:16:30 +01:00
Marcus Whybrow
d48bd7c577 Created dirty properties functions which force variables to be loaded again. 2012-07-20 10:14:05 +01:00
Marcus Whybrow
54fdd5bb9b Prevent log roll error when log had not been created. 2012-07-20 10:13:31 +01:00
Marcus Whybrow
7a8a91992c Added output for worlds list command, when there are no worlds. 2012-07-20 09:17:25 +01:00
Marcus Whybrow
4185db1e59 Fixed world id bug when whorl name was not found.
The ID would accidentally be left as -1, which would cause problems
when loading world properties.
2012-07-20 08:15:42 +01:00
Marcus Whybrow
a5d0fc80b1 Added extra server_property calls needed. 2012-07-20 07:51:01 +01:00
Marcus Whybrow
7d1926b90f Added <server> config <setting> command which retrieves the value of a single setting. 2012-07-20 07:47:40 +01:00
Marcus Whybrow
6616805a41 Added multi-user support to the kick command. 2012-07-20 07:15:50 +01:00
Marcus Whybrow
6c1707d3e5 Added multi-user support to the gamemode command. 2012-07-20 07:12:24 +01:00
Marcus Whybrow
7463ff4149 Added multi-user and offline support to operator add and remove commands. 2012-07-20 07:07:15 +01:00
Marcus Whybrow
1e030d41a2 Added offline support for ip address blacklist commands.
Also made adding and removing names more strict: exact line matches are
now required. Before deleting the player "crafty" would also delete the
line "craftysaurus" which would be unintended.
2012-07-20 06:47:02 +01:00
Marcus Whybrow
3b2d857991 Added offline support for blacklist add and remove commands. 2012-07-20 06:27:29 +01:00
Marcus Whybrow
c16396a98b Fixed blacklist list command. Can now see correct paths. 2012-07-20 06:26:56 +01:00
Marcus Whybrow
96087b1bf9 Added multi-user support to whitelist add and remove commands. 2012-07-20 06:13:12 +01:00
Marcus Whybrow
022e0158a1 Fixed whitelist commands when offline. Could not access whitelist file. 2012-07-20 05:31:45 +01:00
Marcus Whybrow
adf5b7b897 Moved console and config commands to the server management commands section. 2012-07-20 05:24:37 +01:00
Marcus Whybrow
83f547e79a Added protection against rolling server logs when the log is empty. 2012-07-20 05:19:50 +01:00
Marcus Whybrow
06dea648f2 Removed abusive Notch comment. :D 2012-07-20 05:14:12 +01:00
Marcus Whybrow
9664c094e0 Fixed deactivating/activating a world changing file permissions to root. 2012-07-20 05:10:48 +01:00
Marcus Whybrow
ee5589bac0 Prevented save commands being sent to a stopped server in <server> worlds to disk.
Before this fix, if the server was stopped the command would output
'Server "name" is not running.' multiple times.
2012-07-20 05:01:20 +01:00
Marcus Whybrow
fe64cf0207 Added synchronisation from RAM to disk before removing RAM version of a world. 2012-07-20 04:59:30 +01:00
Marcus Whybrow
4122bba733 Fixed syntax error in world_to_disk: prevented loading server_property USERNAME. 2012-07-20 04:58:59 +01:00
Marcus Whybrow
c707df5be0 Fixed world_property RAMDISK_PATH bug, which did not set it. 2012-07-20 04:58:00 +01:00
Marcus Whybrow
9e97671af4 Fixed world offset and total variables not getting set correctly. 2012-07-20 04:45:31 +01:00
Marcus Whybrow
46f9b8204a Made initial allocation a little tidier. 2012-07-20 04:30:49 +01:00
Marcus Whybrow
8f2c1ae16e Improved world list command to be more readable. 2012-07-20 03:20:07 +01:00
Marcus Whybrow
a8ecf4615d Fixed correct name for WORLDS_FLAG_INRAM server configuration. 2012-07-20 03:19:43 +01:00
Marcus Whybrow
223dcfe714 Removed the old config loading code. It is now replaced with lazy loading. 2012-07-20 03:09:21 +01:00
Marcus Whybrow
24714b1dea Replaced while loops with for loops in world list and backup functions. 2012-07-20 03:08:40 +01:00
Marcus Whybrow
85c66fc0ab Fixed, in wold memory allocation, an incorrect variable name. 2012-07-20 03:05:35 +01:00
Marcus Whybrow
6333774d6f Made more robust checking if manager_property has loaded. 2012-07-20 03:04:52 +01:00
Marcus Whybrow
83a304c5c7 Removed debug statement in world_property. 2012-07-20 03:03:56 +01:00
Marcus Whybrow
60a6af24c2 Introduced lazy config loading. Faster in general.
Instead of allocating all memory up front for every possible command
option this new approach just expects certain variable names. If those
variables are used in a function the manager_property, server_property
or world_property command ensures that the variable has been loaded
from config files.

This approach uses sed to retrieve a single line from a config file
when necessary, instead of reading every line at startup.
2012-07-20 02:41:37 +01:00
Marcus Whybrow
c46db621e0 Stopped loading all config files all the time.
Now server confs are only loaded when a command needs it.
2012-07-18 07:42:26 +01:00
Marcus Whybrow
7ac5827948 Found another function to remove subshell from. 2012-07-18 05:43:23 +01:00
Marcus Whybrow
7bbca19dbc Removed subshells where possible (speed increase.)
Can only do this for my own functions. So not much of a change really.
2012-07-18 05:36:31 +01:00
Marcus Whybrow
5f539d5dbf Improved comments and MSM script layout.
Added introductory comments for MSM and bash completion files.
2012-07-18 04:31:10 +01:00
Marcus Whybrow
2554b67d52 Added /etc/profile.d/msm.sh support. 2012-07-18 04:30:31 +01:00
Marcus Whybrow
b8d2fc3e4a Bash completion now loads settings via MSM script.
The crux of the matter is this: If a setting was omitted in
/etc/msm.conf bash completion would fail requiring it to be there.
However MSM would not complain as it had a default value to use. Bash
completion can now access this same default value.
2012-07-18 04:08:12 +01:00
Marcus Whybrow
7ab754b980 Bumped version to 0.6.4. 2012-07-17 23:40:39 +01:00
Marcus Whybrow
914cc03cae Closes #25. Improved server starting output.
Now issues a message when the jar file is not found. Also prints out a
dot for each new log line found when starting. This makes it easy to
spot a server which is hanging.
2012-07-17 23:36:32 +01:00
Marcus Whybrow
b795b9b887 Fixed bug preventing say command from accepting only 1 argument.
Had to accept two or more arguments due to a regex mistake.
2012-07-17 23:34:09 +01:00
Marcus Whybrow
4fc519cb11 Bumped version to 0.6.3. 2012-07-15 18:32:18 +01:00
Marcus Whybrow
b280bebf37 Added active/inactive and running/stopped statuses to the server list command.
Thanks to the suggestion from "oldman,j" via MSM's UserVoice.
2012-07-15 18:29:04 +01:00
Marcus Whybrow
1d38b80eb6 Bumped version to 0.6.2. 2012-07-15 17:27:06 +01:00
Marcus Whybrow
b05d3a3db0 Fixes #49. Active file is now created when starting a server. 2012-07-15 17:23:38 +01:00
Marcus Whybrow
036a389055 Bumped version to 0.6.1. 2012-07-13 21:50:52 +01:00
Marcus Whybrow
0715fc47ec Bumped version to 0.6.0. 2012-07-13 20:21:23 +01:00
Marcus Whybrow
02d415beaa Removed debug statement. 2012-07-13 20:09:32 +01:00
Marcus Whybrow
1b874838cf Refactored setting registration. Allows for default values. Added msm config command.
Settings are now registered using the register_setting and
register_server_setting functions. Settings registered via the first
function can be overridden in /etc/msm.conf, and settings registered
via the second function may also be overridden in server.properties.

Additionally, global variables are now better protected from confusion
with stronger namespacing.

Several settings have changed there names, these can be seen in the
diff for `msm.conf`. The same name changes also take effect in all
`server.properties files.

`msm <server> config` now displays a list of all setting when arguments
are omitted.

`msm config` is a new command which lists all setting values.
2012-07-13 19:56:57 +01:00
Marcus Whybrow
b4f42d01e9 Prevented inactive worlds from being backed up. 2012-07-13 19:45:33 +01:00
Marcus Whybrow
da468788d0 Bumped version to 0.5.2. 2012-07-13 16:54:11 +01:00
Marcus Whybrow
98bb17999d Fixes #47. Can now put any world (not just first) into ram. 2012-07-13 16:51:38 +01:00
Marcus Whybrow
f94c13dcf0 Bumped version to 0.5.1. 2012-07-11 07:44:20 +01:00
Marcus Whybrow
26d34e71ea Added help text for the server config command. 2012-07-11 07:42:45 +01:00
Marcus Whybrow
58abbad116 Bumped version to 0.5.0. Fixes #44. 2012-07-11 07:34:48 +01:00
Marcus Whybrow
110e56ca20 config command always goes ahead, but reminds user to restart if server is running. 2012-07-11 07:27:55 +01:00
Marcus Whybrow
10c994fc59 Merge remote-tracking branch 'cameroncros/master'
Conflicts:
	init/msm
2012-07-11 07:07:08 +01:00
Cameron
ddbc46927c Changed it so that the server must be shut down by the user before config changes and manually restarted afterwards 2012-07-11 15:33:48 +10:00
Cameron
3f8c3cc277 Added ability to modify the server.properties file as well as appropriate tab completion 2012-07-11 14:18:38 +10:00
Marcus Whybrow
99f207813a Bumped version to 0.4.3. 2012-07-10 02:21:48 +01:00
Marcus Whybrow
f120290aae Allows quotations around server.properties settings. 2012-07-10 02:19:17 +01:00
Marcus Whybrow
5802a40d1e worldstorage folder now created by new server command.
Also creates a "readme.txt" file which says "MSM requires all your
worlds be moved into this directory."
2012-07-10 02:18:50 +01:00
Marcus Whybrow
f5c6ade219 Bumped version to 0.4.2. 2012-07-10 01:42:47 +01:00
Marcus Whybrow
6fead1d3d2 Fixed ability to specify jar file name in msm <server> jar
An incorrect level of validation was enforced for the file name which
prevented dots. It now accepts anything found.
2012-07-10 01:41:06 +01:00
Marcus Whybrow
4dce81f3e8 Bumped version to 0.4.1.
Fixes #37. Fixes #39.
2012-07-05 14:12:55 +01:00
Marcus Whybrow
d4892045d3 Simplified connected players code.
Removed the ability to display a "No players are connected" message, as
support is currently not complete.
2012-07-05 14:05:11 +01:00
Marcus Whybrow
51222fbf26 Merge pull request #40 from jives/master
Fixed wrong user name variable in server_set_jar()
2012-07-05 05:42:03 -07:00
T. Kerschbaum
cde64e8301 Fixes https://github.com/marcuswhybrow/minecraft-server-manager/issues/39 2012-07-05 09:36:36 +03:00
Keeley Hoek
4602231c45 Fixed hang on command_stop(). 2012-07-05 11:58:32 +10:00
Marcus Whybrow
eb1d9a2efa Bumped version to 0.4.0.
Closes #34.
2012-07-03 20:11:50 +01:00
Marcus Whybrow
d6edd9c677 Added xp command to help text. 2012-07-03 20:07:43 +01:00
Marcus Whybrow
6ed7ae2e20 Added the server xp command.
Also fixed command registration to match input against commands with
"<strings>" as an argument.
2012-07-03 20:04:40 +01:00
Marcus Whybrow
f6ad792d47 Fixed matching commands which contain quoted arguments. 2012-07-03 19:21:37 +01:00
Marcus Whybrow
4689fdcb2c Added the server give command. 2012-07-03 18:18:23 +01:00
Marcus Whybrow
c9ef119692 Bumped version to 0.3.4. 2012-07-03 18:16:47 +01:00
Marcus Whybrow
77d1c08002 Fixed the game mode, cmd and cmdlog commands.
They were not passed the correct arguments to function correctly.
2012-07-03 12:18:02 +01:00
Marcus Whybrow
63a129a8fb Bumped version to 0.3.3.
Fixes #33.
2012-06-28 18:25:21 +01:00
Marcus Whybrow
cc81cc2c1d Removed log line truncation, as invisible characters can not be assumed.
The control characters "^[[m" do not appear at the end of all lines,
and indeed do not appear at all for some servers. Truncation in all
cases is therefor incorrect.

These characters–I suspect–control the colour of terminal text, and in
the observed cases–I think–return it to the colour white. This commit
no longer truncates them.
2012-06-28 18:19:41 +01:00
Marcus Whybrow
e661983e88 Fixed some case errors in function names. 2012-06-28 15:47:41 +01:00
Marcus Whybrow
fcc06ea9d8 Bumped version to 0.3.2. 2012-06-28 12:02:44 +01:00
Marcus Whybrow
3d9303d269 Removes a debug statement. Fixes #32. 2012-06-28 12:01:03 +01:00
Marcus Whybrow
609b0e73e5 Bumped to version 0.3.1. 2012-06-27 19:01:24 +01:00
Marcus Whybrow
859d415bc9 Stopped requiring DEFAULT_SERVER_CONF in settings. 2012-06-27 18:52:11 +01:00
Marcus Whybrow
aaa4438544 Bumped version to 0.3.0.
Closes #22.
2012-06-27 18:14:58 +01:00
Marcus Whybrow
36f91805be Individual server settings are now read from "server.properties".
They were expected in a "server.conf" file in the server directory.
2012-06-27 18:10:45 +01:00
Marcus Whybrow
ec24a53519 Bumped version to 0.2.16. 2012-06-27 18:08:57 +01:00
Marcus Whybrow
7286dbd334 Insisted that the server should be stopped, when moving worlds into ram. 2012-06-27 17:04:06 +01:00
Marcus Whybrow
100a646a8e Closes #21, by capitalising all global variables. 2012-06-27 16:56:37 +01:00
Marcus Whybrow
092dd0f63f Bumped version to 0.2.15. 2012-06-25 15:56:25 +01:00
Marcus Whybrow
229d0fc67d Fixes #19. Centralises removing log new line characters. 2012-06-25 15:47:59 +01:00
Marcus Whybrow
b67e470543 Bumped to version 0.2.14. 2012-06-25 15:23:02 +01:00
Marcus Whybrow
9b8a1dd21d Fixes #20. By implementing checks before reading server files. 2012-06-25 15:18:08 +01:00
Marcus Whybrow
996e67b340 Bumped to version 0.2.13. 2012-06-25 14:40:26 +01:00
Marcus Whybrow
d9cdcaff6e Fixed the restart and operator remove, and time set commands. 2012-06-25 14:35:51 +01:00
Marcus Whybrow
0f8f200328 Bumped version 0.2.12. 2012-06-25 14:03:51 +01:00
Marcus Whybrow
93f255ba63 Fixed server stop command. 2012-06-25 14:01:48 +01:00
Marcus Whybrow
d363281057 Bumped version to 0.2.11. 2012-06-25 13:04:36 +01:00
Marcus Whybrow
3e84582d5d Replaced more trouble substring lines.
Got the last of the negative indexed substrings, which caused problems
on some systems. Replaced with a more robust system.
2012-06-25 13:00:51 +01:00
Marcus Whybrow
472adc586b Bumped version to 0.2.10 Beta. 2012-06-20 08:30:51 +01:00
Marcus Whybrow
be35182993 Fixes #28. Corrected spelling mistake preventing usage of the jar group delete command. 2012-06-20 08:27:18 +01:00
Marcus Whybrow
c44c6c7645 Fixed spelling mistake in help text. 2012-06-18 11:12:51 +01:00
Marcus Whybrow
5cde122d1f Bumped version to 0.2.9. 2012-06-18 10:22:58 +01:00
Marcus Whybrow
a08b439580 Fixed #23! Replaced substring with more robust approach. 2012-06-18 10:15:28 +01:00
Marcus Whybrow
57f4af9d29 Bumped to version 0.2.8. 2012-06-18 02:00:42 +01:00
Marcus Whybrow
2429752c68 Improved command registration to deal with erroneous regexes. 2012-06-18 01:53:35 +01:00
Marcus Whybrow
0f2f9b6a7f Bumped version to 0.2.7 2012-06-17 23:00:06 +01:00
Marcus Whybrow
dc2eb43af5 Merged refactoring into master. 2012-06-17 22:52:35 +01:00
Marcus Whybrow
9722741358 Fixed failure when listing no jar groups. 2012-06-17 22:42:30 +01:00
Marcus Whybrow
1f4afb2368 Updated version command to display the correct version. 2012-06-17 22:26:54 +02:00
Marcus Whybrow
4f51ee8446 Prevented errors when listing no jar groups. 2012-06-12 03:16:41 +01:00
Marcus Whybrow
6ba90f44ed Prevented automatic download of jar group files when created 2012-06-12 03:15:56 +01:00
Marcus Whybrow
17221b3aa4 Improved jargroup_list loop code to better handle spaces. 2012-06-12 02:14:15 +01:00
Marcus Whybrow
c932bab672 Finished refactoring commands into a registration type system. 2012-06-12 02:02:20 +01:00
Marcus Whybrow
1a5a192f71 WIP commit on refactoring command registration.
Removes the repetitive and gigantic case statement, and adds a
register_command function. This function generates a regex for matching
that command and a handler function to call.

The entry point into the script now matches the user input against a
regex and calls the handler function.
2012-06-11 19:25:31 +01:00
Marcus Whybrow
a4fb3800e8 Fixes #17. Typo preventing server level override of the CONFIRM_SAVE_ALL and CONFIRM_START settings. 2012-06-11 19:18:37 +01:00
Marcus Whybrow
9447124b58 Added support for "all" server name. Fixes #16.
Using "all" executes a command for all servers.
2012-06-07 14:22:27 +01:00
Marcus Whybrow
3078840d8f Added specific helpful error messages for commands. Closes #10. 2012-06-06 03:12:08 +01:00
Marcus Whybrow
93ba2c12f4 Fixed a bug where tail processes would not die. 2012-06-05 23:18:40 +01:00
Marcus Whybrow
a7aee94e63 Upgraded version to 0.2.5 Beta 2012-06-05 22:53:06 +01:00
Marcus Whybrow
e2e8aa5492 Fixed a bug where the wrong error code was returned.
When specifying a server name which did not exist the NAME_NOT_FOUND
error code was suppressed.
2012-06-05 22:39:50 +01:00
Marcus Whybrow
67e73f2b4e Added helper functions which set variables for script tests. 2012-06-05 21:08:23 +01:00
Marcus Whybrow
c79efe0abd Added explanatory exit codes to the script.
These codes are used by `test.sh` to better analyse whether an action
was successful or not.
2012-06-05 19:40:32 +01:00
Marcus Whybrow
4addb6dd9a Improved server creation to not require the "minecraft" jar group to be present. 2012-06-05 19:39:22 +01:00
Marcus Whybrow
5c2965cba7 Changed a directory test to look specifically for a directory. 2012-06-05 01:31:49 +01:00
Marcus Whybrow
e2d37a3c1c Fixed a bug which prevented valid server names containing a reserved world. 2012-06-05 00:50:01 +01:00
Marcus Whybrow
738c2b9e87 Prevented error when no servers have been created. 2012-06-04 21:40:33 +01:00
Marcus Whybrow
5e852c42ec Allowed CONF to be overwritten by environment variable "MSM_CONF". 2012-06-04 21:07:29 +01:00
Marcus Whybrow
edae00b103 Added double quotations around all variables which may contain spaces. Fixes #14.
Thanks to @Jonek01 for spotting this was causing a problem when
starting a server with a world name containing a space.
2012-06-04 17:37:56 +01:00
Marcus Whybrow
bfe7c101f0 Updated version and change log to "0.2.4". 2012-06-03 13:57:55 +01:00
Marcus Whybrow
be283e91f6 Running servers can no longer be renamed. Fixes #11. 2012-06-03 13:55:11 +01:00