I have been getting absolutely slammed with stupid drug spam. Mephisto’s spam moderation stuff is pretty good, but the sheer volume required me to go down to the console to take care of the problem:

1
2
3
4
5
regex = /viagra|cialis|xanax|levitra|tramidol|valium|\
carisoprodol|tramadol|nexium|ultracet|allegra|\
zoloft|hoodia|snitz|ultram|levaquin|augmentin|\
prednisone|phentermine|fioricet|diethyproprion/i
Comment.find_all.select {|c| c.body =~ regex}.map(&:destroy).size

I was building the regex as I went along so I don’t have an exact count, but that probably deleted 500 comments. Much easier to moderate the other crap now.

1 Response to “Getting rid of pharmaceutical spam”

  1. topfunky Says:

    Most of the stuff that gets through to me is in the form of an image.

    You’re fortunate to be getting actual text! (By an odd definition of fortunate).

Sorry, comments are closed for this article.