It would be defined in the contract, but usually the contractors never own the copyright to code written for other people.
Anyway, I agree with the other comments that this is unprofessional and immature. We have a civil court system to deal with these kind of issues.