From 7aef3a06ea29377311ddfeafcf67f30694383066 Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Mon, 13 Jun 2011 03:57:45 +0200 Subject: [PATCH] Add posibility to just add everything that comes at once --- pError.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pError.lua b/pError.lua index 601f44b..1261e3c 100644 --- a/pError.lua +++ b/pError.lua @@ -13,6 +13,8 @@ local addonName = ... local find, lower = string.find, string.lower +local LISTENING = false + local addon = CreateFrame('Frame', addonName) local orig = UIErrorsFrame:GetScript('OnEvent') @@ -29,6 +31,9 @@ local function slashCommand(str) else print('|cffff8080pError:|r Database is empty') end + elseif(str == 'listen') then + LISTENING = not LISTENING + print('|cffff8080pError:|r Listening to any errors now ', LISTENING and 'enabled' or 'disabled') elseif(#str > 0) then for k, v in pairs(pErrorDB) do if(find(str, v)) then @@ -49,6 +54,11 @@ local function errorEvent(self, event, str, ...) return end end + + if(LISTENING) then + table.insert(pErrorDB, str) + print('|cffff8080pError:|r Added|cff95ff95', str, '|rto database') + end end return orig(self, event, str, ...) -- 1.7.9.5