It is not illegal, but it is unsportmanlike behaviour...