It only seldom happens to me, but if I get the feeling I'm not really productive I usually offer to help a team mate.
Another trick is to work on something really quick, like fixing a low priority bug that has been there for months just because I didn't have time to deal with it. That gives me a sense of accomplishment that helps being more productive for the rest of the day.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It only seldom happens to me, but if I get the feeling I'm not really productive I usually offer to help a team mate.
Another trick is to work on something really quick, like fixing a low priority bug that has been there for months just because I didn't have time to deal with it. That gives me a sense of accomplishment that helps being more productive for the rest of the day.