Comparison

plugins/pep.lua @ 170:cb03e8ae2e30

Merge with Zash
author Matthew Wild <mwild1@gmail.com>
date Wed, 15 Dec 2010 15:03:56 +0000
parent 164:d862093d9f91
child 216:3aac084855e6
comparison
equal deleted inserted replaced
169:4bb1e9c91fbe 170:cb03e8ae2e30
20 end 20 end
21 end 21 end
22 end); 22 end);
23 23
24 function stream:hook_pep(node, callback, priority) 24 function stream:hook_pep(node, callback, priority)
25 local handlers = stream.events._handlers["pep/"..node];
26 if not(handlers) or #handlers == 0 then
27 stream:add_disco_feature(node.."+notify");
28 end
25 stream:hook("pep/"..node, callback, priority); 29 stream:hook("pep/"..node, callback, priority);
26 stream:add_disco_feature(node.."+notify");
27 end 30 end
28 31
29 function stream:unhook_pep(node, callback) 32 function stream:unhook_pep(node, callback)
30 stream:unhook("pep/"..node, callback); 33 stream:unhook("pep/"..node, callback);
31 local handlers = stream.events._handlers["pep/"..node]; 34 local handlers = stream.events._handlers["pep/"..node];