DJabberd::Component::Example - An example DJabberd service component


DJabberd documentation  | view source Contained in the DJabberd distribution.

Index


NAME

Top

DJabberd::Component::Example - An example DJabberd service component

SYNOPSIS

Top

  <Subdomain example>
      <Plugin DJabberd::Component::Example>
          Greeting Hello, world!
      </Plugin>
  </Subdomain>

This class implements a very simple component that responds to all incoming messages with a predefined greeting and which returns a vCard for itself when one is requested. You can change the greeting returned using the optional Greeting configuration setting as above.

This example also exposes a node called "somebloke" that responds to all messages with authentic British surprise.

This example uses the higher-level API provided by DJabberd::Agent, from which DJabberd::Component inherits. DJabberd::Component::External serves as an example of how to handle stanzas at a lower level by overriding the handle_stanza method.

COPYRIGHT

Top


DJabberd documentation  | view source Contained in the DJabberd distribution.