# HG changeset patch # User Matthew Wild # Date 1323099498 0 # Node ID 816b8ccb30824965044d3f794f8f60c36c538fd1 # Parent cca89844cda7cbd0b854e98c66b9ef5a586a3932 verse: Add init(...) method to load connection modules (client, component, bosh, etc.) diff -r cca89844cda7 -r 816b8ccb3082 init.lua --- a/init.lua Mon Dec 05 15:36:53 2011 +0000 +++ b/init.lua Mon Dec 05 15:38:18 2011 +0000 @@ -19,6 +19,17 @@ verse.plugins = {}; +function verse.init(...) + for i=1,select("#", ...) do + local ok = pcall(require, "verse."..select(i,...)); + if not ok then + error("Verse connection module not found: verse."..select(i,...)); + end + end + return verse; +end + + local max_id = 0; function verse.new(logger, base)