Changeset

53:091ff10eb51c

verse: Add stream:unhook(event_name, handler)
author Matthew Wild <mwild1@gmail.com>
date Thu, 06 May 2010 10:26:16 +0100
parents 52:8416508bfeb4
children 54:1a2a3d598254
files init.lua
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
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);