Sorry, change
Code:
did -a $dname 1 $hget(cspam,%a).item
to
Code:
did -a $dname 1 $hget(cspam,%a).data


That should be the only change you need.