clix/message.lua

Wed, 06 Jan 2010 03:50:37 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Wed, 06 Jan 2010 03:50:37 +0000
changeset 0
ae83411a89c9
child 9
c1d591488695
permissions
-rw-r--r--

Initial commit

return function (opts, arg)
	if #arg == 0 or opts.help then
		return 0;
	end
	local function on_connect(conn)
		conn:send(verse.message({ to = opts.to, type = opts.type or "chat" }):body(table.concat(arg, " ")));
		conn:close();
	end
	clix_connect(opts, on_connect);
end

mercurial