Try this
Try this, I haven't tested but it's pretty basic and should work:
Modify class.ticket.php
diff class.ticket.orig class.ticket.php
1412a1413,1417
> $chksql = 'SELECT staff_id FROM '.TICKET_TABLE.' WHERE ticket_id='.db_input($vars);
> if(db_result(db_query($chksql))==0){
> $this->setStaffId($vars);
> }
>
It should check if the ticket is unclaimed and if it is, set the replying staff member to the owner. Should hopefully work through both web interface and through my earlier "reply to email" hack.