Diff

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
line wrap: on
line diff
--- a/init.lua	Thu May 06 10:24:37 2010 +0100
+++ b/init.lua	Thu May 06 10:26:16 2010 +0100
@@ -109,6 +109,10 @@
 	return self.events.add_handler(name, ...);
 end
 
+function stream:unhook(name, handler)
+	return self.events.remove_handler(name, handler);
+end
+
 function stream:add_plugin(name)
 	if require("verse.plugins."..name) then
 		local ok, err = verse.plugins[name](self);