Thread Tools Display Modes
04-16-09, 05:00 AM   #1
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
Join Date: May 2006
Posts: 281
Chat filters and 3.1

Could anyone help me fix this chat filter, i've seen the changes to chat filters but can't find out how to fix this.

Code:
local filteredchannels = {
	'CHAT_MSG_RAID',
	'CHAT_MSG_RAID_WARNING',
	'CHAT_MSG_RAID_LEADER',
	'CHAT_MSG_WHISPER',
	'CHAT_MSG_WHISPER_INFORM',
	}

local function IsSpam(text)
	if not text then return end
		if (string.find(text, '%*%*%*')) then 
			return true 
		end 
end

for i,v in ipairs(filteredchannels) do
	ChatFrame_AddMessageEventFilter(v, IsSpam)
end
Thanks a lot
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
  Reply With Quote
04-16-09, 05:21 AM   #2
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
Code:
local function IsSpam(self, event, ...)
	local text = ...
	if (string.find(text, '%*%*%*')) then 
		return true, ... 
	end 
	return false, ...
end
should work.
  Reply With Quote
04-16-09, 05:43 AM   #3
Caellian
A Frostmaul Preserver
 
Caellian's Avatar
Join Date: May 2006
Posts: 281
Works perfectly for the chats thanks, i haven't looked into it yet so i'll ask, even if i find later, how would you have this filter also affect the raid warning frame itself ?
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Chat filters and 3.1


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off