diff options
author | Christian Hesse <mail@eworm.de> | 2024-07-11 23:13:50 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-07-16 13:50:22 +0200 |
commit | 075a9bd6c43e08efee73eb6e1ec5b0ea0391fef2 (patch) | |
tree | 9b83cfbd502996143bd25d3c869fabf242aea608 /mod | |
parent | 2b758b83fd47ca765dd8c5ed15ff3d001d60a6fc (diff) |
mod/ipcalc: use :tocrlf
Diffstat (limited to 'mod')
-rw-r--r-- | mod/ipcalc.rsc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/mod/ipcalc.rsc b/mod/ipcalc.rsc index 128ca54..003bdc3 100644 --- a/mod/ipcalc.rsc +++ b/mod/ipcalc.rsc @@ -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 |