From 075a9bd6c43e08efee73eb6e1ec5b0ea0391fef2 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 11 Jul 2024 23:13:50 +0200 Subject: mod/ipcalc: use :tocrlf --- mod/ipcalc.rsc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'mod') 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 # 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 -- cgit v1.2.3-70-g09d2