From 89fe184d4d852bfc0b8bc6efe223370a7dac71cf Mon Sep 17 00:00:00 2001 From: p3lim-52096 Date: Mon, 27 Apr 2009 00:31:29 +0000 Subject: [PATCH] Added license Fixed issue with blank blacklist git-svn-id: svn://svn.wowinterface.com/pError-161/trunk@17 7a612bb6-1b7b-4f5f-b58b-e1cc54d1b6b6 --- pError/pError.lua | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/pError/pError.lua b/pError/pError.lua index 4527ff0..003d6fa 100644 --- a/pError/pError.lua +++ b/pError/pError.lua @@ -1,3 +1,35 @@ +--[[ + + Copyright (c) 2009, Adrian L Lange + All rights reserved. + + Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: + + · Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + · Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + + · Neither the name of the add-on nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--]] + local next = next local find = string.find local lower = string.lower @@ -52,7 +84,7 @@ local function onEvent(self, event, str, ...) if(event == 'UI_ERROR_MESSAGE') then if(pErrorDB.all) then return - else + elseif(pErrorDB.blacklist[1]) then for k, v in next, pErrorDB.blacklist do if(find(lower(str), v)) then return end end -- 1.7.9.5