summaryrefslogtreecommitdiff
path: root/localmarkdown2sms
diff options
context:
space:
mode:
Diffstat (limited to 'localmarkdown2sms')
-rwxr-xr-xlocalmarkdown2sms6
1 files changed, 4 insertions, 2 deletions
diff --git a/localmarkdown2sms b/localmarkdown2sms
index c18dd01..662a20c 100755
--- a/localmarkdown2sms
+++ b/localmarkdown2sms
@@ -68,6 +68,7 @@ if ($urldecode) {
@ARGV = uri_unescape(@ARGV);
}
my ($phone) = shift @ARGV;
+my $inputstring = join(' ', @ARGV);
my ($key) = lc (shift @ARGV);
# strip international prefix
@@ -252,9 +253,10 @@ my $num_children = $#{ $reply{$key} } + 1; # How many children we'll create
if (0 == $num_children) {
my $err_en = "Sorry, not recognized as a keyword: Please check spelling and try again.";
my $err_it = "Spiacente, non riconosco come parola chiave: Controlla l'ortografia e riprova.";
+ my $errmsg = "[warning] $phone requested unknown keyword \"$key\"\nFull text: $inputstring";
&sendmsg($sms_phone, $phone, "fallback message", "$key?\n$err_it\n$err_en");
- ($sms_errto1) and &sendmsg($sms_errfrom, $sms_errto1, "warning", "[warning] $phone wrote: $key");
- ($sms_errto2) and &sendmsg($sms_errfrom, $sms_errto2, "warning", "[warning] $phone wrote: $key");
+ ($sms_errto1) and &sendmsg($sms_errfrom, $sms_errto1, "warning", $errmsg);
+ ($sms_errto2) and &sendmsg($sms_errfrom, $sms_errto2, "warning", $errmsg);
exit;
}