All pastes #256163 Raw Edit

Stuff

public text v1 · immutable
#256163 ·published 2006-11-23 20:28 UTC
rendered paste body
%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