diff options
author | Florian Zeitz <florob@babelmonkeys.de> | 2013-08-09 17:48:21 +0200 |
---|---|---|
committer | Florian Zeitz <florob@babelmonkeys.de> | 2013-08-09 17:48:21 +0200 |
commit | 4b618a8727365b880e115c6fd53869040c2ad238 (patch) | |
tree | 8031ff6fd0e32a78a157f8e6542a954e7e634c5d /util/filters.lua | |
parent | 7dd77281432685907926d50feb2d32c0c2a0ec8c (diff) | |
download | prosody-4b618a8727365b880e115c6fd53869040c2ad238.tar.gz prosody-4b618a8727365b880e115c6fd53869040c2ad238.zip |
Remove all trailing whitespace
Diffstat (limited to 'util/filters.lua')
-rw-r--r-- | util/filters.lua | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/util/filters.lua b/util/filters.lua index d143666b..8a470011 100644 --- a/util/filters.lua +++ b/util/filters.lua @@ -1,7 +1,7 @@ -- Prosody IM -- Copyright (C) 2008-2010 Matthew Wild -- Copyright (C) 2008-2010 Waqas Hussain --- +-- -- This project is MIT/X11 licensed. Please see the -- COPYING file in the source package for more information. -- @@ -16,7 +16,7 @@ function initialize(session) if not session.filters then local filters = {}; session.filters = filters; - + function session.filter(type, data) local filter_list = filters[type]; if filter_list then @@ -28,11 +28,11 @@ function initialize(session) return data; end end - + for i=1,#new_filter_hooks do new_filter_hooks[i](session); end - + return session.filter; end @@ -40,20 +40,20 @@ function add_filter(session, type, callback, priority) if not session.filters then initialize(session); end - + local filter_list = session.filters[type]; if not filter_list then filter_list = {}; session.filters[type] = filter_list; end - + priority = priority or 0; - + local i = 0; repeat i = i + 1; until not filter_list[i] or filter_list[filter_list[i]] >= priority; - + t_insert(filter_list, i, callback); filter_list[callback] = priority; end |