Comparison

init.lua @ 53:091ff10eb51c

verse: Add stream:unhook(event_name, handler)
author Matthew Wild <mwild1@gmail.com>
date Thu, 06 May 2010 10:26:16 +0100
parent 45:50a2e4fb0a16
child 54:1a2a3d598254
comparison
equal deleted inserted replaced
52:8416508bfeb4 53:091ff10eb51c
107 107
108 function stream:hook(name, ...) 108 function stream:hook(name, ...)
109 return self.events.add_handler(name, ...); 109 return self.events.add_handler(name, ...);
110 end 110 end
111 111
112 function stream:unhook(name, handler)
113 return self.events.remove_handler(name, handler);
114 end
115
112 function stream:add_plugin(name) 116 function stream:add_plugin(name)
113 if require("verse.plugins."..name) then 117 if require("verse.plugins."..name) then
114 local ok, err = verse.plugins[name](self); 118 local ok, err = verse.plugins[name](self);
115 if ok then 119 if ok then
116 self:debug("Loaded %s plugin", name); 120 self:debug("Loaded %s plugin", name);