verse: Have verse.new() accept a prototype table on which to base the connection

Fri, 04 Dec 2009 03:28:40 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Fri, 04 Dec 2009 03:28:40 +0000
changeset 23
33e346283135
parent 22
e6fad7c411fe
child 24
db0ed736785a

verse: Have verse.new() accept a prototype table on which to base the connection

init.lua file | annotate | diff | comparison | revisions
--- a/init.lua	Fri Dec 04 03:23:06 2009 +0000
+++ b/init.lua	Fri Dec 04 03:28:40 2009 +0000
@@ -14,8 +14,8 @@
 
 verse.plugins = {};
 
-function verse.new()
-	local t = {};
+function verse.new(base)
+	local t = base or {};
 	t.id = tostring(t):match("%x*$");
 	t.logger = logger.init(t.id);
 	t.events = events.new();

mercurial