i have a mod called topChat. one of the things it does is block spam. DEFAULT_CHAT_FRAME:AddMessage() is hooked, the text is compared to the previous line of text and if they match then the new message is not shown.
this was a problem because it was blocking every repeated line, not just ones from spamming players. so i added a string.find for "^[" which causes the mod to only blocks the text if it starts with a '['.
this works fine for numbered channels (like [1. General]) because they actually start with a '[', but for un-numbered channels (say, yell, etc) this does not work. it looks like there's some hyperlink info before the name ('[' is found ~char 20).
so as i see it, there's 2 ways to trigger blocking spam on un-numbered channels. either i need to know the hyperlink format (there's gotta be some special character that denotes hyperlink information) or perhaps there's some variable in the self parameter of AddMessage that would indicate the origin of the message. something like self.sender that stores who sent the message originally.