mirror of
https://github.com/msmhq/msm.git
synced 2024-08-30 18:12:35 +00:00
Removed requiring the server be on to list the whitelist or blacklist.
This commit is contained in:
parent
24b5a9644b
commit
8c63597af5
52
msm
52
msm
@ -1735,16 +1735,12 @@ main() {
|
||||
fi
|
||||
;;
|
||||
list)
|
||||
if server_is_running $id; then
|
||||
local players=$(cat ${server_whitelist[$id]})
|
||||
local players=$(cat ${server_whitelist[$id]})
|
||||
|
||||
if [ -z "$players" ]; then
|
||||
echo "No players are whitelisted."
|
||||
else
|
||||
echo "$players"
|
||||
fi
|
||||
if [ -z "$players" ]; then
|
||||
echo "No players are whitelisted."
|
||||
else
|
||||
echo "Server \"${server_name[$id]}\" is not running."
|
||||
echo "$players"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
@ -1833,30 +1829,26 @@ main() {
|
||||
esac
|
||||
;;
|
||||
list)
|
||||
if server_is_running $id; then
|
||||
local players=$(cat ${server_banned_players[$id]})
|
||||
|
||||
local ips=$(cat ${server_banned_ips[$id]})
|
||||
local players=$(cat ${server_banned_players[$id]})
|
||||
|
||||
local ips=$(cat ${server_banned_ips[$id]})
|
||||
|
||||
if [[ -z "$players" && -z "$ips" ]]; then
|
||||
echo "The blacklist is empty."
|
||||
else
|
||||
if [[ ! -z "$players" ]]; then
|
||||
echo "Players:"
|
||||
for name in $players; do
|
||||
echo " $name"
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ ! -z "$ips" ]]; then
|
||||
echo "IP Addresses:"
|
||||
for address in $ips; do
|
||||
echo " $address"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
if [[ -z "$players" && -z "$ips" ]]; then
|
||||
echo "The blacklist is empty."
|
||||
else
|
||||
echo "Server \"${server_name[$id]}\" is not running."
|
||||
if [[ ! -z "$players" ]]; then
|
||||
echo "Players:"
|
||||
for name in $players; do
|
||||
echo " $name"
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ ! -z "$ips" ]]; then
|
||||
echo "IP Addresses:"
|
||||
for address in $ips; do
|
||||
echo " $address"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
|
Loading…
Reference in New Issue
Block a user