Modules
From Mcabber Wiki
Overview
Starting from version 0.10.0, mcabber supports dynamic loading of modules. It introduces the command '/module' with subcommands to load, unload and obtain info on modules. This command is allowed during initialization time, so you can specify it in your mcabberrc. Modules are searched in the directory specified in mcabber variable 'modules_dir', that you should set before issuing these commands. Default module installation/loading directory is '/usr/lib/mcabber'.
The API is still experimental and likely to be changed, but there is a short HOWTO about writing your own modules in 'doc/' subdirectory of mcabber source. It contains up-to-date information on module-related routines that mcabber offers and some examples.
Existing modules
Right now the following modules are available (if you know of some other modules, feel free to add them to list below):
beep
Simple module to beep on *all* messages. Available in mcabber 0.10.0. Serves the purpose of example for module writing HOWTO.
xttitle
Displays the number of unread messages in the X Terminal Title. The option 'xttitle_short_format' can be set to use a very short title.
disco
https://isbear.unixzone.org.ua/isbear/mcabber-disco/
Mirror: http://hg.lilotux.net/index.cgi/mod-mcabber-disco/
Module adds '/disco' command, that sends service discovery requests.
eventcmd
https://isbear.unixzone.org.ua/isbear/mcabber-patches/
Updated mirror: http://hg.lilotux.net/index.cgi/mcabber-experimental/
Modularization of legacy mcabber eventcmd script. Available in experimental version of mcabber.
eventcmd-ng
https://isbear.unixzone.org.ua/isbear/mcabber-eventcmd-ng/
Another approach for eventcmd. It passes arguments to script as environment variables, so, you can use '$jid' instead of $1. Because of this it is more flexible for future changes (see hooks description in HOWTO). Though, it is not officially approved new interface for eventcmd - it is only my vision of it.
fifo
Modularization of mcabber FIFO. Allows recreation of fifo in run-time by reloading module. This module has been merged into mcabber development tree (0.10.2-dev).
streams
https://isbear.unixzone.org.ua/isbear/mcabber-streams/ (in the process of updating, not present here yet)
In-Band and SOCKS5 Bytestreams implementation. Adds command '/stream'. It supports IBB native session initiation and bare SCOKS5 Bytestream requests and can send/receive files this way. Though, this module is, probably, the only implementation, that supports such file transfer methods, so you will be unable to use this module alone to exchange files with, other clients. However this module is designed with ability to be used by other modules as transfer pipe, so, there is si/file-transfer module to transfer files in more convenient way. This module should be considered still in beta stage, but yet already usable.
lua
https://isbear.unixzone.org.ua/isbear/mcabber-lua/
Lua interface module for mcabber. Adds '/lua' command (and much more in example scripts). Needs much more work, but already usable. Example scripts need some other lua modules, most nonfamous of them is probably lua interface to loudmouth - https://isbear.unixzone.org.ua/isbear/lua-lm/.
Mirrors:
mood
https://isbear.unixzone.org.ua/isbear/mcabber-mood/
Mirror: http://hg.lilotux.net/index.cgi/mod-mcabber-mood/
Allows to see mood changes of other buddies and publish your. Adds '/mood' command. Requires 'pep' module.
pep
https://isbear.unixzone.org.ua/isbear/mcabber-pep/
Mirror: http://hg.lilotux.net/index.cgi/mod-mcabber-pep/
Provides common incoming message handler for PEP-using modules.
tune
https://isbear.unixzone.org.ua/isbear/mcabber-tune/
Mirror: http://hg.lilotux.net/index.cgi/mod-mcabber-tune/
Allows to see music that your contacts listen to, and publish your own. Right now you can use '/tune' command through fifo to update your published tune, but this module also provides means to do this from other modules, and soon there should be mpd module, that will use it.
activity
https://isbear.unixzone.org.ua/isbear/mcabber-activity/
Mirror: http://hg.lilotux.net/index.cgi/mod-mcabber-activity/
Allows to see others' activity and publish yours. Provides '/activity' command. Requires pep module.
geoloc
https://isbear.unixzone.org.ua/isbear/mcabber-geoloc/
Mirror: http://hg.lilotux.net/index.cgi/mod-mcabber-geoloc/
Allows to see other's location and publish your. Provides '/geoloc' command. Requires 'pep' module. Also provides header file to allow other modules to publish information.
urlopen
https://isbear.unixzone.org.ua/isbear/mcabber-urlopen/
Looks for urls in incoming messages and prints them to log and/or calls shell command to handle them.
avatar
https://isbear.unixzone.org.ua/isbear/mcabber-avatar/
Mirror: http://hg.lilotux.net/index.cgi/mod-mcabber-avatar/
This module implements avatar publishing/retrieving via pep/pubsub. It informs you when your buddies publish their avatars via pep and provides command '/avatar' to publish your own. But this is not all: It also will actually show you buddy's avatar! Yes, it is aalib :)
env
https://isbear.unixzone.org.ua/isbear/mcabber-env/
Mirror: http://hg.lilotux.net/index.cgi/mod-mcabber-env/
Tampering with mcabber's environment. This module can be useful for development and debugging, as well as for on-the-fly changing of some parameters, like AAOPTS for aalib, used in avatar module. Also provides way to change current working directory.
mpd
https://isbear.unixzone.org.ua/isbear/mcabber-mpd/
Uses tune module to publish your current playing in MPD (Music Player Daemon) song via pep.
cmd
https://isbear.unixzone.org.ua/isbear/mcabber-cmd/
Provides command '/cmd', that sends output of specified shell command to current buddy.
yaubil
https://isbear.unixzone.org.ua/isbear/mcabber-yaubil/
Mirror: http://hg.lilotux.net/index.cgi/mod-mcabber-yaubil/
Yet Another Useless Built-In Language. Provides '/eval', '/if', '/then', '/else', '/let' and '/multi' commands. Probably most useful amongst them is '/multi'. If, breaking my expectations, this module becomes useful and famous (presence of beard may cause this), I promise, that I'll improve string/parentheses parsing, add loops and maybe even switch to tree-producing parser with operators precedence.
marking
https://isbear.unixzone.org.ua/isbear/mcabber-marking/
Mirror: http://hg.lilotux.net/index.cgi/mod-mcabber-marking/
Adds ability to mark several buddies and do some command for each of these buddies. Provides commands '/mark' and '/marked'.
templatecmd
https://isbear.unixzone.org.ua/isbear/mcabber-templatecmd/
Allows to define alias-like commands with shell-like positional arguments substitution. Provides command '/templatecmd'. If you're searching for a way to define alias for '/send_to -f <filename_here> .' - this module is for you.
si
https://isbear.unixzone.org.ua/isbear/mcabber-si/ (in the process of updating, not present here yet)
Stream initiation (file transfer profile) module. Uses streams module for its transfer methods, thus, it now supports both IBB and SOCKS5 Bytestreams. Provides command '/si'.
uptime
https://isbear.unixzone.org.ua/isbear/mcabber-uptime/
Mirror: http://hg.lilotux.net/index.cgi/mod-mcabber-uptime/
Module to show mcabber uptime. It can either determine full mcabber process uptime from linux /proc filesystem or just count time from module loading moment.
comment
http://hg.lilotux.net/index.cgi/mcabber-modules/
Trivial module; adds a command "#" to ignore a line. This module is part of the mcabber-modules repository.
clock
http://hg.lilotux.net/index.cgi/mcabber-modules/
This module uses the 'info' option to display the date and time in the status bar. This module is part of the mcabber-modules repository.
extsay
http://hg.lilotux.net/index.cgi/mcabber-modules/
If you use the screen utility, this module will let you open your editor in a new screen window, and will send the message once you exit the editor. Check the README file! This module is part of the mcabber-modules repository.
lastmsg
http://hg.lilotux.net/index.cgi/mcabber-modules/
Stores highlighted messages received in MUC rooms while you are away. When you're back, you can use the command /lastmsg you display them. This module is part of the mcabber-modules repository.
info_msgcount
http://hg.lilotux.net/index.cgi/mcabber-modules/
Displays the number of unread messages (buffers) in the status bar. This module relies on the 'info' option, so it cannot be used with the clock module described above. This module is part of the mcabber-modules repository.
killpresence
http://hg.lilotux.net/index.cgi/mcabber-modules/
Adds two commands, killpresence and killchatstates, that can be used repectively to ignore the current presence from a fulljid (e.g. to kill a "ghost") and to reset the chat state status of an online contact. This module is part of the mcabber-modules repository.
ignore_auth
http://www.freakysoft.de/repos/mcabber-modules/
Ignores subscription requests from every jid matching configurable regexs. Adds the command ignore_auth to add a regex to the list (/ignore_auth .*@icq). The option ignore_auth can be used to disable/enable this feature temporily (/set ignore_auth = 1). This module is part of the forked mcabber-modules repository from franky.
antispam
https://bitbucket.org/georgri/mcabber-modules/
Enables simple question-based antispam-bot which asks predefined question to every unsubscribed buddy, expecting them to give the right predefined answer. Currently you may change the standard question/answer only by changing the source code.
jingle
https://github.com/alkino/mcabber-jingle
Jingle modules written by Alkino during the GSoC 2010. Contains a file transfer module (IBB support).
HG Mirror URL: http://hg.lilotux.net/index.cgi/mod-mcabber-jingle/
avv
https://isbear.unixzone.org.ua/isbear/mcabber-avv/
Advanced version verification (or something like that, I now cannot recollect initial meaning of this abbreviature). Alternative module loading system, that allows flexible module compatibility determination. It splits API, provided by mcabber into a set of smaller APIs. This allows to omit module update, when major API change have not changed used by this module mini-APIs. Also, module information is now stored separately, in usual text file, that may be adapted by hand to user environment. Fallback legacy module loading scheme is not yet implemented :(
Notes on modules, written by me (Myhailo Danylenko)
- Modules, included in experimental version of mcabber are supposed to merge to mainstream in 0.10.2.
- I use cmake as build system, it allows me quickly generate debian packages (not too accurate, but at least it is package). See README for a brief description how to build module.
- Most modules need more work - to add flexibility, providing mcabber variables, that control module behaviour, to check for resource releasing in extreme situations, etc.
- Most modules, that provide some command also include help file for them (in English). You may need to adjust variable help_dirs, if you have installed module with another prefix than mcabber itself to be able to use this help files.
- Every module contains file modulename.rc (by default it will be installed into <install prefix>/share/doc/libmcabber-<modulename>/), that contains list of all mcabber variables introduced by this module with descriptions and load commands, necessary to get this module loaded (i.e. first load commands for modules, that are required for this module to work, then load command for this module itself).
- If you have found a bug in module, please contact me by mail or jabber (both can be found in README file).