diff options
author | root <root@hello.jones.dk> | 2010-06-06 04:36:27 +0200 |
---|---|---|
committer | root <root@hello.jones.dk> | 2010-06-06 04:36:27 +0200 |
commit | 2915e2a7d90483216a7caf32a715a2ffe0200c1e (patch) | |
tree | 3a37e5c721badeb79958eaee77648663058519e0 /localmarkdown2sms | |
parent | b60961d6f2805769f36abf1588646c501fe81309 (diff) |
Respect stripprefix in localmarkdown2sms localsendsms .
Diffstat (limited to 'localmarkdown2sms')
-rwxr-xr-x | localmarkdown2sms | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/localmarkdown2sms b/localmarkdown2sms index 47a06f3..1767788 100755 --- a/localmarkdown2sms +++ b/localmarkdown2sms @@ -49,6 +49,7 @@ my $sms_concat = $ENV{SMS_CONCAT}; my $sms_dlr_mask = $ENV{SMS_DLR_MASK}; my $sms_dlr_url = $ENV{SMS_DLR_URL}; my $sms_validity = $ENV{SMS_VALIDITY}; +my $stripprefix = $ENV{stripprefix}; my $path = $ENV{mdpath}; my (%file, %delay, %reply); @@ -62,7 +63,8 @@ my ($key) = lc (shift @ARGV); # strip international prefix # (prefix is optional some places and illegal at other places - forgot where) -$phone =~ s/\+/ /g; +$phone =~ s/^\+//g if ($stripprefix); +$sms_phone =~ s/^\+//g if ($stripprefix); # strip non-word chars from keyword (and use only first chunk of word chars) $key =~ s/.*?(\w+).*?/$1/; |