mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-16 04:54:28 +02:00
mod/ipcalc: use :tocrlf
This commit is contained in:
parent
2b758b83fd
commit
075a9bd6c4
2 changed files with 4 additions and 5 deletions
|
@ -4,7 +4,7 @@ IP address calculation
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2020-2024 Christian Hesse <mail@eworm.de>
|
||||
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.13
|
||||
# requires RouterOS, version=7.14
|
||||
#
|
||||
# ip address calculation
|
||||
# https://git.eworm.de/cgit/routeros-scripts/about/doc/mod/ipcalc.md
|
||||
|
@ -17,17 +17,16 @@
|
|||
|
||||
:global FormatLine;
|
||||
:global IPCalcReturn;
|
||||
:global PrettyPrint;
|
||||
|
||||
:local Values [ $IPCalcReturn $1 ];
|
||||
|
||||
$PrettyPrint ( \
|
||||
:put [ :tocrlf ( \
|
||||
[ $FormatLine "Address" ($Values->"address") ] . "\n" . \
|
||||
[ $FormatLine "Netmask" ($Values->"netmask") ] . "\n" . \
|
||||
[ $FormatLine "Network" ($Values->"network") ] . "\n" . \
|
||||
[ $FormatLine "HostMin" ($Values->"hostmin") ] . "\n" . \
|
||||
[ $FormatLine "HostMax" ($Values->"hostmax") ] . "\n" . \
|
||||
[ $FormatLine "Broadcast" ($Values->"broadcast") ]);
|
||||
[ $FormatLine "Broadcast" ($Values->"broadcast") ]) ];
|
||||
}
|
||||
|
||||
# calculate and return netmask, network, min host, max host and broadcast
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue