SpamBayes for World of Warcraft

10 - [FIX ATTACHED] Post-hooks so other add-ons can ignore spam

I'm working on the LFMonitor add-on, and have added a fairly CPU-intensive Bayesian-esque multidimensional classifier to it. Since this classifier is fairly CPU-intensive (it uses fuzzy word matching), I don't want it to waste CPU cycles on spam for users that have SpamBayes. I tried having LFMonitor install itself as an AddMessageEventFilter, and declare SpamBayes as an optional dependency so it would load first (and therefore hopefully show up on the table first), but this didn't work.

The attached version of SpamBayes.lua exposes the function SpamBayes:addPostHook(f). When called with a function parameter, filter() will start calling that function with its own set of arguments, but only after classifying a message as ham or unsure.

Name Description Size MD5
SpamBayes.lua An improved version. Now allows ... 14.7 KiB 61f867fd1e81...
User When Change
merah Sep 06, 2011 at 11:44 UTC Changed status from New to Accepted
seahen Sep 03, 2011 at 19:23 UTC

Added attachment SpamBayes.lua

seahen Sep 03, 2011 at 19:22 UTC

Deleted attachment SpamBayes.lua: Uploading a slightly improved version

seahen Sep 03, 2011 at 19:11 UTC

Added attachment SpamBayes.lua

seahen Sep 03, 2011 at 19:10 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

  • 3 comments
  • Avatar of seahen seahen Sep 22, 2011 at 19:04 UTC - 0 likes

    Update: I no longer need this feature for LFMonitor. I've figured out how to post-hook     ChatFrame_AddMessageEventFilter to ensure my function is always last on the filter list (unless another add-on does the same).

    Last edited Sep 22, 2011 by seahen
  • Avatar of merah merah Sep 06, 2011 at 11:45 UTC - 0 likes

    Thank you seahen, i will do this ASAP

  • Avatar of seahen seahen Sep 03, 2011 at 19:16 UTC - 0 likes

    NB: LFMonitor is *not* a spam filter. Its purpose is to bring especially relevant trade messages to the user's attention, on high-population servers such as Blackrock Horde (which peaks at over 20 non-spam messages per minute). I may later add the ability to filter out LFG/LFM/etc. messages that aren't of interest, but this will be based on user preferences (which are likely to change from day to day based on raid lockouts etc.) and won't trigger automatic reporting.

  • 3 comments

Facts

Last updated
Mar 30, 2012
Reported
Sep 03, 2011
Status
Accepted - Problem reproduced / Need acknowledged.
Type
Enhancement - A change which is intended to better the project in some way
Priority
Medium - Normal priority.
Votes
1

Reported by

Possible assignees