MOO-XMPP

From Kenny Root

MOO-XMPP was written by Kenny Root as an experiment in connecting to XMPP (AKA Jabber) services. It was initially developed on his MOO ice-nine and later ported to Waterpoint.

It acts as a server connection for other XMPP-compliant servers to connect to. This means that any user on the MOO can use MOO-XMPP to send messages to other XMPP users or register with XMPP gateways.

The MOO-XMPP service uses a couple extensions from the "basic" LambdaMOO Server. It uses the WAIF extensions written by Ben Jackson, current LambdaMOO server maintainer, and Expat binding for MOO written by Ken Fox.

Features

Feature Supports?
Messaging (XEP-0022) Yes
Browsing (XEP-0011) Partial
Last Activity (XEP-0012) Yes
Service Discovery (XEP-0030) Partial
vcard-temp (XEP-0054) Yes<ref>Just avatars and nicknames are supported.</ref>
Gateway Interaction (XEP-0100) Yes<ref>This feature needs more testing</ref>

<references/>

Prerequisites

The MOO core MOO-XMPP was designed around was a Waterpoint-style JHCore extraction. If you are using a different core then you may be lacking the prerequisite objects. If you are, contact me and I'll try to post more object dumps here.

Server Patches

Name Instructions URL
WAIF Download the WAIF branch from Sourceforge CVS (view CVS) that contains the base upon which I build. The steps for doing this are on Sourceforge. http://sourceforge.net/projects/lambdamoo/
XML Download Ken Fox's Expat binding for MOO and install that. http://www.xythian.com/moo/expat-binding/

Dictionary WAIFs

Dictionary WAIFs were originally coded by Jay Carlson as an extension to Ben Jackson's WAIF work. The dictionary WAIFs basically add a way for obj.prop[index] where index is a string or number.

Object code: dict.zip

  1. Install waif.moo
  2. @property #0.waif
  3.  ;$waif = _
  4. Install dict-utils.moo
  5. @property #0.dict
  6.  ;$dict = _
  7. Install dict-waif.moo
  8.  ;$dict._waif_class = _
  9.  ;_.utils = $dict
  10.  ;$dict.empty = $dict:new()

XML Utilities

These XML objects make a standard interface for interaction with the Expat bindings by Ken Fox.

Object code xml.zip

  1. Install xml.moo
  2. @register xml on $local
  3. Install xml-node.moo
  4.  ;$local.xml.node = _

In-MOO Resolver

Ben Jackson wrote an in-MOO resolver using WAIFs. XMPP utilizes this to support SRV records.

Object code: dns.zip

  1. Install dns-resolver.moo
  2. @register resolver on $local
  3. Install dns-waif.moo
  4. Install dns-header-waif.moo
  5.  ;$local.resolver.header = _
  6. Install dns-query-waif.moo
  7.  ;$local.resolver.header.query = _
  8. Install dns-rr-waif.moo
  9.  ;$local.resolver.header.resource = _
  10.  ;$local.resolver.server = "IP address for your local DNS server"
  11. Install semaphore.moo
  12.  ;$local.resolver.mutex = _:new()

Source Code

Here is the heart of the XMPP system. It is a very complicated installation process simply because of the nature of MOO. These instructions are a work in progress right now.

Code: xmpp.zip

  1. Install crypto.moo
  2. @register crypto on $local
  3. Install image-utils.moo
  4. @register image_utils on $local
  5. Install xmpp-s2s-daemon.moo
  6. @register jabber on $local
  7. Open binary-handler.moo and change the parent object to the local generic daemon service handler from a JHCore/Waterpoint core.
  8. Note: binary-handler's :notify, :read_bytes, :notify_lines, :notify_lines_safe, and :notify_raw must be wizardly.
  9. --- INSERT MORE INSTRUCTIONS HERE ---
  10. Install xmpp-s2s-handler.moo
  11.  ;$local.jabber.handler = _
  12. --- UNFINISHED ---