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
|
fi
|
||||||
;;
|
;;
|
||||||
list)
|
list)
|
||||||
if server_is_running $id; then
|
local players=$(cat ${server_whitelist[$id]})
|
||||||
local players=$(cat ${server_whitelist[$id]})
|
|
||||||
|
|
||||||
if [ -z "$players" ]; then
|
if [ -z "$players" ]; then
|
||||||
echo "No players are whitelisted."
|
echo "No players are whitelisted."
|
||||||
else
|
|
||||||
echo "$players"
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
echo "Server \"${server_name[$id]}\" is not running."
|
echo "$players"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@ -1833,30 +1829,26 @@ main() {
|
|||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
list)
|
list)
|
||||||
if server_is_running $id; then
|
local players=$(cat ${server_banned_players[$id]})
|
||||||
local players=$(cat ${server_banned_players[$id]})
|
|
||||||
|
local ips=$(cat ${server_banned_ips[$id]})
|
||||||
local ips=$(cat ${server_banned_ips[$id]})
|
|
||||||
|
|
||||||
if [[ -z "$players" && -z "$ips" ]]; then
|
if [[ -z "$players" && -z "$ips" ]]; then
|
||||||
echo "The blacklist is empty."
|
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
|
|
||||||
else
|
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
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
Loading…
Reference in New Issue
Block a user