Software /
code /
prosody
Comparison
util/filters.lua @ 3943:ad5924c31953
util.filters: Add remove_filter_hook()
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 22 Dec 2010 16:46:19 +0000 |
parent | 3625:f8d61da5bcc1 |
child | 5776:bd0ff8ae98a8 |
child | 5849:8f451d370dd4 |
comparison
equal
deleted
inserted
replaced
3942:0323beb7183c | 3943:ad5924c31953 |
---|---|
74 | 74 |
75 function add_filter_hook(callback) | 75 function add_filter_hook(callback) |
76 t_insert(new_filter_hooks, callback); | 76 t_insert(new_filter_hooks, callback); |
77 end | 77 end |
78 | 78 |
79 function remove_filter_hook(callback) | |
80 for i=1,#new_filter_hooks do | |
81 if new_filter_hooks[i] == callback then | |
82 t_remove(new_filter_hooks, i); | |
83 end | |
84 end | |
85 end | |
86 | |
79 return _M; | 87 return _M; |