When using "ansi"="off", the escape sequence \033[K is still present and tools that input from lgsm will get thoses bytes.
This commit removes that.
One side-effect if two prints are done without a line feed and the second is shorter than the first, then some unwanted character could remain.
```
echo -en "${creeol}foo/bar"
echo -en "${creeol}foo"
```
* before : prints "foo"
* after: prints "foo/bar"
* refactor: simplify sleep time functions
The `fn_sleep_time` function has been refactored to remove unnecessary conditions and set a default sleep time of 0.5 seconds. Additionally, four new functions (`fn_sleep_time_1`, `fn_sleep_time_5`, `fn_sleep_time_10`) have been added to provide different sleep times of 1, 5, and 10 seconds respectively. This improves code readability and allows for more flexibility in setting sleep times.
* change sleep to fn_sleep_time
* refactor: optimize sleep time functions
- Refactored the code to optimize the sleep time functions.
- Updated the `fn_sleep_time` function calls to `fn_sleep_time_1` in multiple files.
- Removed unnecessary sleep time calls in some files.
* refactor: simplify sleep time function call
The code changes refactor the sleep time function call in the check_deps.sh file. Instead of calling fn_sleep_time_1, it now calls fn_sleep_time. This change simplifies the code and improves readability.
* feat: add sleep time before checking session
Add a sleep time of 1 second before checking the session in the command_monitor.sh file. This allows for better synchronization and improves the accuracy of the session check.
* changes
* refactor: optimize sleep time function
The code changes refactor the sleep time function in multiple files to improve efficiency. The fn_sleep_time function is replaced with fn_sleep_time_1. This change reduces unnecessary delays during execution.
* refactor: update sleep time function names
The sleep time functions in the core_messages.sh file have been updated to use more descriptive names. The fn_sleep_time function has been renamed to fn_sleep_time_1 for clarity and consistency. This change improves code readability and maintainability.
* refactor: optimize sleep time in core_messages.sh
The commit optimizes the sleep time in the core_messages.sh file. The fn_sleep_time and fn_print_dots functions now use a shorter sleep time of 0.5 seconds instead of 1 second, resulting in faster execution.
* refactor: improve readability and consistency in code
- Refactored the log messages to use consistent capitalization and wording.
- Updated log messages in check_glibc.sh, check_permissions.sh, command_backup.sh, command_update_linuxgsm.sh, command_wipe.sh, fix_samp.sh, install_config.sh, and set_dst_config_vars() functions.
feat: add more descriptive log messages
- Added more descriptive log messages to provide clearer information about the actions being performed.
- Updated log messages in check_glibc.sh, check_permissions.sh, command_backup.sh, command_update_linuxgsm.sh, command_wipe.sh, fix_samp.sh, install_config.sh.
fix: correct spelling errors in log messages
- Corrected spelling errors in some of the log messages for better clarity.
- Updated log messages in check_glibc.sh and fix_samp.sh.
* refactor: remove unnecessary print statements
This commit refactors the code by removing unnecessary print statements in multiple files. The removed print statements were used for displaying dots and warnings, but they are not needed anymore. This improves the readability and cleanliness of the code.
* refactor: improve commit messages for code changes
- Refactored check_glibc.sh to improve readability and clarity of error messages.
- Refactored check_permissions.sh to provide more informative error messages when checking /sys permissions.
- Refactored check_system_requirements.sh to provide clearer warning message when checking RAM requirements.
- Refactored command_backup.sh to provide more descriptive messages when starting a backup.
* remove legacy code
* fix: remove \t
* fix: run check_root
check root was never running because of logic in linuxgsm.sh
* fix: update warning message for missing sudo access
The warning message for users without sudo access has been updated to provide clearer instructions. Instead of just suggesting manual installation, it now also suggests running the script as root using `./${selfname} install`. This change improves user experience and helps them resolve dependency installation issues more effectively.
* tidy
* refactor: remove unnecessary comments in default server configurations
The commit removes unnecessary comments from the default server configurations. The comments were providing instructions to edit the configuration files with care, but they are not needed and can be safely removed.
* refactor: update server names in default configuration files
- Updated the servername value in multiple default configuration files to "LinuxGSM" for consistency.
- Refactored the code to reflect the changes made.
* refactor: rename fn_script_log_fatal to fn_script_log_faail
to create more consistency with naming
* feat: improve console output formatting
- Added separator function to improve readability of console output.
- Replaced multiple instances of manual separators with the new function.
- Updated commit message to follow conventional commit standard.
* refactor: remove unnecessary fn_sleep_time calls
This commit removes the fn_sleep_time function calls that are no longer needed in multiple modules. The fn_sleep_time function was used to introduce a delay, but it is no longer necessary for the current implementation.
* better standardise random
* removed bold where not required
The send command will appear for any game servers that support sending commands within the console i.e interactive console.
Note: This is not rcon support
Co-authored-by: Daniel Gibbs <[email protected]>
Co-authored-by: DUDU54 <[email protected]>
This update is a major refactor of how LinuxGSM updates itself.
* will now use a version tag if downloading module for the first time.
* added backup repo (Bitbucket) that will be used if Github is unavailable.
* added ./gameserver and module version comparison this will allow instances to be correctly updated if there is a version mismatch.
* UI changes when modules are fetched for the first time
* added sessionname to fix broken tmux session is ./gameserver is called ./gameserver.sh
* change apt to apt-get as recommended by the apt packages when dealing with scripts.
* Revert "fix(messages): fix some messages not using newline correctly (#2772)"
This reverts commit 3bd64bbc13.
* Revert "fix(messages): fix some messages not using newline correctly (#2765)"
This reverts commit c847ecb4b6.
* added new [ START ] message
* various messages improvements made
* add mumble query
* re-ordered serverlist.csv
* gamedig refactor
* query raw update
* gamedig: changed --query_port to --port
* add query data to log
* remove UDP query as does not work.
* refactor gamedig and gsquery
* add missing Factorio rcon port
* add fn_monitor_check_queryport
* add TCP query to Factorio
* add mta query support
* MTA IP address must be set. No longer using config
* remove mumble and ts3 from bypassing check_ip
* update netstat command for Project Zomboid
* adde query port to Project Zomboid
* update query mode for samp
* Update Teeworlds query
* add Soldat to TCP query
* update ss3 port info
* add query details to Serious Sam 3
* add Terraria query port
* ts3 now uses tcp query as proper query requires permissions changes
* update ut99 query
* gsquery add gamespy1
* separate out unreal engine functions
* updated ut2k4 query
* update Teeworlds query
* update Factorio query
* change engine if to shortname
A delay timer has been added to give game servers time to boot before monitor begins query. This is useful for large game servers or that have several mods
querydelay setting has been added to _default.cfg
* added wurmserver
* debug mode does not function with Wurm: Unlimited
* gamedig does not function with Wurm: Unlimted, however gsquery does work
* fixed ansi function not using colours correctly
ansi colours fails to disable as core_messages.sh loaded before the config. ansi colours are now in a function that is called after the config has been loaded. allowing colour to only load once the config has confirmed that it is allowed.
- Modularize prompt logic into separate function (fn_prompt_yn)
- Refactor scripts to utilize fn_prompt_yn
- Enhance Y/N prompt interface for usability
* If there are backups in backup dir. Fixes#1140
* mainly improves logging #1098
* Better logging, output & compatibility #1098
* fn_check_cfgdir for Rust fixes#1141
* fn_set_config_vars is not for every game
removing some games i know don't use it
* Install config if missing fixes#1142
* Clear more logs #1137
* Putting all this into functions & prepare noprompt
* noprompt & shutdownonbackup #1098
* fix syntax & messages #1098
* messages that make more sense #1098
* New backup vars
# Backup
maxbackups="4"
maxbackupdays="30"
stoponbackup="on"
* Should fix missing cached mem #1143
* fix the fix for #1143 (close double quote)
* move -type f before -mtime
* New gameservers & features (#1158)
* Two # is now one block of settings & descriptions
* directories comments and logs naming
* dgibbs revision and root check
* update_steamcmd.sh Check is now done out of functions
* Better way to detect screen #1154 and #1156
* Backup function improvements (#1161)
* Added no of days since last backup
* Added lock file creation to logs
* Improvements up command_backup.sh
Changes to the messages displayed on screen
added trap and improved lockfile support
renamed some functions
other misc changes
* Updated Version numbers
* Two # is now one block of settings & descriptions
* directories comments and logs naming
* dgibbs revision and root check
* Backup & Layout rework
* removed duplicate updateonstart
* Fixed missing space on [ERROR ]
[ ERROR ] instead of [ERROR ]
* Error space wasn't missing
Used to fit other comment sizes, i guess
* Anonymous login is now an info
Since login variable is removed for servers that don't need steam auth, this won't show a failure anymore but a simple info and anonymous login will be used.
* update_steamcmd.sh Check is now done out of functions
* solves hanging on update if steamuser is not set
* New gameserver layout & functionalities
* Better way to detect screen
As per #1154 and #1156
* Moved to LinuxGSM-DevTools
https://github.com/GameServerManagers/LinuxGSM-DevTools/blob/master/GameServer-Template/gameserver