summaryrefslogtreecommitdiff
path: root/localkannel-dispatch
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2010-07-08 11:56:44 +0200
committerJonas Smedegaard <dr@jones.dk>2010-07-08 11:56:44 +0200
commit5c2cde77e1ebc572e23902de1991bc93ec43ee66 (patch)
tree407c49dadf015b12f328fa69fc5f9cbdf7904460 /localkannel-dispatch
parent153a5f12caeffa9bcd598d6d77846dc840b8857b (diff)
rename /gone and /gonetest hacks to go and gotest in localkannel-dispatch.
Diffstat (limited to 'localkannel-dispatch')
-rwxr-xr-xlocalkannel-dispatch36
1 files changed, 18 insertions, 18 deletions
diff --git a/localkannel-dispatch b/localkannel-dispatch
index 7136826..d09a560 100755
--- a/localkannel-dispatch
+++ b/localkannel-dispatch
@@ -192,17 +192,17 @@ Respond \"pong\" and echo back any addition input."
exit 0
;;
# FIXME: generalize these ugly hacks somehow, and secure against random use
- gone)
+ go)
if [ "help" = "$1" ]; then
$sbindir/localsendsms "$to" "Usage:
-/gone PHONE MSG...
+/go PHONE MSG...
-Start thread \"gone\" on behalf of PHONE.
-Send \"[gone] MSG\" to Alessandra and Vela."
+Start thread \"go\" on behalf of PHONE.
+Send \"[go] MSG\" to Alessandra and Vela."
exit 0
fi
- [ -n "$1" ] || exit1 "phone number missing (try \"/gone help\" for usage)"
- [ -n "$2" ] || exit1 "message missing (try \"/gone help\" for usage)"
+ [ -n "$1" ] || exit1 "phone number missing (try \"/go help\" for usage)"
+ [ -n "$2" ] || exit1 "message missing (try \"/go help\" for usage)"
targetphone="$(echo "$1" | perl -pe 's/^@//;' -e 's/^([^+])/+39\1/')"; shift
info1phone="+393273009765" # Alessandra
info2phone="+393276733618" # Vela
@@ -212,22 +212,22 @@ Send \"[gone] MSG\" to Alessandra and Vela."
[ -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\"."
- SMS_PHONE="$targetfrom" $sbindir/localmarkdown2sms "$targetphone" "/gone"
- SMS_PHONE="$info1from" $sbindir/localsendsms "$info1phone" "[gone] $@"
- SMS_PHONE="$info2from" $sbindir/localsendsms "$info2phone" "[gone] $@"
+ SMS_PHONE="$targetfrom" $sbindir/localmarkdown2sms "$targetphone" "/go"
+ SMS_PHONE="$info1from" $sbindir/localsendsms "$info1phone" "[go] $@"
+ SMS_PHONE="$info2from" $sbindir/localsendsms "$info2phone" "[go] $@"
exit 0
;;
- gonetest)
+ gotest)
if [ "help" = "$1" ]; then
$sbindir/localsendsms "$from" "Usage:
-/gone PHONE MSG...
+/gotest PHONE MSG...
-Start thread \"gone\" on behalf of PHONE.
+Start thread \"go\" on behalf of PHONE.
Report MSG to Jonas, Jacob and Vera."
exit 0
fi
- [ -n "$1" ] || exit1 "phone number missing (try \"/gone help\" for usage)"
- [ -n "$2" ] || exit1 "message missing (try \"/gone help\" for usage)"
+ [ -n "$1" ] || exit1 "phone number missing (try \"/go help\" for usage)"
+ [ -n "$2" ] || exit1 "message missing (try \"/go help\" for usage)"
targetphone="$(echo "$1" | perl -pe 's/^@//;' -e 's/^([^+])/+39\1/')"; shift
info1phone="+393453915741" # Jonas
info2phone="+393453805531" # Jacob
@@ -240,10 +240,10 @@ Report MSG to Jonas, Jacob and Vera."
[ -n "$info2from" ] || exit1 "refusing to redirect: unknown info phone number \"$info2phone\"."
info3from=$(lastservicephone "$info3phone")
[ -n "$info3from" ] || exit1 "refusing to redirect: unknown info phone number \"$info3phone\"."
- SMS_PHONE="$targetfrom" $sbindir/localmarkdown2sms "$targetphone" "/gone"
- SMS_PHONE="$info1from" $sbindir/localsendsms "$info1phone" "[gone] $@"
- SMS_PHONE="$info2from" $sbindir/localsendsms "$info2phone" "[gone] $@"
- SMS_PHONE="$info3from" $sbindir/localsendsms "$info3phone" "[gone] $@"
+ SMS_PHONE="$targetfrom" $sbindir/localmarkdown2sms "$targetphone" "/go"
+ SMS_PHONE="$info1from" $sbindir/localsendsms "$info1phone" "[go] $@"
+ SMS_PHONE="$info2from" $sbindir/localsendsms "$info2phone" "[go] $@"
+ SMS_PHONE="$info3from" $sbindir/localsendsms "$info3phone" "[go] $@"
exit 0
;;
esac