mirror of
https://github.com/msmhq/msm.git
synced 2024-08-30 18:12:35 +00:00
Moved LOG_REGEX variable to versioning file.
This commit is contained in:
parent
ce84d731b9
commit
c8c4788091
9
init/msm
9
init/msm
@ -57,9 +57,6 @@ follow_links "$COMPLETION"; COMPLETION="$RETURN"
|
||||
|
||||
### Config variables the user should not need/want to change
|
||||
|
||||
# The start of a regex to find a log line
|
||||
LOG_REGEX="^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} \[.*\]"
|
||||
|
||||
# Lazy allocation status
|
||||
ALLOCATED_SERVERS="false"
|
||||
ALLOCATED_WORLDS="false"
|
||||
@ -807,12 +804,13 @@ server_worlds_to_disk() {
|
||||
server_log_get_line() {
|
||||
server_property "$1" USERNAME
|
||||
server_property "$1" LOG_PATH
|
||||
server_property "$1" CONSOLE_EVENT_REGEX
|
||||
|
||||
unset RETURN
|
||||
# Make sure there is a server log to check
|
||||
as_user "${SERVER_USERNAME[$1]}" "touch ${SERVER_LOG_PATH[$1]}"
|
||||
|
||||
local regex="${LOG_REGEX} ($3)"
|
||||
local regex="${SERVER_CONSOLE_EVENT_OUTPUT_REGEX[$1]} ($3)"
|
||||
local timeout_deadline=$(( $(now) + $4 ))
|
||||
|
||||
# Read log, break if nothing is read in $4 seconds
|
||||
@ -841,11 +839,12 @@ server_log_get_line() {
|
||||
server_log_dots_for_lines() {
|
||||
server_property "$1" USERNAME
|
||||
server_property "$1" LOG_PATH
|
||||
server_property "$1" CONSOLE_EVENT_REGEX
|
||||
|
||||
# Make sure there is a server log to check
|
||||
as_user "${SERVER_USERNAME[$1]}" "touch ${SERVER_LOG_PATH[$1]}"
|
||||
|
||||
local regex="${LOG_REGEX} ($3)"
|
||||
local regex="${SERVER_CONSOLE_EVENT_OUTPUT_REGEX[$1]} ($3)"
|
||||
local timeout_deadline=$(( $(now) + $4 ))
|
||||
|
||||
# Read log, break if nothing is read in $4 seconds
|
||||
|
@ -1,5 +1,6 @@
|
||||
# MSM version file for Minecraft 1.2.0 and above
|
||||
|
||||
console_event REGEX "^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2} \[.*\]"
|
||||
console_event START:30 "Done"
|
||||
|
||||
console_command WHITELIST_ON "whitelist on"
|
||||
|
Loading…
Reference in New Issue
Block a user