Examples readme
authorMyhailo Danylenko <isbear@ukrpost.net>
Mon, 30 Nov 2009 20:36:19 +0200
changeset 85 1e5f17c25133
parent 84 c0db7efde255
child 86 9b98ea6c73f6
Examples readme
examples/README
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/README	Mon Nov 30 20:36:19 2009 +0200
@@ -0,0 +1,53 @@
+
+How to use these scrpits (and how they are organized):
+
+Scripts are generally separated into two classes - library
+(those in lm subdirectory), that deal mainly with lm and xmpp
+stuff, and mcabber, that provide mcabber interface for library
+scripts - mcabber commands, mcabber message handlers, etc.
+
+Most of mcabber scripts expect to be require'd from
+mcabberrc.lua, that will provide common hook and help
+infrastructure. For 'require' to find scripts, you need to
+properly set package.path, and in mcabberrc.lua there is
+example of this on the beginning. Some of this functionality
+is already implemented in C (and implemented better), so,
+first look at Modules wiki page.
+
+However, seems like forms interface is better to be left as
+it is implemented now - it will be too complex, when implemented
+in C, to be really convenient and easy to add other form types.
+So, I have no plans on converting forms and all functionality,
+that depends on it to binary C modules. This includes remote
+commands, registration to jabber entities, muc room administration
+and some more.
+
+So, first you need to get development version of mcabber, compiled
+with --modules-enable. Then you need to build this module. For
+that see README in top-level dir.
+
+Then you need to set modules_dir in your mcabberrc to point to
+directory, where your modules will reside. Now you can issue
+'/load lua' command and get module working. It will provide one
+command - '/lua' (and also some lua functions to allow lua to
+manipulate mcabber to some extent), that evaluates specified
+lua expression.
+
+Lua module allows to automatically run specified lua file at
+module loading. The name of this file is determined from variable
+lua_init_filename. To use these scripts it should point to
+your edited version of mcabberrc.lua. Also there are some other
+variables, that need to be set up for proper scripts functioning,
+you can find these values in lua.rc. Note, though, that some
+scripts are now unused by me and generally are considered only
+as example - eg jobs, marking etc. In mcabberrc.lua you should
+edit (if necessary) pacakage.path on beginning and set of
+require'd scripts in the end. Rigth now I am using transports,
+room_priv, forms, privacy, muc, vcard, oob, register, remote and
+attention scripts.
+
+Amongst these muc, vcard, register and remote depend on forms,
+and thus have no hope to be implemented in C in near future.
+
+  -- Myhailo Danylenko <isbear@ukrpost.net>
+