A Moodle user, Ross Hendricks, reported the problem in this thread:
If chat participants prefix their comment in chat with a slash character, their name is not displayed (this appears to be due to /whatever being treated as a special case, as with /me). Apparently some of his students are using this for annoyance purposes.
I posted a possible fix in that thread as well, but it was a quick one-off. There may be better ways of dealing with the issue.