Code:
 on *:text:*:#chanA:{
if ($nick == <nick>) && ($strip($1-) == $strip($1-,b)) {
.msg #chanB $1-
}
}
 


Untested