I'm a member of an online community built around a certain piece of open-source software. It's the place where we discuss development, bugs, etc - i.e. it's a place where we talk about code rather than the use of the software. Most, if not all, participants are people who are actively contributing to the code base.
One of our members, "X" is technically brilliant. His code is good and has fewer bugs than most, and he's fast. He's often the first one to spot the mistakes that others make, too. So from that point of view he's a very valuable contributor. Some of our members have met him in person and found him very friendly, helpful and easygoing.
The problem is that he's also very rude and abrasive to the community. To give an example, one of our newish members submitted a patch which, while it fixed one bug, introduced another. X responded with "You f*ing idiot, that's the worst piece of crap I've seen, you shouldn't be submitting this bug-riddled piece of shit patch. I don't want to see anything else from you until you've learned to code."
On another occasion, another contributor noticed what might be an error in one of X's contributions and asked whether it was in fact an error or whether the effect was intentional and if so why. X responded with "It's perfectly clear to anybody who understands $LANGUAGE. If you still don't get it I can find out where you live and come explain it to you. With my fists."
Several members have reacted badly to this kind of post. Each time, X has stated that it's "just his way", and he's "just joking around" and we should "lighten up". When asked outright to moderate his language, he responds with "if this place goes all PC I'll find something else to code, there are lots of projects out there that don't have sticks up their a*s about a few jokes".
We'd like to keep X around if possible, since his contributions are valuable. But we're also worried that he'll scare off other people who might also be valuable but who don't want to stay in an environment that they consider abusive. We don't want to get the reputation of an OSS project where people are being abused. Also, even if any one person that leaves because of X's behavior may not contribute as much as X does, he's really not more valuable than ten medium contributors. And by now I think he's made more than ten people leave the community, not counting the ones who never started contributing in the first place because of what they saw when they started following us.
We don't have moderators as such and if we were to implement any sort of community guide lines, I think we'd need to. Does anyone here have any suggestion about how to proceed to get a community that, while not too PC (politically correct) at least doesn't scare a lot of people off due to abrasiveness?