summaryrefslogtreecommitdiff
path: root/localkannel-dispatch
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2010-07-12 17:48:14 +0200
committerJonas Smedegaard <dr@jones.dk>2010-07-12 17:48:14 +0200
commitafd7d900723a1471e117d6735297fb8d31b7f57a (patch)
treead614f3d583da763f3c33240aefec4b6159a4e4e /localkannel-dispatch
parent18ba7a3006456d228193509390fb4980dfd08d6c (diff)
Adjust /go command change sender only for target (not subscribers who might not have used system themselves and is hardcoded so should be verified in other ways) in localkannel-dispatch.
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."