From f1d4d574065e8489c53e81cdae95cf0c4ce3b495 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 28 Aug 2014 09:20:33 +0100 Subject: util.filters: Ignore filters being added twice (fixes issues on removal) --- util/filters.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'util/filters.lua') diff --git a/util/filters.lua b/util/filters.lua index d24bd33e..6290e53b 100644 --- a/util/filters.lua +++ b/util/filters.lua @@ -45,6 +45,8 @@ function add_filter(session, type, callback, priority) if not filter_list then filter_list = {}; session.filters[type] = filter_list; + elseif filter_list[callback] then + return; -- Filter already added end priority = priority or 0; -- cgit v1.2.3