diff options
Diffstat (limited to 'global-functions')
-rw-r--r-- | global-functions | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/global-functions b/global-functions index 30512f6..e6b6527 100644 --- a/global-functions +++ b/global-functions @@ -310,7 +310,7 @@ } :local Return ""; - :local Chars "^.[]\$()|*+\?{}\\"; + :local Chars ("^.[]\$()|*+\?{}\\"); :for I from=0 to=([ :len $Input ] - 1) do={ :local Char [ :pick $Input $I ]; @@ -503,7 +503,7 @@ } :local Log ($Name . ": " . $Message); - :if ($Severity ~ "^(debug|error|info)\$") do={ + :if ($Severity ~ ("^(debug|error|info)\$")) do={ :if ($Severity = "debug") do={ :log debug $Log; } :if ($Severity = "error") do={ :log error $Log; } :if ($Severity = "info" ) do={ :log info $Log; } @@ -588,7 +588,7 @@ attach=($Notification->"attach"); remove-attach=($Notification->"remove-attach") }; :if ([ :len [ / system scheduler find where name="FlushEmailQueue" ] ] = 0) do={ / system scheduler add name=FlushEmailQueue interval=1s start-time=startup \ - on-event=":global FlushEmailQueue; \$FlushEmailQueue;"; + on-event=(":global FlushEmailQueue; \$FlushEmailQueue;"); } } @@ -666,7 +666,7 @@ :if ([ $VersionToNum $Required ] > [ $VersionToNum [ / system package update get installed-version ] ]) do={ :if ($Warn = true) do={ - $LogPrintExit2 warning $0 ("This " . [ $IfThenElse ([ :pick $Caller 0 ] = "\$") "function" "script" ] . \ + $LogPrintExit2 warning $0 ("This " . [ $IfThenElse ([ :pick $Caller 0 ] = ("\$")) "function" "script" ] . \ " '" . $Caller . "' (at least specific functionality) requires RouterOS " . $Required . ". Please update!") false; } :return false; @@ -782,7 +782,7 @@ :if ($ScriptVal->"name" = "global-config") do={ :set ReloadGlobalConfig true; } - :if ($ScriptVal->"name" ~ "^global-functions(\$|\\.d/.)") do={ + :if ($ScriptVal->"name" ~ ("^global-functions(\$|\\.d/.)")) do={ :set ReloadGlobalFunctions true; } } else={ @@ -1183,7 +1183,7 @@ } :local Return ""; - :local Chars "\n\r !\"#\$%&'()*+,:;<=>\?@[\\]^`{|}~"; + :local Chars ("\n\r !\"#\$%&'()*+,:;<=>\?@[\\]^`{|}~"); :local Subs { "%0A"; "%0D"; "%20"; "%21"; "%22"; "%23"; "%24"; "%25"; "%26"; "%27"; "%28"; "%29"; "%2A"; "%2B"; "%2C"; "%3A"; "%3B"; "%3C"; "%3D"; "%3E"; "%3F"; "%40"; "%5B"; "%5C"; "%5D"; "%5E"; "%60"; "%7B"; "%7C"; "%7D"; "%7E" }; |