[CHAT] Moved private message handling to a procedure.