Stuff
public text v1 · immutable%pre-receive sms
event msg
proto all
status all
options stdin nowait
%exec
#!/bin/bash
MSG=`cat`
if echo "${MSG}" | egrep "^(sms[ ]*)|(sms$)" > /dev/null; then
MSG="$(echo "${MSG}" | sed -e "s/^sms //" -e "s/^sms$//")"
NICK="$(head -n 1 ${CONTACT_INFODIR}/info | tail -n 1)"
echo "${NICK}"; echo "${MSG}" | ~/bin/sms.sh > /dev/null
fi