ok i combined some ideas from this thread and heres the result which seems to work;

on ^*:text:*hatten*:#: {
echo -tl # $+(<,$nick,>) $replace($1-,hatten, 4hatten)
window -g2 # | haltdef
}