Block commands under certain conditions