[9358] in athena10
Re: [Debathena] #938: zwrite should whine at you if you're not
daemon@ATHENA.MIT.EDU (Debathena Trac)
Thu Jul 5 10:20:53 2012
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
From: "Debathena Trac" <debathena@MIT.EDU>
Cc: debathena@MIT.EDU
To: jdreed@MIT.EDU, kchen@MIT.EDU, jweiss@MIT.EDU
Date: Thu, 05 Jul 2012 14:20:48 -0000
Reply-To:
Message-ID: <057.b8985eb2ced86313f50f14517500fd28@mit.edu>
In-Reply-To: <042.67f44e5e0bd46e60591063a3e681b1f3@mit.edu>
Content-Transfer-Encoding: 8bit
#938: zwrite should whine at you if you're not subbed
-------------------------+-----------------------------
Reporter: jdreed | Owner: jdreed
Type: enhancement | Status: accepted
Priority: normal | Milestone: Precise Beta
Component: -- | Resolution:
Keywords: | Upstream bug:
-------------------------+-----------------------------
Changes (by jdreed):
* owner: => jdreed
* status: new => accepted
Comment:
I suggest shipping the following as part of zephyr-config and diverting
zwrite. This will catch 99% of common errors, and will not trip up most
bots, since I suspect bots pass one of -q, -n, or -d:
{{{
#!/bin/bash
class=
instance=
quiet=0
while getopts ":c:i:qn" opt; do
case $opt in
c)
class=$OPTARG
;;
i)
instance=$OPTARG
;;
q|n|d)
quiet=1
;;
esac
done
[ -z "$class" ] && [ -n "$instance" ] && class=message
[ -n "$class" ] && [ -z "$instance" ] && instance='\*'
if [ $quiet -eq 0 ]; then
if ! zctl ret 2>/dev/null | grep -q "^Class $class Instance
$instance"; then
echo "--> You don't appear to be subscribed to class $class,
instance ${instance#\\}." >&2
fi
fi
exec zwrite.debathena-orig "$@"
}}}
--
Ticket URL: <http://athena10.mit.edu/trac/ticket/938#comment:5>
Debathena <http://debathena.mit.edu>
MIT Debathena Project