clix/receive.lua@fa9efbef8a0c
clix/receive.lua
Thu, 07 Jan 2010 20:56:18 +0000
- author
- Matthew Wild <mwild1@gmail.com>
- date
- Thu, 07 Jan 2010 20:56:18 +0000
- changeset 17
- fa9efbef8a0c
- parent 12
-
1793fca3d707
- child 22
-
19c5a66837ed
- permissions
- -rw-r--r--
Move presence sending into clix_connect(), and control with -o/--presence
return function (opts, args)
local function on_message(message)
local body = message:get_child("body");
if body then
print(body:get_text());
end
end
local function on_connect(conn)
conn:hook("message", on_message);
end
clix_connect(opts, on_connect);
end