Remove obsolete install files.

These modules were moved to their own repositories. Thus they
aren't needed here anymore.
Restructure debian packaging.

This commit restructures the debian packaging. First it splits off
the modules from the djabberd package which allows installing all
required libraries w/o getting another deamon (e.g. as build
dependency for building other modules or custom jabberds). Second
it adds the missing wiring to the djabberd to get an jabber
server which is easy to set up. Including propper logging and
an ssl certificate.
Bump version in debian changelog.

This commit raises the package version in the debian changelog to
match the CHANGES file and fixes a small location issue.
Fix install locations, init script and maintainer scripts.
Fix build-time warnings.

Remove obsoleted chdirs in debian/rules. Add VCS URIs to debian/control.
Merge pull request #6 from gittex/master

Please pull my debian packaging changes
Add a prerequisite for Digest::SHA1 to correlate with t/lib/djabberd-test.pl.
Merge pull request #7 from nrr/test_requires_digest_sha1

Add a prerequisite for Digest::SHA1 to correlate with t/lib/djabberd-test.pl
Depend on Digest::SHA instead of Digest::SHA1.

This commit makes DJabberd depend on Digest::SHA instead
of Digest::SHA1. Digest::SHA is in the perl core since 5.9.3
while Digest::SHA1 is not.

Futhermore Digest::SHA1 is not available in Debian wheezy
anymore.

Conflicts:
	debian/control
Add travis-ci integration
Merge pull request #13 from gittex/sha

Use Digest::SHA instead of Digest::SHA1
Basic reformatting of README file to Markdown
Add c2s IPv6 support

This commit adds IPv6 c2s (listening) support to the server using
IO::Socket::INET6 instead of IO::Socket::INET.

It also relaxes the IP(v4) check of DJabberd::Util::as_bind_addr
and introduces some new testcases.

This patch works for me, but has the drawback of requiring IPv6
capabilities even on hosts w/o (a need for) IPv6.

As IPv4 is facing its end-of-life I deem this is OK, but YMMV.
Turn of warnings in DJabberd::SASL

This commit turns of the warnings in DJabberd::SASL's get_sasl_manager.
In recent perl versions these warnings clutter the test output.

Since I'm not entirely sure if removing the defined stmt. will
silently break things I prefer to use the no warnings here.
Merge pull request #16 from gittex/saslwarnings

Turn of warnings in DJabberd::SASL
Improve debian package upgrades

This commit adresses an issue when upgrading the DJabberd
debian package. It the server is not running when
the upgrade is started it will fail due to a bad exit code
from the init script.

This commit makes sure as stopped server does not hinder
the upgrade process.
Allow dots in usernames (incomplete - should use nodeprep)

This allows users with gmail accounts to work correctly.

NOTE: gmail accounts have interesting issues with dot-stuffing
and subscription as well...
Local Delivery: replace "jabber:server" namespace with "jabber:client"

This was causing significant interoperability issues.

RFC 6120 is quite clear on this:

4.8.3. XMPP Content Namespaces

[...]

   Server implementations MUST support as default content namespaces
   both the 'jabber:client' namespace (when the stream is used for
   communication between a client and a server) and the 'jabber:server'
   namespace (when the stream is used for communication between two
   servers).  When communicating with a connected client, a server MUST
   NOT send stanzas qualified by the 'jabber:server' namespace; when
   communicating with a peer server, a server MUST NOT send stanzas
   qualified by the 'jabber:client' namespace.

      Implementation Note: Because a client sends stanzas over a stream
      whose content namespace is 'jabber:client', if a server routes to
      a peer server a stanza it has received from a connected client
      then it needs to "re-scope" the stanza so that its content
      namespace is 'jabber:server'.  Similarly, if a server delivers to
      a connected client a stanza it has received from a peer server
      then it needs to "re-scope" the stanza so that its content
      namespace is 'jabber:client'.  This rule applies to XML stanzas as
      defined under Section 4.1 (i.e., a first-level <message/>,
      <presence/>, or <iq/> element qualified by the 'jabber:client' or
      'jabber:server' namespace), and by namespace inheritance to all
      child elements of a stanza.  However, the rule does not apply to
      elements qualified by namespaces other than 'jabber:client' and
      'jabber:server' nor to any children of such elements (e.g., a
      <message/> element contained within an extension element
      (Section 8.4) for reporting purposes).  Although it is not
      forbidden for an entity to generate stanzas in which an extension
      element contains a child element qualified by the 'jabber:client'
      or 'jabber:server' namespace, existing implementations handle such
      stanzas inconsistently; therefore, implementers are advised to
      weigh the likely lack of interoperability against the possible
      utility of such stanzas.  Finally, servers are advised to apply
      stanza re-scoping to other stream connection methods and
      alternative XMPP connection methods, such as those specified in
      [XEP-0124], [XEP-0206], [XEP-0114], and [XEP-0225].
Encode XML using entities for high-byte chracters

There appears to be a bug in the SSL handling in Pidgin
where it's counting bytes vs characters, and with a long
roster containing multibyte characters, it corrupts the
XML by randomly skipping some characters.

This bug is somewhat insane, but it's work-aroundable
by just sending all high-byte characters encoded as
numbered (hex) entities.

It would be nice to be smarter about quoting of quotes,
but this seems to interoperate fine.
Decode XML entites in Attributes

We run without external entity parsing for security, but this
means we don't parse regular named or numbered entities either,
which breaks setting "Bob & Sue Jones" as a JID name in your
Roster.

This is fixed by using HTML::Entities to parse the 'Attributes'
in SAXHandler.