He ignored court orders and warnings to change his behaviour