aboutsummaryrefslogtreecommitdiffstats
path: root/global-functions
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-07-17 08:07:12 +0200
committerGravatar Christian Hesse <mail@eworm.de>2020-07-17 08:12:00 +0200
commit075859c8986827b21c313affa896de814e3ae763 (patch)
tree9aecdc889603e6add0a0633e66a5b4c84d933452 /global-functions
parent0e7b2d3ac735ca4922dc87671138297623ebd4bc (diff)
global-functions: introduce and use $SymbolForNotificationchange-24
Diffstat (limited to 'global-functions')
-rw-r--r--global-functions15
1 files changed, 14 insertions, 1 deletions
diff --git a/global-functions b/global-functions
index ba9142f..0eb0e4c 100644
--- a/global-functions
+++ b/global-functions
@@ -8,7 +8,7 @@
# https://git.eworm.de/cgit/routeros-scripts/about/
# expected configuration version
-:global ExpectedConfigVersion 23;
+:global ExpectedConfigVersion 24;
# global variables not to be changed by user
:global GlobalFunctionsReady false;
@@ -41,6 +41,7 @@
:global SendNotification;
:global SendTelegram;
:global SymbolByUnicodeName;
+:global SymbolForNotification;
:global TimeIsSync;
:global UrlEncode;
:global VersionToNum;
@@ -747,6 +748,18 @@
:return ($Symbols->$1);
}
+# return symbol for notification
+:set SymbolForNotification do={
+ :global NotificationsWithSymbols;
+
+ :global SymbolByUnicodeName;
+
+ :if ($NotificationsWithSymbols != true) do={
+ :return "";
+ }
+ :return ([ $SymbolByUnicodeName $1 ] . " ");
+}
+
# check if system time is sync
:set TimeIsSync do={
:if ([ / system ntp client get enabled ] = true) do={