mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 10:04:19 +02:00
sms-action: switch to $LogPrint
This commit is contained in:
parent
88d4c0aff8
commit
5a487d15c2
|
@ -16,13 +16,14 @@
|
||||||
|
|
||||||
:global SmsAction;
|
:global SmsAction;
|
||||||
|
|
||||||
:global LogPrintExit2;
|
:global LogPrint;
|
||||||
:global ValidateSyntax;
|
:global ValidateSyntax;
|
||||||
|
|
||||||
:local Action $action;
|
:local Action $action;
|
||||||
|
|
||||||
:if ([ :typeof $Action ] = "nothing") do={
|
:if ([ :typeof $Action ] = "nothing") do={
|
||||||
$LogPrintExit2 error $ScriptName ("This script is supposed to run from SMS hook with action=...") true;
|
$LogPrint error $ScriptName ("This script is supposed to run from SMS hook with action=...");
|
||||||
|
:error false;
|
||||||
}
|
}
|
||||||
|
|
||||||
:local Code ($SmsAction->$Action);
|
:local Code ($SmsAction->$Action);
|
||||||
|
@ -31,6 +32,6 @@
|
||||||
:delay 1s;
|
:delay 1s;
|
||||||
[ :parse $Code ];
|
[ :parse $Code ];
|
||||||
} else={
|
} else={
|
||||||
$LogPrintExit2 warning $ScriptName ("The code for action '" . $Action . "' failed syntax validation!") false;
|
$LogPrint warning $ScriptName ("The code for action '" . $Action . "' failed syntax validation!");
|
||||||
}
|
}
|
||||||
} on-error={ }
|
} on-error={ }
|
||||||
|
|
Loading…
Reference in a new issue