aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-07-11 23:13:50 +0200
committerGravatar Christian Hesse <mail@eworm.de>2024-07-16 13:50:22 +0200
commit075a9bd6c43e08efee73eb6e1ec5b0ea0391fef2 (patch)
tree9b83cfbd502996143bd25d3c869fabf242aea608
parent2b758b83fd47ca765dd8c5ed15ff3d001d60a6fc (diff)
mod/ipcalc: use :tocrlf
-rw-r--r--doc/mod/ipcalc.md2
-rw-r--r--mod/ipcalc.rsc7
2 files changed, 4 insertions, 5 deletions
diff --git a/doc/mod/ipcalc.md b/doc/mod/ipcalc.md
index cb655bc..9f39429 100644
--- a/doc/mod/ipcalc.md
+++ b/doc/mod/ipcalc.md
@@ -4,7 +4,7 @@ IP address calculation
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
-[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.13-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
+[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.14-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
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