Skip to content

Commit

Permalink
refactor: refactor info message functions in alert.sh, command_detail…
Browse files Browse the repository at this point in the history
…s.sh, command_dev_query_raw.sh, and command_postdetails.sh

- Refactored the info message functions in multiple files to have consistent naming conventions.
- Renamed fn_info_message_* functions to fn_info_messages_* for clarity and consistency.
- Updated function calls accordingly.
  • Loading branch information
dgibbs64 committed Oct 27, 2023
1 parent 75006b2 commit 3142025
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
10 changes: 5 additions & 5 deletions lgsm/modules/alert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ fn_alert_log() {
fi

{
fn_info_message_head
fn_info_message_distro
fn_info_message_server_resource
fn_info_message_gameserver_resource
fn_info_message_gameserver
fn_info_messages_head
fn_info_messages_distro
fn_info_messages_server_resource
fn_info_messages_gameserver_resource
fn_info_messages_gameserver
fn_info_logs
} | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | tee -a "${alertlog}" > /dev/null 2>&1
}
Expand Down
22 changes: 11 additions & 11 deletions lgsm/modules/command_details.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@ if [ "${querymode}" == "2" ] || [ "${querymode}" == "3" ]; then
fi
done
fi
fn_info_message_distro
fn_info_message_server_resource
fn_info_message_gameserver_resource
fn_info_message_gameserver
fn_info_message_script
fn_info_message_backup
fn_info_messages_distro
fn_info_messages_server_resource
fn_info_messages_gameserver_resource
fn_info_messages_gameserver
fn_info_messages_script
fn_info_messages_backup
# Some game servers do not have parms.
if [ "${shortname}" != "jc2" ] && [ "${shortname}" != "dst" ] && [ "${shortname}" != "pz" ] && [ "${engine}" != "renderware" ]; then
fn_info_message_commandlineparms
fn_info_messages_commandlineparms
fi
fn_info_message_ports_edit
fn_info_message_ports
fn_info_message_select_engine
fn_info_message_statusbottom
fn_info_messages_ports_edit
fn_info_messages_ports
fn_info_messages_select_engine
fn_info_messages_statusbottom

exitcode=0
core_exit.sh
2 changes: 1 addition & 1 deletion lgsm/modules/command_dev_query_raw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ fn_messages_separator
echo -e ""
echo -e "${lightgreen}SS Output${default}"
fn_messages_separator
fn_info_message_ports
fn_info_messages_ports
eval "${portcommand}"
echo -e ""
echo -e "${lightgreen}Query Port - Raw Output${default}"
Expand Down
22 changes: 11 additions & 11 deletions lgsm/modules/command_postdetails.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@ else
done
touch "${postdetailslog}" || fn_bad_postdetailslog
{
fn_info_message_distro
fn_info_message_server_resource
fn_info_message_gameserver_resource
fn_info_message_gameserver
fn_info_message_script
fn_info_message_backup
fn_info_messages_distro
fn_info_messages_server_resource
fn_info_messages_gameserver_resource
fn_info_messages_gameserver
fn_info_messages_script
fn_info_messages_backup
# Some game servers do not have parms.
if [ "${shortname}" != "jc2" ] && [ "${shortname}" != "jc3" ] && [ "${shortname}" != "dst" ] && [ "${shortname}" != "pz" ] && [ "${engine}" != "renderware" ]; then
fn_info_message_commandlineparms
fn_info_messages_commandlineparms
fi
fn_info_message_ports_edit
fn_info_message_ports
fn_info_message_select_engine
fn_info_message_statusbottom
fn_info_messages_ports_edit
fn_info_messages_ports
fn_info_messages_select_engine
fn_info_messages_statusbottom
} | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | tee -a "${postdetailslog}" > /dev/null 2>&1
fi

Expand Down

0 comments on commit 3142025

Please sign in to comment.