Twitter is taking a hard line on spammers, bringing the law into its attempt to shut down the worst offenders.

The company announced the tough new approach in a post on its blog yesterday.

With over 340 million tweets going through its doors every day, Twitter is a big market for spammers, as any user of the service may have noticed.

It is targeting companies who build tools for distributing spam on Twitter for other spammers to use in their nefarious pursuits.

It has filed a lawsuit in San Francisco federal court, aimed squarely at five of the most prolific tool providers and spammers.

Taking away the tools

The hope is that by shutting down the tool providers, it'll make it harder for a lot of spammers to go about their irritating business.

Let's hope the law can do something about it, but in case it can't, Twitter is taking other measures.

Earlier this week its engineers launched anti-spam measures that suspend a new type of @ mention spam, and it now uses its link shortener to analyse links to cut out those leading users to malicious sites.

We wish them luck, but have a feeling its a case of "cut one head off, two more grow" with this one.