--- a/examples/muc.lua Wed Mar 31 00:28:04 2010 +0300
+++ b/examples/muc.lua Wed Mar 31 01:25:19 2010 +0300
@@ -4,13 +4,18 @@
main.command ( 'room-config',
function ( args )
+ local connection = main.connection ()
+ if not connection then
+ print "You are not online!"
+ return
+ end
local who
if args then
who = args
else
who = main.current_buddy ()
end
- local conn = lm.connection.bless ( main.connection () )
+ local conn = lm.connection.bless ( connection )
muc.owner_config ( conn, who,
function ( form, submit, reject )
insert_form ( form,
@@ -40,4 +45,4 @@
commands_help['room-config'] = "[room_jid]\n\nRequests room configuration form from server. You must be owner of this room."
--- vim: se ts=4: --
+-- vim: se ts=4 sw=4: --