Comparison

doc/example_component.lua @ 260:7f6df45a3d1f

doc/example*.lua: Update to use new .init() method
author Matthew Wild <mwild1@gmail.com>
date Mon, 05 Dec 2011 15:44:17 +0000
parent 151:75016d851648
comparison
equal deleted inserted replaced
259:05acf08d2e98 260:7f6df45a3d1f
1 local jid, password = "echo.localhost", "hellohello"; 1 local jid, password = "echo.localhost", "hellohello";
2 2
3 --os.execute("squish --minify-level=none verse"); 3 --os.execute("squish --minify-level=none verse");
4 require "verse" 4
5 require "verse.component" 5 require "verse".init("component");
6 require "socket" 6
7 c = verse.new(verse.logger()) 7 c = verse.new(verse.logger())
8 c:add_plugin("version"); 8 c:add_plugin("version");
9 c:add_plugin("ping"); 9 c:add_plugin("ping");
10 10
11 -- Add some hooks for debugging 11 -- Add some hooks for debugging