From afd7d900723a1471e117d6735297fb8d31b7f57a Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Mon, 12 Jul 2010 17:48:14 +0200 Subject: 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. --- localkannel-dispatch | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'localkannel-dispatch') 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." -- cgit v1.2.3