summaryrefslogtreecommitdiff
path: root/localkannel-dispatch
diff options
context:
space:
mode:
Diffstat (limited to 'localkannel-dispatch')
-rwxr-xr-xlocalkannel-dispatch14
1 files changed, 3 insertions, 11 deletions
diff --git a/localkannel-dispatch b/localkannel-dispatch
index ac8ec78..cacc28d 100755
--- a/localkannel-dispatch
+++ b/localkannel-dispatch
@@ -230,23 +230,15 @@ and start thread \"$realcmd\" on behalf of PHONE."
targetphone="$(echo "$1" | perl -pe 's/^@//;' -e 's/^([^+])/+39\1/')"; shift
# Sanity check + set sender number
- info1from=$(lastservicephone "$info1phone")
- [ -n "$info1from" ] || exit1 "refusing to redirect: unknown info phone number \"$info1phone\"."
- info2from=$(lastservicephone "$info2phone")
- [ -n "$info2from" ] || exit1 "refusing to redirect: unknown info phone number \"$info2phone\"."
- if [ -n "$info3phone" ]; then
- info3from=$(lastservicephone "$info3phone")
- [ -n "$info3from" ] || exit1 "refusing to redirect: unknown info phone number \"$info3phone\"."
- fi
targetfrom=$(lastservicephone "$targetphone")
[ -n "$targetfrom" ] || exit1 "refusing to redirect: unknown target phone number \"$targetphone\"."
# send responses (threaded one last, to work in debug mode)
if [ -n "$*" ]; then
- SMS_PHONE="$info1from" $sbindir/localsendsms "$info1phone" "[$cmd] $@"
- SMS_PHONE="$info2from" $sbindir/localsendsms "$info2phone" "[$cmd] $@"
+ $sbindir/localsendsms "$info1phone" "[$cmd] $@"
+ $sbindir/localsendsms "$info2phone" "[$cmd] $@"
if [ -n "$info3phone" ]; then
- SMS_PHONE="$info3from" $sbindir/localsendsms "$info2phone" "[$cmd] $@"
+ $sbindir/localsendsms "$info2phone" "[$cmd] $@"
fi
fi
$sbindir/localmarkdown2sms "$to" "[info] \"$cmd\" thread started for \"$targetphone\", and trailing message forwarded to subscribers."