mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-06 03:59:31 +01:00
pbot-vm: simplify network
script slightly
This commit is contained in:
parent
111f3bd2e7
commit
e4cb6ceff6
@ -36,15 +36,6 @@ DisableNetwork() {
|
||||
}
|
||||
|
||||
Main() {
|
||||
case $1 in
|
||||
on|off) ;;
|
||||
*)
|
||||
echo "Invalid command \`$1\`; usage: $Usage"
|
||||
exit 1 ;;
|
||||
esac
|
||||
|
||||
Toggle="$1"
|
||||
|
||||
case $2 in
|
||||
iptables|ipt)
|
||||
Mode="iptables" ;;
|
||||
@ -57,13 +48,16 @@ Main() {
|
||||
exit 1 ;;
|
||||
esac
|
||||
|
||||
case $Toggle in
|
||||
"on")
|
||||
case $1 in
|
||||
on)
|
||||
echo "Enabling networking with $Mode"
|
||||
EnableNetwork "$Mode" ;;
|
||||
"off")
|
||||
off)
|
||||
echo "Disabling networking with $Mode"
|
||||
DisableNetwork "$Mode" ;;
|
||||
*)
|
||||
echo "Invalid command \`$1\`; usage: $Usage"
|
||||
exit 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ use PBot::Imports;
|
||||
# These are set by the /misc/update_version script
|
||||
use constant {
|
||||
BUILD_NAME => "PBot",
|
||||
BUILD_REVISION => 4748,
|
||||
BUILD_REVISION => 4749,
|
||||
BUILD_DATE => "2024-04-12",
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user