xmppcomponent_listener: Remove useless require of lxp default tip

util.xmllex: Decode XML entities

util.xmllex, util.xmppstream: It runs

mod_dialback: Use stanza:get_text() instead of directly accessing [1]

util.stanza: Ignore false xmlns

util.stanza: Fixes for xmllex-generated stanza objects

stanza_router: Replace xmlns == nil checks with 'not xmlns'

mod_saslauth: Use get_text() instead of directly accessing stanza child text nodes

mod_presence: Use get_text() instead of table.concat

util.xmppstream, util.xmllex: Basic test passes

Merge

Adding test for xmppstream

All correcthg diff util/xmppstream.lua

Tree structure now similar to prosody stanza format

util.xmllex: Add

util.xmppstream: Prepare for using xmllex

mod_pubsub: Correctly wrap the list of subscriptions in a pubsub element

util.xmppstream: Optimized stanza building by bypassing the stanza API.

util.sasl: Cache the calculated mechanisms set for SASL profiles (profile.mechanisms table).

prosody: Don't add a datamanager callback when anonymous_login=true (mod_auth_anonymous does this now).

hostmanager: Don't set host.disallow_s2s when anonymous_login=true (mod_auth_anonymous does this now).

mod_saslauth: Remove special handling for SASL ANONYMOUS, and let mod_auth_anonymous handle it.

usermanager: Assume authentication="anonymous" when anonymous_login=true.

util.sasl.*, mod_auth_*, mod_saslauth: Pass SASL handler as first parameter to SASL profile callbacks.

mod_storage_sql: Use util.json instead of util.serialization.

util.json: Initial commit.

mod_storage_sql: Log an error on query failure.

mod_storage_sql: Remove the subkey column from the Prosody table, and make the map store compatible with the key-value store.

mod_storage_sql: Dynamically replace backquotes with double quotes when connecting to PostgreSQL...

mod_storage_sql: Call commit() after all SQL statements, including SELECT, to get SQLite to drop its locks.

mod_storage_sql: Quote identifiers in SQL with backquotes, and use the empty string for NULL, and '=' instead of 'IS' for comparison, to work with MySQL's limitations...

Don't check priority in mod_offline

mod_message, mod_offline: Change message/offline/store -> message/offline/handle

mod_offline: Make sure mod_offline's store handler reports success vs failure.

mod_message: Send service-unavailable if offline storage fails.

mod_presence, mod_offline: Merge message/offline/delete with message/offline/broadcast.

core.offlinemanager, mod_message, mod_presence: Removed core.offlinemanager in favor of mod_offline.

modulemanager: Auto-load mod_offline.

util.pposix: Remove extraneous semicolon

util.encodings: Switch comment styles to build ok as ANSI C

util-src/Makefile: Change parameter order so that LDFLAGS always comes later than the input files

util-src/Makefile: Clean up and remove unnecessary all linking

configure: Don't add -llua to LDFLAGS, it's unnecessary

mod_saslauth: Handle session bind requests to the host, fixes OneTeam login

s2smanager: Destroy session on immediate failure of a connection attempt (e.g. inability to create sockets)

s2smanager: Handle DNS lookup error in response handler

s2smanager: send_to_host(): Handle already-destroyed session and bounce stanza accordingly

s2smanager: new_outgoing(): Destroy session if first connection attempt fails immediately (e.g. can't create sockets)

net.adns: Handle dns.query() failures, and pass error to handler

net.dns: resolver:query(): Handle getsocket() failures, and return true on success

net.dns: resolver:getsocket(): Return nil, err on failure

s2smanager: Give all new outgoing s2s sessions a close method by default (destroy_session)

s2smanager: Add a missing semi-colon

s2smanager: destroy_session(): Pass reason to retire_session() and return true on successful destruction

s2smanager: retire_session(): Add a 'reason' parameter

mod_pubsub: Include node in disco#items reply

s2smanager: session.send(): Return the result of send_to_host() (and incidentally make this a tail call \o/)

s2smanager: send_to_host(): Return false on failure, and true otherwise

mod_pubsub: Fix missing disco#items xmlns

util.pubsub: Return correct node in get_subscriptions()

mod_pubsub: Implement disco#info for nodes

util.filters: Add remove_filter_hook()

util.pubsub: Use correct node name when returning a list of multiple nodes in a subscriptions response

mod_pubsub: Implement get_subscriptions

mod_pubsub: Add get_subscriptions and get_subscriptions_other capabilities to default affiliations

mod_pubsub: Add add_subscription and get_subscriptions to feature_map

util.pubsub: Add service-wide subscription tracking, and add :get_subscriptions()

util.pubsub: Small code tidying for :get_subscription()

util.pubsub: Fix traceback when using autocreate-on-subscribe

mod_pubsub: Set normalize_jid instead of jids_equal

util.pubsub: Add service:jids_equal() and new config option normalize_jid

mod_pubsub: Fix a missing :up() from the last commit

mod_pubsub: Handle disco#items on nodes

util.pubsub: get_items(): When requesting a specific item, use the id as a key to mirror the multiple-item case

prosody: Catch a recursive Include error and print a more friendly error

configmanager: Filenames without a path are also relative to the config file path, not the current working directory

util.pubsub: Add service:set_node_capabilities()

util.xmppstream: Allow stream_ns = "" for parsing streams with no xmlns

Merge with 0.8

prosody.cfg.lua.dist: Add note about external gateways

prosody.cfg.lua.dist: Update for new logging config format

configmanager: Support for wildcards in Include directives

prosody, prosodyctl, util.dependencies: Split checking and logging of dependencies so we can check hard deps before the config and logging is loaded

util.httpstream: For HTTP client responses, changing properties responseversion and responseheaders to httpversion and httpheaders, to match HTTP server requests.

util.httpstream: A little cleanup of the HTTP path.

mod_pubsub: Use bare JID in get_affiliation

mod_pubsub: Skip false features in feature_map

util.pubsub: Fix nil global access in get_nodes()

mod_pubsub: Return disco#info stanza from build_disco_info()

mod_pubsub: Iterate over disco features in correct table

mod_pubsub: Build disco#info based on the methods provided by the pubsub service object. Add public set_service() method to change the service object used by the module.

mod_pubsub: Fix capabilities table from some debugging

mod_pubsub: Make the pubsub host an admin too

mod_pubsub: Update for latest util.pubsub and fix some bugs. New config options autocreate_on_publish, autocreate_on_subscribe and default_admin_affiliation.

util.pubsub: Too many changes to list or split sensibly. Added access control to all methods, with capabilities support. Renamed get() -> get_items() and changed it to return true, result on success. Support for autocreate_on_subscribe and autocreate_on_publish config options.

util.pubsub: Modify new() to take a config, and add a default config via a metatable

mod_pubsub: Add 'forbidden' error support

prosody.cfg.lua.dist: Add note about external gateways

prosody.cfg.lua.dist: Update for new logging config format

configmanager: Support for wildcards in Include directives

prosody, prosodyctl, util.dependencies: Split checking and logging of dependencies so we can check hard deps before the config and logging is loaded

util.httpstream: For HTTP client responses, changing properties responseversion and responseheaders to httpversion and httpheaders, to match HTTP server requests.

util.httpstream: A little cleanup of the HTTP path.

Merge with 0.8

mod_pubsub, util.pubsub: Remove from 0.8

Merge 0.8->trunk (uh-oh)

configmanager: Switch back to returning 'ok' to signal config load success - fixes config errors not being displayed

util.events: Remove an event's table when it has no more handlers.

mod_admin_adhoc: Support unloading multiple modules

mod_admin_adhoc: Support for reloading multiple modules

net/server_select.lua: Reduce select() timeout back to 1s

storagemanager: Don't always show fallback warning when using per-store config

prosodyctl: Add dummy lock/unlock_globals() until util.startup comes along

mod_storage_sql: Fix a couple of bugs in "JSON" decoding

util.prosodyctl: Initialize storagemanager on hosts we modify

storagemanager: Log warning when loading the storage provider plugin fails

util-src/Makefile, util-src/encodings.c{,pp}: Port ICU code to C, rename encodings.cpp back to .c and amend the Makefile accordingly

usermanager: Fixed a possible traceback when is_admin() was used on a component.

prosody.cfg.lua.dist: Update to reflect new mod_admin_* modules

util.stanza: Iterate on childtags instead of all childs.

Make libidn default when not specifiying a IDN lib.

Fix lua lib name in LDFLAGS.

util.encodings: Support for ICU for IDNA operations.

mod_pubsub: Preserve service object on module reload

mod_pubsub: Handle disco#info and disco#items

util.pubsub: Add service:get_nodes()

modulemanager, mod_console: Rename mod_console -> mod_admin_telnet - add compatibility code to modulemanager for existing configs

net.httpserver: Default 'ports' = {5280}

net.xmppclient_listener: Imports and global cleanup.

net.xmppserver_listener: Removed unnecessary import of lxp.

net.xmppserver_listener: Removed unused variables and imports.

net.xmppserver_listener: Made some globals local.

net.xmppcomponent_listener: Move session creation from listener.onincoming to listener.onconnect.

net.xmppcomponent_listener: Made some globals local.

core.loggingmanager: Updated to use termcolours.getstyle instead of termcolours.getstring for console logging.

util.termcolours: Added setstyle(str), which works on Windows too.

util-src/windows.c: Added get_consolecolor, set_consolecolor.

net.dns: Clean up tostring() of returned records, as a result PTR records can now be tostring()'d

net.dns: Add resolver:tohostname() and dns.tohostname()

util.serialization: Proper serialization of Infinity, -Infinity and NaN.

mod_storage_sql: Use 'IS' for comparison instead of '=', to avoid SQL's NULL insanity.

mod_storage_sql: Fixed the deserialization of string-typed values.

prosodyctl: Added and updated some comments and some semicolons, to match main prosody executable.

prosodyctl: Read PROSODY_SRCDIR and PROSODY_PLUGINDIR environment variables, to match main prosody executable.

prosody: Added a comment, to match prosodyctl.

prosodyctl: Added support for --config command line argument, and multiple config parsers (to match the main prosody executable).

mod_pep: Fixed a traceback when non-local users send presence.

mod_pep: Handle the case where local contacts send directed presence with caps hash.

util.serialization: Implemented deserialize().

storagemanager: When we have a cached data driver, we are supposed to use it.

mod_storage_sql: Auto-initialize SQLite3 database.

mod_storage_sql: Default value for option sql = { driver = "SQLite3", database = "prosody.sqlite" }.

mod_storage_sql: Fixed a typo.

mod_storage_sql: Initial commit of new SQL data driver.

storagemanager: Hook "host-activated", to make sure we are notified about data drivers.

storagemanager: Fixed a nil global access.

util.stanza: Change get_error() to return nil rather than '' for no text

mod_bosh: Fixes to the session creation response - add mandatory 'wait' attribute, remove optional 'maxpause' which we don't support, and reformat the code to prevent long lines and wacky indentation. Fixes #219.

prosodyctl: Make the 'restart' command start Prosody even if it wasn't already running

util.datamanager: Return an error string when pcall fails on a loaded list file.

util.datamanager: When failing to load a list file, and the file exists, log an error, and return nil, error.

usermanager: Removed redundant import of util.datamanager and util.hashes.

util.ztact: Removed.

net.dns: Removed dependency on util.ztact by moving ztact.get/set in.

mod_console: Removed redundant code for host:activate() and host:deactivate(), now that hostmanager has error checking.

hostmanager: Improved error handling.

hostmanager: deactivate() now returns true on success.

hostmanager: activate() now gets the host config from configmanager when a config isn't given.

certs/Makefile: Remove -c flag to chmod, which appears to be a GNUism (thanks Kev)

prosody: Don't attempt to load core.xmlhandlers in the main file. It no longer exists.

xmlhandlers: DELETED.

util.prosodyctl: Prep JIDs before checking whether they exist (thanks tja)

tools/xep227toprosody.lua: Rename ns_xep227 to xmlns_xep227 for consistency with main Prosody code

tools/xep227toprosody.lua: Convert to use util.xmppstream

util.xmppstream: Expose ns_separator and ns_pattern

mod_bosh: Switch to util.xmppstream from xmlhandlers

xmppcomponent_listener: Switch to util.xmppstream from xmlhandlers

prosody: Added a stub implementation of core.componentmanager to the package.loaded table (re-commiting, as this was accidentally removed).

certs/openssl.cnf: Change countryName from UK to GB

certs/Makefile: Add .PRECIOUS to stop make deleting the key as an intermediate file (thanks deryni/Zash)

certs: Add a default OpenSSL configuration file, and a Makefile.

mod_pubsub: Ensure <item> is in correct scope when broadcasting an event

mod_pubsub: Support item retraction

mod_pubsub, util.pubsub: Support for unsubscribing

mod_pubsub: Use pubsub_error_reply everywhere

util.xmppstream: Fix logger name.

mod_disco: Don't add caps hash to stream features on unauthenticated connections.

mod_proxy65: Add service discovery identity and feature, to help out mod_disco when loaded on a normal host.

mod_proxy65: Cleaned up stanza processing a little.

mod_proxy65: s:len() -> #s.

mod_proxy65: Make some globals local.

mod_proxy65: :sub(n):byte() -> :byte(n).

mod_proxy65: Allow loading on normal hosts.

mod_proxy65: Updated to use sub-events. Now only hooks what it needs to.

net.server_select: Set select() timeout to 3600 by default.

net.server_select: Made another global local.

net.server_select: Made some globals local.

mod_bosh: Use util.timer for timers instead of server.addtimer.

util.timer: Activate higher timer precision.

net.server_select: Make changes required for sub-second timer precision.

fallbacks/lxp.lua: Pure Lua pseudo-XML parser. Implements the same API as LuaExpat.

mod_iq: Fix an extra character in previous commit...

mod_iq: Don't hook 'iq/full' on components.

modulemanager: Allow components to inherit mod_iq. This allows modules loaded on components to hook IQ stanza sub-events ("iq-set/bare/xmlns:tag", etc).

mod_proxy65: Give the 'iq/host' stanza handler a negative priority, to allow mod_iq to process the events first.

MUC: Give stanza handlers a negative priority, to allow mod_iq to process them first.

mod_component: Give stanza handlers a negative priority, to allow mod_iq to process them first.

mod_iq: Don't stop event dispatch for unhandled IQ errors and results (this lets negative priority handlers intercept the events).

mod_pubsub, util.pubsub: Support node creation

mod_pep: Remove PEP subscriptions on getting a presence unsubscribe.

mod_pep: Fixed regression where PEP messages were not correctly being broadcasted on caps hash change.

mod_pep: Fixed a nil access (thanks Zash).

mod_disco: Fixed: Service discovery features were not being removed on module unload (issue #205).

mod_pep: Optimised PEP requests for disco info on caps change (issue #150).

storagemanager: Only show fallback warning if storage was configured to use another backend and it failed

storagemanager: Return driver from load_driver() if successful

mod_iq: Optimized a bit more (fewer table accesses).

mod_iq: Optimized a bit (fewer table accesses).

mod_iq: Extra IQ get and set sub-events are now fired: "iq-{get,set}/{host,self,bare}/xmlns:tag" (when "iq/{host,self,bare}/xmlns:tag" is unhandled).

storagemanager: Import type()

storagemanager: Import util.multitable again

storagemanager: Fix syntax error

mod_pep: Updated disco#info result handler to use new event name format.

mod_iq: IQ error and result sub-events are now "iq-{error,result}/{host,self,bare}/id" (previously "iq/{host,self,bare}/id").

configmanager: Switch back to returning 'ok' to signal config load success - fixes config errors not being displayed

Merge with Florob

util.events: Remove an event's table when it has no more handlers.

mod_admin_adhoc: Support unloading multiple modules

mod_admin_adhoc: Support for reloading multiple modules

net/server_select.lua: Reduce select() timeout back to 1s

storagemanager: Don't always show fallback warning when using per-store config

prosodyctl: Add dummy lock/unlock_globals() until util.startup comes along

mod_storage_sql: Fix a couple of bugs in "JSON" decoding

util.prosodyctl: Initialize storagemanager on hosts we modify

storagemanager: Log warning when loading the storage provider plugin fails

util-src/Makefile, util-src/encodings.c{,pp}: Port ICU code to C, rename encodings.cpp back to .c and amend the Makefile accordingly

usermanager: Fixed a possible traceback when is_admin() was used on a component.

prosody.cfg.lua.dist: Update to reflect new mod_admin_* modules

util.stanza: Iterate on childtags instead of all childs.

Merge Tobias->trunk

Make libidn default when not specifiying a IDN lib.

Fix lua lib name in LDFLAGS.

util.encodings: Support for ICU for IDNA operations.

mod_pubsub: Preserve service object on module reload

mod_pubsub: Handle disco#info and disco#items

util.pubsub: Add service:get_nodes()

modulemanager, mod_console: Rename mod_console -> mod_admin_telnet - add compatibility code to modulemanager for existing configs

net.httpserver: Default 'ports' = {5280}

net.xmppclient_listener: Imports and global cleanup.

net.xmppserver_listener: Removed unnecessary import of lxp.

net.xmppserver_listener: Removed unused variables and imports.

net.xmppserver_listener: Made some globals local.

net.xmppcomponent_listener: Move session creation from listener.onincoming to listener.onconnect.

net.xmppcomponent_listener: Made some globals local.

core.loggingmanager: Updated to use termcolours.getstyle instead of termcolours.getstring for console logging.

util.termcolours: Added setstyle(str), which works on Windows too.

util-src/windows.c: Added get_consolecolor, set_consolecolor.

net.dns: Clean up tostring() of returned records, as a result PTR records can now be tostring()'d

net.dns: Add resolver:tohostname() and dns.tohostname()

util.serialization: Proper serialization of Infinity, -Infinity and NaN.

mod_storage_sql: Use 'IS' for comparison instead of '=', to avoid SQL's NULL insanity.

mod_storage_sql: Fixed the deserialization of string-typed values.

prosodyctl: Added and updated some comments and some semicolons, to match main prosody executable.

prosodyctl: Read PROSODY_SRCDIR and PROSODY_PLUGINDIR environment variables, to match main prosody executable.

prosody: Added a comment, to match prosodyctl.

prosodyctl: Added support for --config command line argument, and multiple config parsers (to match the main prosody executable).

mod_pep: Fixed a traceback when non-local users send presence.

mod_pep: Handle the case where local contacts send directed presence with caps hash.

util.serialization: Implemented deserialize().

util.x509: "certverification" -> "x509".

storagemanager: When we have a cached data driver, we are supposed to use it.

core.s2smanager, mod_console, mod_saslauth, util.certverification: rename util.certverification to util.x509

mod_storage_sql: Auto-initialize SQLite3 database.

mod_storage_sql: Default value for option sql = { driver = "SQLite3", database = "prosody.sqlite" }.

mod_storage_sql: Fixed a typo.

mod_storage_sql: Initial commit of new SQL data driver.

storagemanager: Hook "host-activated", to make sure we are notified about data drivers.

storagemanager: Fixed a nil global access.

util.stanza: Change get_error() to return nil rather than '' for no text

mod_bosh: Fixes to the session creation response - add mandatory 'wait' attribute, remove optional 'maxpause' which we don't support, and reformat the code to prevent long lines and wacky indentation. Fixes #219.

prosodyctl: Make the 'restart' command start Prosody even if it wasn't already running

util.datamanager: Return an error string when pcall fails on a loaded list file.

util.datamanager: When failing to load a list file, and the file exists, log an error, and return nil, error.

usermanager: Removed redundant import of util.datamanager and util.hashes.

util.ztact: Removed.

net.dns: Removed dependency on util.ztact by moving ztact.get/set in.

mod_console: Removed redundant code for host:activate() and host:deactivate(), now that hostmanager has error checking.

hostmanager: Improved error handling.

hostmanager: deactivate() now returns true on success.

hostmanager: activate() now gets the host config from configmanager when a config isn't given.

certs/Makefile: Remove -c flag to chmod, which appears to be a GNUism (thanks Kev)

prosody: Don't attempt to load core.xmlhandlers in the main file. It no longer exists.

xmlhandlers: DELETED.

util.prosodyctl: Prep JIDs before checking whether they exist (thanks tja)

tools/xep227toprosody.lua: Rename ns_xep227 to xmlns_xep227 for consistency with main Prosody code

tools/xep227toprosody.lua: Convert to use util.xmppstream

util.xmppstream: Expose ns_separator and ns_pattern

mod_bosh: Switch to util.xmppstream from xmlhandlers

xmppcomponent_listener: Switch to util.xmppstream from xmlhandlers

prosody: Added a stub implementation of core.componentmanager to the package.loaded table (re-commiting, as this was accidentally removed).

certs/openssl.cnf: Change countryName from UK to GB

certs/Makefile: Add .PRECIOUS to stop make deleting the key as an intermediate file (thanks deryni/Zash)

Merge with Zash

certs: Add a default OpenSSL configuration file, and a Makefile.

mod_pubsub: Ensure <item> is in correct scope when broadcasting an event

mod_pubsub: Support item retraction

mod_pubsub, util.pubsub: Support for unsubscribing

mod_pubsub: Use pubsub_error_reply everywhere

util.xmppstream: Fix logger name.

mod_disco: Don't add caps hash to stream features on unauthenticated connections.

mod_proxy65: Add service discovery identity and feature, to help out mod_disco when loaded on a normal host.

mod_proxy65: Cleaned up stanza processing a little.

mod_proxy65: s:len() -> #s.

mod_proxy65: Make some globals local.

mod_proxy65: :sub(n):byte() -> :byte(n).

mod_proxy65: Allow loading on normal hosts.

mod_proxy65: Updated to use sub-events. Now only hooks what it needs to.

net.server_select: Set select() timeout to 3600 by default.

net.server_select: Made another global local.

net.server_select: Made some globals local.

mod_bosh: Use util.timer for timers instead of server.addtimer.

util.timer: Activate higher timer precision.

net.server_select: Make changes required for sub-second timer precision.

fallbacks/lxp.lua: CRLF -> LF.

fallbacks/lxp.lua: Pure Lua pseudo-XML parser. Implements the same API as LuaExpat.

mod_iq: Fix an extra character in previous commit...

mod_iq: Don't hook 'iq/full' on components.

modulemanager: Allow components to inherit mod_iq. This allows modules loaded on components to hook IQ stanza sub-events ("iq-set/bare/xmlns:tag", etc).

mod_proxy65: Give the 'iq/host' stanza handler a negative priority, to allow mod_iq to process the events first.

MUC: Give stanza handlers a negative priority, to allow mod_iq to process them first.

mod_component: Give stanza handlers a negative priority, to allow mod_iq to process them first.

mod_iq: Don't stop event dispatch for unhandled IQ errors and results (this lets negative priority handlers intercept the events).

mod_pubsub, util.pubsub: Support node creation

mod_console: Fix to import cert_verify_identity (util.certverification)

certmanager: Add required verify flags for cert verification if LuaSec (probably) supports them

mod_console: Add s2s:showcert() command to show the certificate for a domain

mod_pep: Remove PEP subscriptions on getting a presence unsubscribe.

mod_pep: Fixed regression where PEP messages were not correctly being broadcasted on caps hash change.

mod_pep: Fixed a nil access (thanks Zash).

mod_disco: Fixed: Service discovery features were not being removed on module unload (issue #205).

mod_pep: Optimised PEP requests for disco info on caps change (issue #150).

s2smanager: Check for getpeercertificate availability (for old LuaSecs)

storagemanager: Only show fallback warning if storage was configured to use another backend and it failed

storagemanager: Return driver from load_driver() if successful

Merge with trunk

mod_iq: Optimized a bit more (fewer table accesses).

mod_iq: Optimized a bit (fewer table accesses).

mod_iq: Extra IQ get and set sub-events are now fired: "iq-{get,set}/{host,self,bare}/xmlns:tag" (when "iq/{host,self,bare}/xmlns:tag" is unhandled).

storagemanager: Import type()

storagemanager: Import util.multitable again

storagemanager: Fix syntax error

Merge darkrain->trunk

mod_pep: Updated disco#info result handler to use new event name format.

mod_iq: IQ error and result sub-events are now "iq-{error,result}/{host,self,bare}/id" (previously "iq/{host,self,bare}/id").

mod_console: Denote services whose identity matches their (valid/trusted) certificate as 'secure'

s2s: SASL EXTERNAL

s2smanager: Compatibility hack for when not using dialback

net.server_event: API parity with net.server_socket

Rename storage/mod_ejabberd to mod_storage_sql_ejabberd. Also rename configuration option. Untested.

storage/mod_storage: Remove, obsolete

storagemanager: Much refactoring and renaming of options. Untested, needs storage plugin(s) to be brought into line.

util.datetime: Fix so that the timestamp returned is always in UTC, timezone offsets were going in the wrong direction

util.datetime: Fixes for more liberal timezone parsing - colon and minutes are both (independantly) optional (thanks Zash)

mod_pubsub, util.pubsub: Support for fetching items

util.template: Don't add stanza.last_add. 20% faster.

tests/test_util_stanza.lua: Allow stanza.last_add to be nil.

util.stanza, util.xmppstream, core.xmlhandlers: Allow stanza.last_add to be nil, and set it nil by default. Saves a table allocation per-element. 20% faster stanza building.

util.template: Rewritten to be much faster than the util.stanza stanza building API.

.hgignore: Ignore *.diff.

.hgignore: Ignore Windows compilation artifacts.

net.xmpp{client,server,component}_listener: s/xml-not-well-formed/not-well-formed/ as per latest bis drafts.

util.xmppstream: Preserve the stream content namespace on descendents of elements which are in another namespace.

MUC: Include the user's current presence contents when broadcasting a role change.

MUC: Include the user's current presence contents when broadcasting an affiliation change.

prosodyctl: Give hosts type = 'local'

MUC: Change room name and description properly

MUC: Fixed: Variable referencing the host session wasn't initialized.

prosodyctl, util.prosodyctl: Show error when mod_posix is not enabled and an attempt is made to query Prosody's status (thanks stever)

util.pubsub: Add :get_subscription() to return the current subscription for a JID, if any

util.filters: Support for 'filter hooks' that get called when a session is initialized for filters

Merge backout

Backed out changeset bfc47564aaef (No need for _M with module.environment)

mod_pubsub: Use module.environment to reference the module's environment

mod_pubsub: Expose 'service'

modulemanager: Inside plugins, have global _M as a reference to the module's environment

mod_pubsub: It's aliiiive!

mod_component: Logging tweaks.

mod_component: Use module:get_option() instead of configmanager.

mod_component: Rearranged the code a little.

mod_component: Return true from stanza handler to indicate that we actually did handle the stanza.

mod_console: Don't allow bang bang as the first command in a session, or when the last command is unknown (fixes #218)

configmanager: Change parser API again to pass a config table to insert settings to. Fixes Include(). (Thanks Zash/answerman)

usermanager: Don't load auth modules for components.

MUC: Grant membership when inviteing someone into a members-only room.

configmanager: Update Include and RunScript directives to support paths relative to the (current!) config file

prosody, configmanager, certmanager: Relocate prosody.resolve_relative_path() to configmanager, and update certmanager (the only user of this function)

modulemanager, usermanager: Removed hooks for the 'component-activated' event (components now fire 'host-activated').

mod_proxy65: Use module:get_option() instead of configmanager.

componentmanager: Removed.

prosody: Added a stub implementation of core.componentmanager to the package.loaded table.

prosody: Removed all references to componentmanager from Prosody, except the main componentmanager file.

componentmanager: Removed most of the code. Stub implementations of register_component and deregister_component remain.

componentmanager: Removed get_children(host).

hostmanager: Don't include hosts with '@' or '/' in the name in the get_children(host) result.

mod_disco: Updated to use hostmanager.get_children instead of componentmanager.get_children.

hostmanager: Added function get_children(host) which copies componentmanager.get_children(host).

modulemanager: Return an error when loading a module on a non-existent host, don't create the host. Removes dependecy on componentmanager.

hostmanager, componentmanager: hostmanager now handles component initialization at server start, not componentmanager.

modulemanager: load_modules_for_host(): For components, the inherited modules are the intersection of the inheritable and global modules lists, not the difference.

modulemanager: load_modules_for_host(): Inherit 'tls' and 'dialback' from global modules list for components, and load the component module. Also refactored to use util.set.

hostmanager: Added support for components to hostmanager.activate().

MUC: Only send status code 110 (entering non-anonymous room) to the occupant themselves, not to other occupants.

MUC: Added some more missing :up()s to the stanza building for presence broadcasts (thanks again Zash).

MUC: Parse submitted form with util.dataforms

MUC: Added a missing :up() to the stanza building for presence broadcast (thanks Zash).

MUC: Return true from the stanza handler to suppress error responses.

modulemanager: Fixed: Locally defined pcall wasn't returning return values of the called function.

componentmanager, hostmanager, modulemanager, mod_component: Got rid of the useless hosts[*].connected property.

componentmanager, stanza_router: Get rid of componentmanager.handle_stanza().

prosody: Ensure componentmanager is loaded in the main file.

componentmanager: Removed SSL context creation (mod_tls handles that now).

mod_tls: Let hosts without an 'ssl' option inherit it from their parent hosts.

net.xmppcomponent_listener: Removed unnecessary and problematic cleanup code.

mod_component: Updated to use events for hooking stanzas instead of the component stanza handler, and the on_destroy callback.

MUC: Handle missing <value/> for <field type='boolean'/> in config form submissions.

mod_component: Send back a <conflict/> stream error when multiple sessions attempt to bind.

net.xmppcomponent_listener: Call session:on_destroy() on session disconnect.

MUC: Preserve the global rooms table through reloads.

MUC: Expose the rooms table as a global 'rooms'.

MUC: Allow restricting room creation to local JIDs (thanks thomas.mangin).

mod_tls: Pass the hostname rather than host session to certmanager.create_context() (thanks darkrain)

configmanager: Atomic reloads, and some other internal changes to achieve this

mod_disco: Renamed the 'session' property of the account-disco-info and account-disco-items events to 'origin' for consistency.

certmanager, hostmanager, mod_tls: Move responsibility for creating per-host SSL contexts to mod_tls, meaning reloading certs is now as trivial as reloading mod_tls

util.httpstream: Added support for chunked transfer encoding.

net.http: Removed old HTTP parser, and updated to use util.httpstream.

util.httpstream: Fixed a possible string to number comparison error.

util.httpstream: Don't attempt to read response body for HEAD requests, or when status code indicates no body is present.

util.httpstream: Added support for an options callback, to allow passing per-message options to the parser.

util.httpstream: A little refactoring of the coroutine control flow.

util.httpstream: Added support for HTTP response parsing.

util.httpstream: Fixed a nil variable access introduced in the last commit.

util.httpstream: Move HTTP header parsing into its own function.

componentmanager: Removed unused function set_component_handler.

MUC: Use events for hooking stanzas instead of the component stanza handler.

mod_proxy65: Removed useless checks from the event handler.

mod_proxy65: Use "iq/host" event for hooking stanzas instead of the component stanza handler.

mod_console: Keep global variable assignments sandboxed by default.

util.logger: Remove support for a global writer (setwriter) to try and balance the forces...

mod_posix: Remove redundant import of logger.setwriter()

util.logger: Remove my precious premature optimisation :(

mod_saslauth: Allow restarting SASL negotiation from scratch.

mod_saslauth: Separated processing of <auth/> and <response/> elements, and return proper error on out-of-order <response/> elements.

mod_saslauth: Moved SASL mechanism selection and CDATA handling into separate functions.

util.sasl, util.sasl_cyrus: Mechanism selection cleaned up to be more consistent.

util.sasl, util.sasl_cyrus: Load mechanisms list early rather than lazily, as they are always loaded anyway.

mod_saslauth: Handle SASL <abort/> properly.

componentmanager: Removed an unused third parameter from the register_component function.

util.template: Optimized to be almost as fast as manual stanza building.

util.template: Initial commit. A template library for XML stanzas.

net.dns: Fixed a traceback when util/windows.dll is unavailable on windows.

net.server_select: Restore real sendbuffer() before calling onconnect handler, in case onconnect sends data and the socket is still writeable (causing stack overflow into sendbuffer()/onconnect())

mod_bosh: Don't add a Content-Type header to the HTTP OPTIONS reply.

ejabberdsql2prosody: Added a global 'prosody' table to fix a traceback.

Monster whitespace commit (beware the whitespace monster).

modulemanager, stanza_router: Moved modulemanager.handle_stanza to stanza_router, as a local function handle_unhandled_stanza. modulemanager is no longer a dependency of stanza_router.

modulemanager: Removed another legacy events API (add_event_hook), and related code.

mod_posix: Updated to use the new events API.

modulemanager: Removed legacy events API, and related code.

mod_saslauth: Updated to use the new events API.

mod_dialback: Fixed indentation.

mod_dialback: Updated to use the new events API.

mod_compression: Updated to use the new events API.

mod_component: Updated to use the new events API.

modulemanager: Removed add_iq_handler() from the plugin API.

mod_register: Updated to use the new events API.

mod_legacyauth: Limit authentication to unauthenticated client connections.

mod_legacyauth: Updated to use the new events API.

mod_roster: Cleaned up some unused variables and global accesses.

mod_roster: Updated to use the new events API.

mod_saslauth: Improved logging a bit.

mod_saslauth: Updated to use the new events API.

mod_private: Updated to use the new events API. Smaller, more robust.

Merge hoelzro->trunk

Alter mod_offline to respect negative priority resources

Merge hoelzro->trunk

Don't send offline messages to resource with negative priorities

MUC: Use util.dataforms to generate forms

MUC: fix timezone support when sending history

configmanager: Allow VirtualHost/Component definitions to be followed by a table of config options

core.loggingmanager: Logging config simplification - allow [level] = filename and *sink to appear in the config table

net.dns: Support for parsing PTR records

net.dns: Add 'force' parameter to resolver:feed() to force decoding a packet even if it doesn't match an outstanding request

mod_adhoc: Answer disco#info for node=xmlns_cmd

MUC: Make the room node be the default room name (thanks Zash).

Merge with trunk.

MUC: Added a 'Description' property (muc#roomconfig_roomdesc)

MUC: Added a 'Name' property (muc#roomconfig_roomname)

MUC: Fixed traceback on presence errors lacking a condition.

net.xmppcomponent_listener: Fixed a possible traceback in component disconnect handling.

net.xmppcomponent_listener: Specify missing log level for a log statement.

net.xmppcomponent_listener, mod_component: Removed useless undocumented option 'component_address'.

util.stanza: Make the current element <message> instead of <body> when body text is passed to st.message().

util.events: Event handler indices are now built lazily (faster server startup for large number of hosts).

util.events: Create new index on handler change instead of modifying existing one (this makes util.events fully reentrant).

util.events: Fixed the exposed API for adding/removing sets of event handlers.

util.events: Removed dispatcher creation functions (these weren't being used).

net.httpserver: Removed old HTTP parser, and updated to use util.httpstream.

util.httpstream: Refactored and simplified code to improve readability.

util.httpstream: Removed unused variables.

util.httpstream: Initial commit of the new HTTP parser.

prosody.cfg.lua.dist: Small wording fix in comment (thanks darkrain)

mod_bosh: Fix traceback when initiating a BOSH session to an unknown host

net.server_select: Add server.step() to run through a single iteration of the event loop

prosody.cfg.lua.dist: Add mod_adhoc and mod_admin_adhoc to the default config

s2smanager: Don't fire s2sin-destroyed for sessions that were never fully established (thanks Thomas)

s2smanager: Fire s2s{in,out}-destroyed when s2s connections are destroyed

mod_admin_adhoc: New module with merged functonality of mod_adhoc_cmd_admin and mod_adhoc_cmd_modules (of prosody-modules fame)

mod_ping: Add ad-hoc command

mod_adhoc: remove 0.7 compat code

mod_adhoc: Fix passing data to util.dataforms

mod_version: Use pposix.uname() if available and os_version_command not set

util.pposix: uname(): Fix to push nil,err in case of error

util.pposix: Add pposix.uname(), bump version

util.jid: Fix parsing of JIDs with no nodepart and an @ in the resourcepart (thanks seth)

tests/test_util_jid.lua: Add more tests for JID splitting

util.stanza: stanza:matched_children() -> stanza:matching_tags()

util.stanza: Add stanza:maptags() to apply a function over child tags (return nil to remove tag from stanza)

s2smanager: Fire s2s{in,out}-established when new s2s connections are ready

util.stanza: Optimisation, remove useless if...then in stanza:children() iterator

util.stanza: Add stanza:matched_children(name, xmlns) [name suggestions welcome]

net.httpserver: Join multiple headers with the same name as per RFC (thanks darkhippo)

mod_bosh: Support for reading the client's real IP through HTTP proxies from X-Forwarded-For

util.pposix, prosodyctl, mod_posix: Add initgroups() function, and bump module version. prosodyctl inits groups with the groups of prosody_user. (thanks dbb)

net.http: Add http.formencode() for www-form-urlencoded from an array of fields (thanks dersd)

componentmanager: Relocate disallow_s2s to its correct position (thanks darkhoptipomatus)

mod_saslauth, mod_auth_cyrus, util.sasl_cyrus: Moved cyrus account provisioning check out of mod_saslauth.

util.sasl_cyrus: Spaces -> tabs.

usermanager: Get rid unused Cyrus SASL related code.

mod_auth_internal_plain: Get rid of all checks for Cyrus SASL.

mod_saslauth: Get rid of the sasl_backend option (use auth modules instead).

mod_saslauth: Get rid of most Cyrus SASL related code (use authentication='cyrus' instead).

componentmanager: Support the 'disallow_s2s' option for components too (thanks darkhopatomopus)

net.server: Don't load configmanager if not running inside Prosody, assume server_select

mod_bosh: Don't adjust rid when creating a session, as this is no longer necessary and causes a log message ('rid too large') to be erroneously printed, fixes #203

sessionmanager, s2smanager: Give resting sessions a pass-through filter, fixes #202

net.server_select, net.server_event: Remove set_mode() call from server.link()... it can cause the last chunk of data to be discarded if shorter than buffersize (thanks to Zash for the debugging)

mod_adhoc: Answer disco#info (This is a MUST in XEP-0050)

mod_adhoc: Code restructuring

util.logger: Remove support for the 'log_sources' option, to remove a dependency on configmanager. I think the equivalent of log_sources can be done with the advanced logging config.

mod_auth_internal_hashed: Fix deleting users

mod_privacy: Fix typo causing <active/> to never be send

mod_console: Add host:* commands to help (thanks Zash)

tests/test_util_jid.lua: Better formatting, comments, and stop giving 5 arguments to a 4-argument function (thanks Asterix :) )

mod_bosh: Fix to properly ignore repeated requests

mod_bosh: Small change to use variable instead of hard-coded xmlns

mod_bosh: Much improve session:close() for BOSH sessions, so it now matches in usage normal session:close()

mod_bosh: Add error callback for xmlhandlers, to handle the case of invalid or unusable XML in the request payload

MUC: Fixed: Unavilable presence was not being broadcasted for banned users in some cases (thanks Zash).

MUC: Return correct error to non-members attempting to enter a members-only room.

util.xmppstream: Removed some useless property assignments.

util.sasl_cyrus: Make multi-step SASL mechanisms work correctly.

util.sasl: Simplified some code a bit.

util.sasl, util.sasl_cyrus: Removed a ton of unused variables.

eventmanager: REMOVE!!!

mod_bosh: Remove dependency on eventmanager

loggingmanager: Remove (redundant!) dependency on eventmanager

sessionmanager: Remove dependency on eventmanager

s2smanager: Remove dependency on eventmanager

componentmanager: Remove dependency on eventmanager

hostmanager: Remove dependency on eventmanager

modulemanager: Remove dependency on eventmanager

s2smanager: brackets, just to be sure :)

s2smanager: Only bounce real stanzas on s2s failure, not dialback and friends (thanks elghinn)

util.datetime: Added implementation for function parse().

storage/mod_ejabberd: Reorganized some code.

util.sasl_cyrus: Cleanup.

util.sasl: Removed method:forbidden() and its side effects.

util.sasl_cyrus: Removed method:forbidden().

mod_auth_*: Fixed copyright headers.

util.xmppstream: Add set_session() method to change the session that a stream is associated with

net.xmppclient_listener: Add associate_session(conn, session) to change the session a connection is associated with

net.server_event: Remove some debug messages

mod_version: Leave out the os element if hide_os_type is set

mod_version: Make the command used to get OS version configurable

usermanager: Fix two nil global accesses

mod_saslauth: Fixed a nil global access.

mod_saslauth: Check for unencrypted PLAIN auth in mod_saslauth instead of the SASL handler (makes it work for Cyrus SASL).

mod_saslauth: Move mandatory encryption enforcement to before sasl_handler:select().

storage/mod_ejabberd (and associated library): Initial commit.

storage/mod_xep0227: Initial commit.

prosody: Enable storage manager.

prosody.cfg.lua.dist: Fixed trailing whitespace.

util.pluginloader: Remove useless datamanager dependency.

util.pluginloader: Fix loading of plugins, plugin libraries and resources in subfolders (e.g., when loading 'a/b', load 'a/mod_b.lua', and not 'mod_a/b.lua').

util.roster: Remove, not going this route now

mod_message: Discard headline messages sent to offline full JIDs (to follow latest spec updates).

mod_console: Override dofile() in the console environment (this lets print() print to the console session for example).

tests: Added tests for util.sasl.scram.Hi().

util.sasl.scram: Made function Hi public.

mod_console: Added support for multiple arguments to print().

storagemanager: Fixed a nil access.

prosody.resolve_relative_path: Updated to take a parent path to resolve against.

storagemanager: Initial commit.

Merge 0.7->trunk

certmanager: Don't disable LuaSec and future cert loading on failure, and add error messages to the no LuaSec/config cases (thanks Jakob)

net.server_select: Remove 'now' parameter from starttls(), and base it on whether the sendbuffer is empty instead

mod_tls: Remove extraneous flag to starttls() for s2sout connecections

net.server_event: Fix to not call onconnect a second time after the SSL handshake for starttls connections (thanks Flo)

usermanager, mod_auth_internal_hashed, mod_legacyauth: New order of parameters for usermanager.test_password - username, host, password

mod_register: Drop useless depencency on datamanager.

MUC: Store the nick (full room JID) which set the subject, and send subject to occupants from that JID.

util.iterators: Add skip() to skip the first n items of an iterator

mod_saslauth: Got rid of undocumented and useless 'sasl_realm' config option (was only used for anonymous auth, and that didn't make sense).

Merge with trunk.

mod_auth_internal_hashed: Fixed SCRAM-SHA-1 mechanism to not traceback on non-existent users.

MUC: No need to call is_admin twice now, global admins are admins on hosts

net.server_event: Remove debug logging from dummy onstatus handler

mod_saslauth: Cleaned up unused requires.

mod_saslauth: A little cleanup for anonymous_login.

configmanager: Remove dependency on eventmanager, and global 'prosody' object

s2smanager: Handle disallow_s2s for incoming streams as well as outgoing

net.server_select: Ensure that onconnect is called for server sockets as well as clients, rather than onincoming. Fixes mod_console traceback, issue #197

Merge Florob->trunk

util.dataforms: Add list-multi support

util.dataforms: Capability to set default for list-single

Merge Zash->trunk

mod_proxy65: Use util.jid.compare() and remove some clutter

Merge Zash->trunk

util.jid: compare() added, with some tests.

util.sasl.scram: Reference actual RFC instead of the draft.

util.sasl, util.sasl_cyrus: s/self.mechanisms()/self:mechanisms()/ in method:select().

Merge with backout

Backed out changeset 598c33a99a31 (already fixed a better way)

certmanager: Fix to handle the case of no SSL configuration at all

certmanager: Added copyright header.

certmanager: Defined default_capath to prevent a global nil access.

certmanager: Use an empty table as the default ssl config when a global 'ssl' config option isn't specified (fixes a top-level traceback on startup).

util.sasl, util.sasl_cyrus: Use method:mechanisms() in method:select(), instead of using the mechanisms list directly (fixes a traceback).

util.sasl, util.sasl_cyrus: Updated method:mechanisms() to cache and re-use list of mechanisms.

util.sasl: Use the proper session-specific table of mechanisms when selecting a mechanism, and not the global table.

SASL: Simplified sasl_handler:mechanisms() to return a set, and not an array.

usermanager: Return a non-nil SASL handler from the null auth provider (fixes a traceback).

MUC: Fixed a traceback introduced in hg:bdc325ce9fbc.

net.dns: Call :cancel() on the current resolver instead of the prototype

util.roster: Initial skeleton commit

loggingmanager: Add reload_logging() method, which gets called on any config reload, to reset util.logger and remove and re-add all sink types to perform a full reload of the logging system without a restart.

util.logger: Add reset() method to clear all sinks

certmanager: Remove debug logging accidentally committed

certmanager: Adjust paths of SSL key/certs to be relative to the config file, fixes #147

prosody: Add prosody.resolve_relative_path() helper to change relative paths to be relative to the config file

mod_httpserver: Serve index.html if a request is made for a directory and it contains one (thanks Brian Cully)

configure: Make it possible to override ostype presets with values specified later on the command-line

configure: Fix ostype=freebsd for ./configure (thanks dersd for reporting and n0nsense for testing the fix!)

mod_saslauth: Rename variable 'aret' to 'ok' as per convention

mod_disco: Reflect requested 'node' attribute in the disco#info reply.

mod_disco: Respond to disco#info to the correct caps hash node ("node#ver").

mod_disco: Cache disco#info reply and caps hash for host, return correct caps hash, and respond to disco#info to the caps hash node.

mod_adhoc: Add capability to pass data to forms

xmpp{client,server}_listener: Convert some calls to tail calls for efficiency

mod_pep: Use util.caps

mod_disco: Support for putting the server's caps hash in stream:features to allow the client to cache disco#info for the server instead of requesting it at each login.

util.caps: Entity capabilities hash generation (moved from mod_pep)

mod_posix: Some (perhaps temporary) changes to re-lock the pidfile after truncating, to avoid breaking prosodyctl

mod_posix: Truncate the pidfile before writing to ensure that we never overwrite with a PID shorter than the previous, and end with an invalid PID in the file.

prosodyctl: Warn and exit if any log files are not writeable, fixes #94

prosodyctl: Force log output always to the console instead of using the config, which avoids creating log files as the wrong user

prosodyctl: Remove warnings when using a non-standard auth provider, prosodyctl now works with any auth provider

mod_auth_internal, usermanager: Rename to mod_auth_internal_plain, and update usermanager to still use it as the default

mod_auth_internal, mod_auth_internal_hashed: Remove checking for nil or empty password and pretending it means the user doesn't exist. Hopefully with more success than Custer.

util-src/Makefile: Stop linking dynamic libraries to Lua, it isn't necessary as symbols are exported from the Lua binary (thanks deryni)

xmppserver_listener: Fix variable names I forgot to change in the last commit

xmpp{client,server}_listener: Put stanzas/in filtering code in the correct place to make it actually work :)

util.filters: Add newline at end of file

MUC: Make number of stored history messages configurable with option max_history_messages (thanks michal and others who requested)

s2smanager: Lower default DNS timeout to 15s (it's now a per-DNS-server timeout, rather than total timeout), use net.dns's new timeout system, and remove our custom timeout handlers

net.dns: Add dns.settimeout() to set the timeout for the default resolver

net.dns: Make timeout configurable (default 15s)

net.dns, net.adns: Update resolver:cancel() API so that a table doesn't need to be created for each cancellation internal to net.dns

net.dns, net.adns: Move coroutine-calling logic into resolver:cancel()

net.dns: Handle our own timeouts, including falling onto other servers in resolv.conf if necessary

mod_roster: Use value returned by pairs() during roster iteration to avoid dozens of wasteful table lookups

mod_bosh: Add jabber:client namespace to stanzas with no namespace

xmppcomponent_listener: Add log messages for when stanzas from components have invalid or missing to/from addresses

xmppcomponent_listener: Import jid_split to fix undefined global reference

mod_component: Read validate_from_addresses option from the config

Merge 0.7->trunk

mod_privacy: Add service discovery feature.

xmppcomponent_listener: Don't validate to/from on non-stanzas, fixes component auth.

xmppcomponent_listener: Validate to/from on components, fixes #104 and #162

Merge 0.7->trunk

mod_privacy: Return the correct item-not-found instead of bad-request when a non-existent list is activated by the client (thanks teo)

Merge 0.7->trunk

net.server_select: Clean up buffer and fire drained callback on successful write before we try and start TLS negotiation (if negotiation fails instantly then we can be left without a handler to use for cleanup) (thanks dersd)

net.server_select: Fix a snippet of code that was living at the wrong indentation level

s2smanager: Don't attempt to connect to a nil host (for whatever reason... invalid DNS record perhaps?) (thanks dersd)

s2smanager: Register outgoing connection with the connection listener only after initializing filters (thanks darkrain, dersd)

util.prosodyctl: Fixed host variables in user_exists.

configure: Add ostype preset for FreeBSD (thanks dersd and tobias (no, the other one))

Merge 0.7->trunk

Merge backout

Backed out changeset 454e1cf18daf (this isn't for debugging, it's to inform the user)

mod_register: Remove the offline store as a list (originally aa3725bbcde5 but missed in a merge)

Merge 0.7->trunk

mod_privacy: Treat stanzas with no 'to' address as going to the user's bare JID (thanks KSid)

util.sasl_cyrus: Return error strings using the new table mapping error codes to strings.

util.sasl_cyrus: Added a table mapping error codes to strings.

mod_register: Delete the offline store as a list, and delete the privacy store.

mod_register: Don't disable account before deleting it (unnecessary, and can cause problems).

mod_compression: Lowered a log level.

util.prosodyctl: Initialize the host's auth provider if necessary (thanks johnny, and all the other people whom this hindered :) )

usermanager: Expose host_handler() as initialize_host()

mod_auth_anonymous, mod_auth_cyrus: Removed unused variables.

mod_auth_anonymous, mod_auth_cyrus: Removed is_admin(), as usermanager already has a default.

mod_pep: Fixed a possible traceback during disco#items queries on a user's bare JID by remote users.

mod_auth_internal_hashed: Update TODO comments to COMPAT

mod_auth_internal_hashed: Remove far too many instances of inline hex conversion using gsub, which was creating useless closures and what-not

mod_auth_internal, mod_auth_internal_hashed: Remove is_admin method from providers

mod_adhoc: Update for new is_admin usage

usermanager: is_admin: Resume the old role of determining precisely whether a user is an admin for a given host (or a global admin) - auth providers checked for JIDs not listed in the config if they support it

util.signal: Moved a variable declaration to the top of a function, for ANSI C compliance.

util.signal: Removed #include <sys/param.h>, as it appears unnecessary.

util.signal: Make kill() available on OS X (thanks darkrain).

MUC: A little modification to improve code analysis.

MUC: Updated room:set_role() to use room:can_set_role().

MUC: Added room:can_set_role().

mod_announce: A little cleanup.

mod_storage: Make DBI a soft dependency, not a hard one.

mod_announce: Removed unused variables.

mod_announce: Changed a global variable to local.

util.signal: Make kill() available on OpenBSD, NetBSD (thanks Florob, filip).

prosody.cfg.lua.dist: Removed commented "defaultauth" from the modules_disabled list.

mod_auth_internal: Log as "auth_internal", not as "usermanager".

mod_auth_cyrus: Log as "auth_cyrus", not as "usermanager".

mod_auth_anonymous: Log as "auth_anonymous", not as "usermanager".

mod_auth_internal_hashed: Log as "auth_internal_hashed", not as "usermanager".

mod_auth_internal_hashed: Don't assume user doesn't exist if no recognizable authentication data is found.

mod_auth_internal_hashed: Removed all checks for Cyrus SASL.

commit d2fb8a5ff43fcf3e94e5e518aba175503590ecda

s2smanager: Fix logging for outgoing sessions to also log pre-filtered data

MUC: Added disco#info features to advertise room's anonymity status (muc_semianonymous or muc_nonanonymous).

MUC: Added disco#info features to advertise room's public status (muc_public or muc_hidden).

MUC: Updated code to use :set_hidden() and :is_hidden().

MUC: Added room:set_hidden(boolean) and room:is_hidden().

MUC: Added disco#info features to advertise room's persistence status (muc_persistent or muc_temporary).

MUC: Replaced direct access of room's internal persistence state with :set_persistent(boolean) and :is_persistent() in various functions.

MUC: Added room:set_persistent(boolean) and room:is_persistent().

MUC: Added disco#info features to advertise room's members-only status (muc_membersonly or muc_open).

MUC: Added a 'Make Room Members-Only?' field to the room config dialog.

MUC: Updated room:get_default_role() to not assign unaffiliated occupants a role in members-only rooms.

MUC: Added room:set_members_only(boolean) and room:is_members_only().

MUC: Added disco#info features to advertise room's moderation status (muc_moderated or muc_unmoderated).

MUC: Added a 'Make Room Moderated?' field to the room config dialog.

MUC: Updated room:get_default_role() to assign unaffiliated occupants a "visitor" role in moderated rooms.

MUC: Added room:set_moderated(boolean) and room:is_moderated().

MUC: Persist data in room:set_password() when called programmatically.

MUC: Added a password field to the room config dialog.

MUC: Include a <password/> element in invites from password protected rooms.

MUC: Added disco#info features to advertise room's password protection (muc_passwordprotected or muc_unsecured, depending on whether a password is set).

MUC: Added password checking on room join.

MUC: Added room:get_password() and room:set_password().

mod_auth_internal_hashed: Fixed a traceback in account creation.

Merge 0.7->trunk

Tagging 0.7.0 (again)

Merge 0.7->trunk

sessionmanager: Fixed a traceback on invalid usernames (typo in previous commit). 0.7.0

mod_saslauth: Return proper error on invalid usernames.

net.server_event: attemp to fix more spelling fail.

sessionmanager: Moved nodeprep to sessionmanager.make_authenticated.

mod_presence: Fixed a traceback on outgoing subscriptions from offline users.

Merge 0.7->trunk

prosodyctl, util.pluginloader: Remove support for storing plugins in the data store, and the addplugin command

mod_uptime: Add ad-hoc command

mod_adhoc: Scan through list of items on load, in case items have been added before we were loaded

mod_adhoc/adhoc.lib: Add copyright header

mod_adhoc/adhoc.lib: Handle errors according to XEP

mod_announce: Add ad-hoc command for sending announcements \o/

Merge 0.7->trunk

mod_compression: Move logging of compression/decompression errors to before the closing of the stream, to make logs a bit easier to follow

Tagging 0.7.0

s2smanager: Move 'sending' debug log message so that it sees the pre-filtered stanzas

mod_compression: Remove the unneccessary stream:reset() overloading, which was causing double decompression and c2s/s2s failures

mod_legacyauth: Fixed the ordering of parameters passed to usermanager.test_password.

mod_privacy: Workaround for a traceback.

mod_adhoc: Imported from prosody-modules, thanks Florob!

mod_auth_internal{,_hashed}: Update is_admin to only report the admin status of the current host (ignores global admin rights), fixes global access traceback

usermanager: Handle checking for global admins on behalf of providers

mod_legacyauth: Use the new usermanager.test_password instead of usermanager.validate_credentials.

mod_auth_internal_hashed: Removed some useless code.

mod_presence: Fixed a traceback.

Merge with Tobias.

mod_auth_internal_hashed: Empty hashpass after conversion to stored_key/server_key and store new authentication database.

mod_auth_internal_hashed: Remove debugging output.

mod_auth_internal_hashed: Convert hashpass to server_key/stored_key on SCRAM-SHA-1 login.

mod_auth_internal_hashed: Convert hashpass to server_key/stored_key on PLAIN login.

Merge with tip.

mod_auth_internal_hashed: Coverting salted password to stored_key and server_key.

mod_auth_internal_hashed: Store stored_key and server_key when setting a password.

util.sasl.scram: Authenticate clients by calculated StoredKey instead of ClientProof.

mod_auth_internal_hashed: Store StoredKey and ServerKey instead of salted hashed password.

Fix missing parameter in mod_auth_internal_hashed.

Merge trunk/MattJ->trunk

mod_presence: Enable firing of pre-events for all outbound stanzas, and switching completely to core_post_stanza.

Merge 0.7->trunk

tools/xep227toprosody.lua: Set executable bit

mod_compression: Removed some useless logging code.

mod_announce: Fixed an edge case where non-admins attempting to announce would get two error replies.

Merge trunk/MattJ->trunk

mod_auth_cyrus: Auth provider with support for Cyrus SASL.

mod_auth_anonymous: Fixed a syntax error.

mod_auth_anonymous: Auth provider with support for SASL ANONYMOUS.

mod_auth_internal_hashed: Added SCRAM-SHA-1 support for SASL.

mod_saslauth: Updated to use usermanager.get_sasl_handler.

mod_auth_internal, mod_auth_internal_hashed: Fixed a global access.

mod_auth_internal, mod_auth_internal_hashed: Updated to provide get_sasl_handler.

usermanager: Changed get_supported_methods to get_sasl_handler.

Merge 0.7->trunk

util.sasl_cyrus: Log the textual representation of unknown Cyrus SASL errors, not just the error code.

util.sasl.scram: Fixed a log level.

mod_presence: Send unavailable presence in response to probes to the sender's full JID, not bare JID.

Merge with trunk.

mod_presence: Enable firing of pre-events for probes.

mod_presence: Don't stop pre-event for outgoing probes.

mod_presence: Small refactoring.

Rename mod_defaultauth -> mod_auth_internal, mod_hashpassauth -> mod_auth_internal_hashed, and the providers to internal and internal_hashed respectively. Also no longer auto-load defaultauth, but instead auto-load the plugin selected for each host at startup based on the provider name.

Merge trunk/MattJ with trunk

util.sasl_cyrus: Log the textual representation of unknown Cyrus SASL errors, not just the error code.

mod_presence: Send unavailable presence in response to probes to the sender's full JID, not bare JID.

SASL: Minor cleanup.

util.sasl.scram: Fixed a log level.

mod_presence: Removed unnecessary parameter 'core_route_stanza' from various functions.

mod_saslauth: Fix log level

usermanager: Rename the fallback provider from 'dummyauth' to 'null'

usermanager: Add hunk that got missed in a merge

util.sasl_cyrus: Log the textual representation of unknown Cyrus SASL errors, not just the error code.

mod_presence: Send unavailable presence in response to probes to the sender's full JID, not bare JID.

SASL: Minor cleanup.

util.sasl.scram: Fixed a log level.

mod_presence: Removed unnecessary parameter 'core_route_stanza' from various functions.

Add jid support for motd

Add motd plugin, giving text to a user on each login.

Add the ability to have names in group files, by putting them with an = sign after the jid:

Correct out of order logic in mod_hashpassauth

Add mechanism for upgrading to hashed passwords from default. Remove some extra debug.

Have defaultauth load by default

Check in mod_hashpassauth -- works!

Working defaultauth

Added mod_auth_default

Update usermanager to not crash, etc.

First bit of work

Merge backout

Backed out changeset 8bd3857a75ee

Merge 0.7->trunk

s2smanager: Remove potentially misleading log message (thanks albert)

Merge 0.7->trunk

net.server_event: Also return the socket from wrapclient, to maintain compatibility with server_select (thanks uhoreg)

mod_compression: Use filters! \o/

xmppserver_listener: Add filters for incoming bytes and stanzas

s2smanager: Add filters for outgoing bytes and stanzas

sessionmanager: Rename filters_initialize->initialize_filters

xmppclient_listener: Add filters for incoming bytes and stanzas

sessionmanager: Initialize new sessions for filtering, and add filters for outgoing bytes and stanzas

util.filters: Ensure initialize() never initializes an object twice - and return the filter function to the caller

xmppserver_listener: Port to util.xmppstream \o/

util.filters: Break processing if a filterer returns nil

util.filters: Don't traceback with no filters of a type added

net.multiplex_listener: Test to make sure listener.onconnect isn't nil.

net.multiplex_listener: Call listener.onconnect(conn) when swapping listeners.

xmppclient_listener: Port to onconnect handler

util.filters: Don't traceback when trying to remove a filter from an uninitialized object

util.filters: Expose the initialization function

util.filters: New utility library for managing filters on an object

mod_pep: Corrected and optimized handling of non-available presence stanzas.

mod_iq: Removed a check for user existance when firing iq/bare/* sub-events.

mod_pep: Use is_contact_subscribed (which uses the new rostermanager fix to avoid unnecessary roster loads)

rostermanager: Optimisation to avoid unnecessarily loading rosters for offline contacts on probes, etc.

Merge compression fix

mod_compression: Update for new session.data() syntax, fixes invalid XML errors after compression negotiation (thanks hg bisect)

Merge 0.7->trunk

mod_groups: Check for existence of roster[false] before clearing version (thanks Flo)

Merge 0.7->trunk

util.sasl.scram: Fix remaining - in profile name

util.sasl.*: Adjusting authentication provider names. All '-' replaced with '_'

Merge trunk/Tobias->trunk

util.sasl.*: Adjusting authentication provider names. All '-' replaced with '_'

Merge 0.7->trunk

util.sasl.scram: Fixing logic error in argument checking.

util.sasl.scram: Fixing logic error in argument checking.

Merge 0.7->trunk

Merge 0.7/waqas->0.7/MattJ

mod_private: Detect datamanager read errors, and respond with 'internal-server-error'.

usermanager: Take datamanager errors into account when determining account existance.

mod_presence: Don't send 'unsubscribed' in response to probes when roster loading fails.

rostermanager: Return an error string when subscription test fails due to an error.

rostermanager: Mark rosters which fail to load as broken, and never save them.

mod_presence: Removed a useless check when handling incoming presence probes and subscriptions.

util.datamanager: Return an error string when failing to save.

util.sasl.scram: Adjusting authentication backend name to conform with the style already used by the plain module.

util.sasl.scram: Fixing issue #177.

util.sasl.plain: Typo.

util.sasl.scram: Providing an API function to generate a salted password for the SCRAM-SHA-1 mechanism.

util.sasl.scram: Split up long line.

util.sasl.scram: Parsing client-final-message in a more strict way. (thanks Marc Santamaria)

util.sasl.scram: Fix in nonce check of client-final-message.

util.sasl.scram: Parsing client-first-message in a more strict way. (thanks Marc Santamaria)

util.sasl.scram: Check nonce in client final message. Check channel binding flag in client first message. Adding some TODOs on more strict parsing. (thanks Marc Santamaria)

util.sasl.scram: Fixed global access.

util.sasl.scram: Adding documentation on SCRAM authentication backend.

util.sasl: Abstracting out the hash function used since SCRAM is independent of it. Adding scram-{mech} authentication backend support.

util.sasl.plain: Removing plain_hashed authentication provider. Just do hashing and comparison yourself in a plain_test authentication provider.

util.sasl: 2009 -> 2010 in copyright header.

util.sasl.plain: Adding plain_hashed authentication backend support.

util.sasl: Moving SASL authentication backends documentation to the mechanism files.

rostermanager: Correctly clear the bare_sessions table on roster load errors during bind.

rostermanager: Don't fire roster-load event if there was an error loading the roster

sessionmanager: Change error for reaching resource limit from 'conflict' to 'resource-constraint' during session bind.

sessionmanager: If roster loading fails during resource bind, kick the user with an internal-server-error.

rostermanager: When loading the roster, also return a datamanager error if available.

util.datamanager: When failing to load a file, and the file exists, return nil, error.

mod_privacy: Improved logging.

mod_presence: Added option 'ignore_presence_priority'.

Merge with backout

Backed out changeset c75c22c316d6 (the XMPP spec now gives a better way to do this)

util.sasl.scram: Fixing issue #177.

util.sasl.plain: Typo.

util.sasl.scram: Providing an API function to generate a salted password for the SCRAM-SHA-1 mechanism.

util.sasl.scram: Split up long line.

util.sasl.scram: Parsing client-final-message in a more strict way. (thanks Marc Santamaria)

util.sasl.scram: Fix in nonce check of client-final-message.

util.sasl.scram: Parsing client-first-message in a more strict way. (thanks Marc Santamaria)

util.sasl.scram: Check nonce in client final message. Check channel binding flag in client first message. Adding some TODOs on more strict parsing. (thanks Marc Santamaria)

util.sasl.plain: Removing plain_hashed authentication provider. Just do hashing and comparison yourself in a plain_test authentication provider.

Merge 0.7->trunk

mod_bosh: Re-layout session object creation to make lines shorter

mod_bosh: Add option consider_bosh_secure to treat BOSH sessions as encrypted even if they don't use HTTP (useful for when secure requests are proxied to Prosody over HTTP)

mod_privacy: Fix several possible tracebacks when either the contact is a host JID, or the contact isn't in your roster and you have roster group/subscription rules in place

mod_privacy: Remove validation that checks a roster group you block actually exists - it would be time-consuming on large rosters, and isn't important (or correct?) anyway.

Merge 0.7->trunk

mod_saslauth: Split out cyrus SASL config options into locals, and add support for cyrus_application_name (default: 'prosody')

Merge 0.7->trunk

usermanager, mod_saslauth: Make account provisioning for Cyrus SASL optional (default: not required)

util.sasl_cyrus: Support for specifying the application name (to pass to Cyrus SASL's init())

mod_saslauth: Add return value and error message to the Cyrus SASL handle_status callback

mod_saslauth: Allow the Cyrus SASL realm to be configurable

Merge 0.7->trunk

net.dns: Remove redundant locals declaration

net.dns: Fix dns.lookup from commit e54774bd73a7

net.dns: Remove redundant locals declaration

net.dns: Fix dns.lookup from commit e54774bd73a7

Merge 0.7->trunk

mod_groups: Remove potentially verbose per-contact logging (thanks Flo)

usermanager: Changed auth provider functions to methods.

Merge 0.7->trunk

Merge 0.6->0.7

configure: Fix to allow option values containing '=' (thanks Jakub)

net/dns: Fix socket.select timeout.

Merge 0.7->trunk

Merge 0.6->0.7

net/httpserver_listener: Ignore empty strings on incoming data.

Merge 0.7->trunk

Merge 0.7/MattJ with 0.7

Merge with 0.6

mod_bosh: Always give requests a destroy handler, so that the management of each session's request array and the inactive_sessions logic can happen in one place. Simplifies everything and concludes this series of BOSH fixes.

mod_bosh: Fix handling of rids by not dropping requests with repeated rids (assign them their sid instead), and always starting a session with first_rid-1.

mod_bosh: Remove some hacky code for pruning dead requests that hopefully never gets executed - if it does there's a bug anyway.

mod_bosh: Remove requests from the session table using table.remove(), prevents the possibility of holes in the array.

prosodyctl: Support for the new usermanager, refactor host creation and fail if a host is not using the default authentication provider, for now. (thanks Nicola)

usermanager: Export new_default_provider()

usermanager: Handle auth providers for components.

usermanager: Fix logic for per-host admin tables (thanks Maranda)

net.xmppclient_listener: Port to util.xmppstream \o/

prosody: Load util.xmppstream :(

util.xmppstream: Stream objects now just have feed/reset methods

usermanager: Bump log level of incorrect config option warnings

usermanager: Fix for is_admin to work with the new auth provider architecture

Merge 0.7->trunk

Merge 0.6->0.7

mod_console: Set a chunk name for loadstring calls (nicer errors).

mod_posix: Fixed a global access.

mod_console: Ensure that a null byte is printed after sending the banner.

prosody: Modified function metatable for better string representation of functions.

prosody: Lowered log level for a log message.

mod_posix: Don't add a server-starting event handler while the server-starting event is being fired.

net.server_select: Remove some debugging code.

Merge 0.7->trunk

Merge 0.6->0.7

loggingmanager: Enable debug level for default console logging when 'debug' mode is enabled in the config.

loggingmanager: Enable debug level for default console logging when 'debug' mode is enabled in the config.

util.sasl.scram: Fixed global access.

prosodyctl: Use the global events objects for hosts (again) (thanks albert) (sorry albert)

prosodyctl: Give each host an independant events object, because it seems to be the right thing to do

prosodyctl: Relocate global prosody object creation (see fff153f7f4de)

Merge configmanager->trunk

configmanager: Add VirtualHost as an alias for Host (re-applied in trunk due to previous bad merge with 0.7)

Merge 0.7->trunk

mod_console: Make use of the new onconnect callback to initialise session and send banner

net.server_select: Fix typo affecting connections with an onconnect listener that have data pending in the sendbuffer

Merge 0.7->trunk

mod_proxy65: Send error reply to activation stanza if one or both parties were not connected to the proxy

mod_proxy65: Return service-unavailable error when receiving an iq we didn't understand

mod_proxy65: Use new server.link to link proxied connections, now works with either connection backend

net.server_select, net.server_event: Add server.link() to link 2 connections with an intermediate buffer of the specified size

net.server_select, net.server_event: Support for ondrain listener callback for when send buffer is empty

net.server_select, net.server_event: Rename :pattern() method to :set_mode() for select backend, and add :set_mode() to event backend

net.server_select, net.server_event: Support for :pause() and :resume() on connections

usermanager: Give the default auth provider a name, you'll never guess what it is.

Merge Tobias's fancy SASL branch->trunk

Merge with tip.

util.sasl: 2009 -> 2010 in copyright header.

util.sasl.scram: Adjusting authentication backend name to conform with the style already used by the plain module.

util.sasl.plain: Adding plain_hashed authentication backend support.

util.sasl.scram: Adding documentation on SCRAM authentication backend.

util.sasl.anonymous: Adding documentation on anonymous authentication backend.

util.sasl: Moving SASL authentication backends documentation to the mechanism files.

util.sasl: Abstracting out the hash function used since SCRAM is independent of it. Adding scram-{mech} authentication backend support.

Merge 0.7->trunk

net.server_event: Be sure to fire onincoming for backwards-compatibility with pre-onconnect listeners (thanks darkrain/mod_console)

usermanager: Support for pluggable authentication providers

eventmanager, prosody: Adapt eventmanager to use prosody.events, as a step towards removing it entirely

Merge 0.7->trunk (with MUC needing checking, waqas)

Merge 0.6 into 0.7.

Tagging 0.6.2

prosody.cfg.lua.dist: Refactor the default config file based on feedback from confused users 0.6.2

hostmanager: Re-word log messages in line with config changes

configmanager: Add VirtualHost as an alias for Host

MUC: Allow moderators which are not owners to change roles.

MUC: Include <status code='100'/> in a message, not in presence. Fixes various issues.

modulemanager: Log proper tracebacks on errors during module load/unload.

prosody: Set metatable on functions to allow easy access to upvalues.

configmanager: Fix very wacky indentation

configmanager: Fix some wacky indentation

Merge 0.7->trunk

net.server_event: Call listener.onconnect if it exists, otherwise stick to listener.onincoming

Merge 0.7->trunk

net.server_select: Support for listener.onconnect

Merge 0.7->trunk

Merge 0.6->0.7

net.server: Fix logic error causing traceback when receiving a non-number port

loggingmanager: Fix syntax error :)

Merge 0.7->trunk

util.timer: When using libevent hold onto the event handle to stop it being collected (and the timer stopping). Fixes BOSH ghosts, thanks Flo, niekie, waqas.

loggingmanager: Observe 'debug' config setting for console logging too

Merge 0.7->trunk

Merge 0.6->0.7

Merge 0.6/MattJ -> 0.6

mod_bosh: Default stanza namespace should be jabber:client (fixes BOSH to work with recent namespace fix)

util.ztact: Fixed global accesses.

util.uuid: Use a local instead of a global.

util.stanza: Fixed some more nil global accesses.

util.stanza: Fixed a nil global access.

Merge 0.7->trunk

Merge 0.7/waqas->0.7/MattJ

net.server_event: Fixed spelling fail.

Merge 0.6->0.7

xmppserver_listener: Compatibility fix for older Prosodies with the s2s xmlns bug

stanza_router, s2smanager, modulemanager: Fix for handling of the default namespace on stanzas, causing sometimes jabber:client to be sent over s2s, and accepted

Merge 0.7->trunk

tools/erlparse: Discard erlang PIDs instead of choking on them as a syntax error

tools/erlparse: Report the line number when showing a syntax error in the input file

tools/erlparse: Optimisations aplenty for faster processing of large files

Merge 0.7->trunk

tools/ejabberd2prosody: Create prosody singleton so datamanager can detect the platform (set no platform to use lfs, pposix isn't necessary here)

Merge 0.7->trunk

net.server_event: Don't re-try a write if the connection closed (thanks Flo)

Merge 0.7->trunk

net.server_event: Bump timeout values up somewhat

Merge 0.7->trunk

Merge 0.7/waqas->0.7/MattJ

util.sasl.digest-md5: Removed unnnecessary check (which included a nil global access).

mod_register: Use set_password to set passwords instead of create_user.

usermanager: Added function set_password.

Merge 0.6->0.7

mod_tls: Add s2s_allow_encryption option which, when set to false, disabled TLS for s2s

prosody.cfg.lua.dist: Whitespace fix.

prosody.cfg.lua.dist: Disable mod_privacy by default.

usermanager: Return sane errors/results when Cyrus SASL is in use.

mod_saslauth: Tidier code for SASL backend selection.

mod_saslauth: Fail with an error when the requested SASL backend cannot be used.

Merge 0.7->trunk

Merge 0.6->0.7

util.windows: Convert from Windows line endings

Update copyright headers for 2010

loggingmanager: Don't use non-standard format specifier to format the timestamp.

util.xmppstream: new() now returns a parser object

util.xmppstream: Initial commit

Merge 0.7->trunk

stanza_router: Don't send error replies for stanzas of type 'error' and 'result' on unbound authenticated connections. [originally fa84451e9b35 in 0.6]

stanza_router: Allow non-jabber:client elements after auth, before bind. [originally 2c538d4bde13 in 0.6]

Merge 0.7->trunk

sessionmanager, s2smanager: Add type of ?2s_destroyed to resting sessions (fixes a logging traceback, thanks Flo)

Merge 0.7->trunk

mod_groups: Ignore whitespace on group member JID lines (thanks Luis!)

mod_groups: Fixes to make compatible with roster versioning - set version to 'true' to indicate that the roster is not being versioned

mod_groups: Missed hunk from last commit, don't create the list of public group members unless necessary

mod_groups: Only create group lists when necessary (now we can reliably detect when a user is in /any/ group, including public ones)

rostermanager: Don't bump the roster version if it is == true (ie. we are not versioning the roster)

mod_roster: Tidier code for the roster versioning logic

mod_roster: Tidier code for the roster versioning logic

Merge 0.7->trunk

.hgignore: Ignore prosody.version (thanks Florob)

Merge 0.7->trunk

util.sasl_cyrus: Return invalid-mechanism instead of undefined-condition where appropriate

util.sasl_cyrus: Clarify some log messages and levels

util.sasl_cyrus: Protect the call to cyrussasl.server_new properly.

Merge 0.7->trunk

util.sasl_cyrus: If available, use a c14n callback for interoperability with bad clients.

mod_saslauth: Add a sasl_realm option

util.cyrus_sasl: Pass the realm to Cyrus

Merge darkrain->trunk

util.sasl_cyrus: If available, use a c14n callback for interoperability with bad clients.

mod_saslauth: Add a sasl_realm option

Merge 0.7->trunk

Merge 0.6->0.7

Merge 0.6 with waqas

mod_compression: Improved and lowered log level of some logged messages.

s2smanager: Remove the infamous 'as per RFC' log message entirely (it happens too often to be useful)

Merge with 0.7

Merge with 0.6 (into 0.7, namely mod_compression fixes)

mod_compression: Return <setup-failed/> instead of <unsupported-method/> where applicable.

mod_compression: More robust stanza processing.

mod_compression: Don't succeed after indicating a failure.

mod_compression: Don't tell client compression succeeded when it didn't.

mod_compression: Fixed various possible tracebacks in logging.

util.cyrus_sasl: Pass the realm to Cyrus

MUC: Added support for letting clients manage discussion history.

Merge with 0.7 (and indirectly 0.6.2)

Merge 0.6.2/waqas with 0.6.2/MattJ

Merge 0.6.2/waqas with 0.6.2/MattJ

stanza_router: Don't send error replies for stanzas of type 'error' and 'result' on unbound authenticated connections.

stanza_router: Allow non-jabber:client elements after auth, before bind.

Fixing some typos.

util.sasl.plain: Allow empty authzid (thanks bjc).

mod_tls: Don't offer TLS on hosts that don't have any certs

prosodyctl.man: Update email address

mod_console: Uncomment the help for server:shutdown() - thanks darkrain

ejabberd2prosody: Don't print passwords of imported accounts

ejabberdsql2prosody: Don't print password of imported accounts (thanks azerttyu)

mod_debug: Obsoleted by mod_console

mod_selftests: Obsolete, remove

mod_offline: Remove from 0.7 (offline messages are handled in core at the moment)

MUC: Allow role changes based on JIDs.

mod_presence: Reflect the user's own presence back to them.

configmanager: Remove debugging code accidentally committed

configmanager: Error when a component and host clash hostnames

mod_saslauth: Don't print raw SASL data to avoid logging passwords unnecessarily

prosody: More accurate friendly error message in the event that creating the global SSL context fails

sessionmanager, s2smanager: Fix for syntax of null_data_handler() (thanks Nolan)

sessionmanager, s2smanager: Give sessions dummy data handlers that log when data is received by a destroyed session

net.dns: Normalize records before placing them in the cache, fixes issues with CNAME targets in CAPS (fixes #161)

hostmanager: Log an error if no hosts are defined

mod_tls: Fixed an extra :up() in s2s stream feature generation.

mod_tls: Respond with proper error when TLS cannot be negotiated.

mod_presence: Don't depend on user being online when calculating top resources.

mod_presence: Don't depend on sessions array existing for a user when handling outgoing presence broadcast.

util.encodings: Use STD3 ASCII rules for idna.to_ascii.

prosody: Add a catch-all friendly message for when any port is in use we want to use

util.stanza: stanza.error_reply(): Fix to put the correct namespace on <text>

prosody: Show friendly error when no config present for legacy SSL ports

prosody: Log error message when failing to open ports

MUC: muc.lib.lua: Fix the sending of the occupant JID instead of the nick in role lists and presence broadcasts after role changes (thanks teo)

mod_presence: Quick fix to make probes from local users to local hosts work.

mod_presence: Added handler for presence subscriptions and probes to local hosts.

stanza_router: Added third parameter to core_post_stanza, to control pre-events.

mod_presence: Respond with an unavailable presence when subscribers probe and no resources are available.

prosody: Listen for component connections on port 5347 by default.

mod_component: Fix name of config option in error message (thanks nulani!)

util.dataforms: Add optional type parameters (defaults to 'form')

net.httpserver: More robust handling of headers split across multiple packets

net.httpserver: Make it possible to return responses with no body

net.httpserver: Close connection on invalid HTTP status line

mod_presence: Automatically deny presence requests for hosts, fixes traceback in #153

stanza_router: Log the name of unhandled stanzas (thanks bear)

sessionmanager: Added resource prepping, and invalid resource checking to the bind_resource function.

mod_register: Return a <not-acceptable/> error on empty usernames (thanks Neustradamus).

util.pposix: Fix return type of lc_abort to shush compiler warning

prosody.cfg.lua.dist: Remove lie about requiring console_enabled

modulemanager: Fire item-removed events on module unload.

prosody: Call tostring on the key being used for nil global read before concatenating it with a string.

prosody: Log a warning and traceback, but don't throw an error on nil global read.

Mainfile: Broke up a really long line.

mod_pep: Support item retrieval use cases

mod_pep: Allow storage of urn:xmpp:avatar:data node (payload only with base64 data)

util.stanza: Add stanza:get_child(name, xmlns) to find a child tag given a name/xmlns

tests: Add tests for util.jid.join()

util.jid: Add join(node, host, resource) function to join the components and return nil if invalid

MUC: Only allow moderators to change the room subject.

MUC: Prevent visitors from broadcasting messages.

MUC: Improved handling of incoming groupchat messages (state preserved for possible later use).

core.sessionmanager, net.*_listener: Remove the evil collectgarbage() calls

util.dependencies: Make the commands line up properly in the "missing dependency" output. Yes, this was the commit you didn't know you were waiting for!

mod_bosh: Don't log response XML

s2smanager: Use s2smanager log() if session doesn't have a logger (thanks Flo)

net.httpclient_listener: Don't notify request of closed connection if the close was initiated by us

util.signal: Using stdlib.h instead of malloc.h.

net.http: destroy_request(): Pass request.handler to disconnect() listener to fix small leak

net.http: Close connection when invalid status line is received from the server

net.http: Don't re-destroy a request when the connection is closed

net.http: Port commit 2f235c57d713 to net.http to fix headers in responses (thanks dersd)

README: Update URL for installation docs

HACKERS: Update

TODO: Update for the fact that 0.7 is done

TODO: Update

mod_tls: Set the sslctx on outgoing connections (possibly the cause of outgoing s2s connections not being encrypted)

s2smanager: Fix syntax error)

s2smanager: require_s2s_encryption -> s2s_require_encryption

s2smanager: Make require_s2s_encryption do what it says on the tin

prosodyctl: Fix to load LuaRocks 2.x if we have it

util.dependencies: Load luarocks.loader/luarocks.require

prosodyctl: Use mode r+ for opening the file so 1) it fails if the file doesn't exist 2) we have write access to lock it

mod_posix: Adjust file open mode depending on whether file exists (take that fopen designers!!!)

util.prosodyctl: Report Prosody as not running if the pidfile isn't locked

mod_posix: Lock pidfile when in use, shut down if we can't write or lock the pidfile

util.signal: Restore the old debug hook earlier, just in case we receive another signal between clearing the signal queue and restoring it

util.signal: Update version in header, and author's email

util.signal: Queue up multiple signals, instead of trampling on the previous debug hook (and never clearing our own)

prosody: net_activate_ports: Accept strings as well as numbers for specifying ports

net.dns: Make sure math.randomseed() gets passed an integer

s2smanager: Stamp a 'to' on the reply stream:stream. This makes prosody happy.

prosodyctl: Gracefully handle a missing stty command, and fall back to ANSI escape sequences

mod_httpserver: Rudimentary directory detection, return forbidden instead of causing a traceback (since commit 0325f241a26c)

mod_saslauth: Requiring c2s encryption means requiring c2s encryption... thanks Flo

s2smanager: Give reasons to destroy_session in more cases, including when DNS lookup fails

xmppserver_listener: When a connection fails, pass the reason to destroy_session

s2smanager: Have both destroy_session and bounce_sendq accept a reason string to include in bounced stanzas

s2smanager: Send reply stream header only after checking we serve this host (sorry darkrain... :) )

xmppserver_listener: Make log messages during SRV retries clearer

prosody: Fixed a possible nil concatenation.

net.http: Don't expect the body on redirects

mod_httpserver: Text files are text/plain, and not plain/text.

net.httpserver: Removed mime handling (now in mod_httpserver). Unknown dynamic content is now always served as text/html.

mod_httpserver: Removed a log message.

mod_httpserver: Read files in binary mode; fixes issues with serving binary files.

mod_httpserver: Skip returning a Content-Type when not known (application/octet-stream is not a correct default).

mod_httpserver: Return Content-Type header based on file extension.

util.signal: Make kill() available on Solaris; really fixes #136.

prosody: Less strict matching for the magic 'interrupted' error

componentmanager: Set ssl_ctx[_in] for components correctly, and use global SSL context if available

Disable SSLv2 by default, it's known to be insecure.

net.server_select: Restore checks for wantread/timeout errors on receive

net.server_select: Make bufferlen() method return, of all things, the buffer length

net.server_select: Fix possibility of losing data sent from a socket just before it closes (thanks Sjoerd Simons)

net.dns: Fix for blocking dns lookups to find waiting coroutines correctly (not that we use this in Prosody...)

net.dns: Port some DNS fixes to the resolver:feed() function for net.adns to use

net.httpserver: Quick fix to set the correct Content-Type on simple (string) responses, for a few known types

s2smanager: Don't tostring() the data before sending, sends2s already does this.

net.xmppcomponent_listener: Don't remove 'log' and 'close' from sessions when destroying, and set destroyed = true

net.xmppcomponent_listener: Log invalid XML received from components (as we already do for c2s/s2s)

net.xmppcomponent_listener: Don't allow closing a session that has already been destroyed

net.xmppcomponent_listener: Close component sessions on receiving a </stream:stream>

net.xmppcomponent_listener: Don't handle stream errors from component sessions that have already been destroyed

net.xmppcomponent_listener: Fix to correctly handle stream errors from components

net.xmppclient_listener: Fix to correctly handle stream errors from clients

sessionmanager: Don't re-destroy destroyed sessions

sessionmanager: Return stream error when incoming stream header is missing 'to' attribute

sessionmanager: Add close method to resting sessions

s2smanager: Don't re-destroy destroyed sessions

s2smanager: Add open_stream and close methods to resting sessions

sessionmanager, s2smanager: Close session on </stream:stream>

sessionmanager, s2smanager: Destroyed sessions are now simply resting (not dead) until they are collected - prevents a whole class of tracebacks

net.xmppserver_listener: Clarify log message (for nil/false)

Merge with trunk

mod_offline: Convert to Unix line endings.

Merge with 0.7

net.dns: Trailing whitespace

net.dns: More reliable parsing of resolv.conf - allow multiple nameserver IPs on one line (thanks dersd)

net.server_select: Fix for traceback when a read returns an error and no data (thanks dersd)

certmanager: Friendlier error reporting on OpenWRT and other cases where we don't understand the OpenSSL error

certmanager: Fix nil global access (thanks Marc)

Merge with 0.7

util.sasl: Fixed a nil global access.

util.stanza: Fixed nil global accesses.

certmanager: Fix global access

net.server_select: Fix typo

net.server_event: Fix some global accesses

Merge with 0.7

mod_proxy65: Fix for old-style closing of connections (another source of tracebacks with libevent enabled)

net.server_select: Fix calling method of some handler.close()s

Merge with 0.7

net.server_event: Improve and fix potential traceback in logging of new incoming connections

Merge with 0.7

mod_saslauth: Add FIXME to remind myself to fix this as soon as I have time

Merge with 0.7

Merge with 0.7/waqas

mod_saslauth: Unlock globals while loading cyrus

util.sasl_cyrus: Ensure the mechanisms table is available after a failed auth attempt.

Merge with 0.7

prosody: Bump log message describing current connection backend to level 'info'

Merge with 0.7

prosody.cfg.lua.dist: Fix missing quote in commented proxy config example

Merge with 0.7

Merge with 0.6

tests/test_core_s2smanager.lua: Fix to compare SRV weights correctly

s2smanager: Log and fail gracefully when unable to create socket for outgoing s2s connection (thanks foucault)

s2smanager: Fix for the logic SRV record priority comparison (thanks darkrain)

net.adns: Trailing whitespace

mod_vcard: Stricter matching of vcard stanzas with vcard_compatibility enabled, fixes intercepting stanzas to the full JID that it shouldn't

net.server_event: Add lock_read() method to connections

Merge with 0.7

prosodyctl: Fix addplugin to support --help, and hide from the help listing (for now)

prosodyctl: Fix 'restart' command to not report itself as the 'stop' command (thanks albert!)

Merge with 0.7

prosodyctl.man: Update email address

prosodyctl.man: Include new restart command

Merge with 0.7

mod_console: Uncomment the help for server:shutdown() - thanks darkrain

prosodyctl.man: Update email address

prosodyctl.man: Include new restart command

Merge with 0.7

prosodyctl: Add restart command for KSid and johnny :)

Merge with 0.7

prosody.cfg.lua.dist: Update config for 0.7, most improvements from the Arch Linux package by dbb, thanks!

ejabberd2prosody: Don't print passwords of imported accounts

Merge trunk with trunk

Merge with 0.7.

Merge 0.7 with 0.7 with trunk \o/

Merge 0.7 with 0.7

mod_iq: Fire sub-events for iq/self events.

stanza_router: Make sure /self events are fired when the 'to' attribute is missing.

Merge with 0.7

ejabberdsql2prosody: Don't print password of imported accounts (thanks azerttyu)

Merge with 0.7

mod_debug: Obsoleted by mod_console

mod_selftests: Obsolete, remove

mod_offline: Remove from 0.7 (offline messages are handled in core at the moment)

Backed out changeset e7b09424b486 (not removing mod_offline for trunk)

mod_offline: Remove from 0.7 (offline messages are handled in core at the moment)

mod_storage, plus a bit of SQL and XML.

Merge with 0.7

s2smanager: Use s2smanager log() if session doesn't have a logger (thanks Flo)

net.http: Update print()s to log()s - don't ask how this came to be, I have no idea :)

net.httpclient_listener: Don't notify request of closed connection if the close was initiated by us

net.http: destroy_request(): Remove update for new server API, pass request.handler instead of request.conn to ondisconnect

net.http: Close connection when invalid status line is received from the server

net.http: Don't re-destroy a request when the connection is closed

Merge with 0.7

net.http: Port commit 2f235c57d713 to net.http to fix headers in responses (thanks dersd)

Merge with 0.7

MUC: Allow role changes based on JIDs.

Merge with 0.7

README: Update URL for installation docs

HACKERS: Update

TODO: Update

Merge with 0.7

net.adns: Don't treat locally-initiated disconnects as fatal with libevent backend in use (thanks Flo)

net.server_event: Pass false as connection error to disconnect handler if close was initiated by us

modulemanager: Fix traceback on unloading global modules (thanks KSid)

MUC: Allow role changes based on JIDs.

Merge with 0.7

net.server_event: Increase SSL handshake timeout to 30s, make handshake round-trip count configurable, and bump connect timeout to 20s (thanks Flo)

Merge with 0.7

mod_tls: Only negotiate TLS on outgoing s2s connections if we have an SSL context (thanks Flo...)

Merge with 0.7

net.adns: Fix potential traceback on DNS responses with libevent enabled (thanks Flo)

Makefile: Remove fallbacks/

Makefile: Remove fallbacks/

prosody: Don't add fallbacks to package.path and package.cpath.

util.sasl.scram: Removed unnecessary dependency on bitlib.

mod_saslauth: Log debug message with full error if cyrussasl couldn't be loaded

mod_saslauth: Correct syntax for gracefully handling a missing cyrussasl library

net.server: Remove redundant commented code and some trailing whitespace

mod_presence: Added config option 'bare_message_delivery_policy'. Allowed values are 'priority' (default) and 'broadcast'.

mod_presence: Reflect the user's own presence back to them.

mod_saslauth: Warn and fallback gracefully when Cyrus SASL is requested, but missing.

net.server_event: Fire onincoming() callback for new connections as opposed to the new onconnect() - let's change this for a future version though

configmanager: Remove debugging code accidentally committed

net.server_event: Fix another instance of creating an SSL context - certmanager now does this

net.server_event: Fix traceback in creating SSL context

configmanager: Error when a component and host clash hostnames

mod_tls: Ban TLS after auth, not before.

mod_tls: Fixed traceback during S2S TLS (nil global access).

mod_saslauth: Don't print raw SASL data to avoid logging passwords unnecessarily

prosody: More accurate friendly error message in the event that creating the global SSL context fails

prosody: Use certmanager to create the global SSL context

Merge with 0.7

certmanager: Bring back the friendly errors when failing to load the key/certificate file

componentmanager: Use certmanager for creating contexts

certmanager, hostmanager: Rename get_context() to create_context() to be more explicit about what it does

Merge with backout

Backed out changeset cb1f9266130b: better way to achieve this to be committed Real Soon Now.

mod_tls: Refactor to simplify detection of whether we can do TLS on a connection

stanza_router: Fire /self events for stanzas users send to their own bare JID.

mod_tls: Don't offer TLS on hosts that don't have any certs

sessionmanager, s2smanager: Fix for syntax of null_data_handler() (thanks Nolan)

sessionmanager, s2smanager: Give sessions dummy data handlers that log when data is received by a destroyed session

net.dns: Normalize records before placing them in the cache, fixes issues with CNAME targets in CAPS (fixes #161)

net.dns: Update for new socket API

hostmanager: Small optimisation in checking whether a host is enabled

hostmanager: Log an error if no hosts are defined

mod_privacy: Remove the non-working sendNeededUnavailablePresences() and the related commented code

mod_privacy: Fix to correctly iterate over lists stored in new format

mod_privacy: Upgrade old privacy lists to new storage format, so they don't get lost

s2smanager, mod_compression, mod_tls: Changed event.session to event.origin for s2s-stream-features event for consistency.

mod_saslauth: Hook stream-features event using new events API.

mod_roster: Hook stream-features event using new events API.

mod_legacyauth: Hook stream-features event using new events API.

mod_compression: Hook stream-features event using new events API.

mod_bosh: Fire stream-features event using new events API.

mod_tls: Hook stream-features event using new events API.

sessionmanager: Fire stream-features event using new events API.

mod_tls: Cleanup.

mod_tls: Fixed an extra :up() in s2s stream feature generation.

Merge with trunk.

mod_tls: Remove origin type check when TLS is requested (thanks MattJ).

mod_tls: Respond with proper error when TLS cannot be negotiated.

mod_tls: Inlined some code.

net.server_event: Fixes for traceback with no LuaSec

net.server_select: Small indentation fix

net.server_select: Fix traceback with no LuaSec available (thanks Nolan)

mod_tls: Merged duplicate code.

mod_tls: Switched to new events API.

mod_tls: Slight refactoring.

mod_presence: Don't depend on user being online when calculating top resources.

mod_presence: Don't depend on sessions array existing for a user when handling outgoing presence broadcast.

sessionmanager: Fire resource-unbind event after removing session from sessions table

mod_privacy: Remove use of to identify unspecified privacy list

mod_privacy: Fix potential traceback in stanza validation, and fix some zero-based indexing :)

mod_privacy: Don't store the privacy lists as an array, but as a map... faster and less code

prosody, prosodyctl: Re-jiggle load order again, fixes logging config not being obeyed (thanks darkrain)

loggingmanager: Trailing whitespace

modulemanager: Load plugin libraries in the same environment as the plugins.

modulemanager: Make the plugin environment available directly (module.environment within plugins).

util.datamanager: Added support for hooks to override behavior.

net.server_select: Only allow starttls if luasec is available (thanks Nolan)

net.server_select: *Major* whitespace refactoring to meet Prosody's coding style guidelines, we now have tabs

sessionmanager: Whitespace fix

mod_privacy: Rename from_user/to_user flags to is_from_user/is_to_user for clarity

net.dns, net.adns: Changed dns:socket_wrapper_set to dns.socket_wrapper_set for consistency.

util.sasl_cyrus: Add text message from cyrussasl to <not-authorized/> errors.

mod_tls: Don't advertise TLS after authentication.

net.dns: Fixed whitespace/indentation.

net.dns: Removed unused function.

net.dns: Removed some useless indirection to improve readability.

util.encodings: Use STD3 ASCII rules for idna.to_ascii.

net.httpserver: Make request.conn be the server.lua conn instead of the underlying socket (more useful this way)

net.httpserver: Trailing whitespace

Merge with backout

util.sasl.digest-md5: Revert changeset 6094a4e2b6f3 as it breaks some clients, re-visit some time down the line

prosody: Add a catch-all friendly message for when any port is in use we want to use

prosodyctl: Initialize logging before checking dependencies

prosody: Initialize logging before checking dependencies (fixes another traceback with no LuaSec)

certmanager: Fix traceback with no LuaSec

certmanager: Tabs not spaces!

util.dependencies: Don't query the config (it isn't really necessary)

net.server_event: Update for compatibility with new server API

net.xmppserver_listener: status -> onstatus for consistency

net.server_select: listener.status -> listener.onstatus for consistency

net.adns: Use different flavour of voodoo to make UDP sockets work smoothly with libevent (no packet merging)

util.stanza: stanza.error_reply(): Fix to put the correct namespace on <text>

net.adns: Trailing whitespace

hostmanager: Use certmanager for obtaining SSL contexts

certmanager: Hello world, I'm come to manage your SSL contexts

prosody: Show friendly error when no config present for legacy SSL ports

configmanager: Trailing whitespace

net.connlisteners: Return an error if no SSL context is supplied for a connection of type 'ssl'

prosody: Log error message when failing to open ports

net.server_select: Report whether a new listener uses SSL or not in the log message

prosody: Only set the ssl_ctx for 'ssl' connections

net.connlisteners: Remove redundant variable declaration

net.connlisteners: Update for new server API, type == 'tls' now means little - all connections support TLS

s2smanager: Update for new server SSL API (don't pass a sslctx)

mod_tls: Remove some redundant variable declarations

mod_tls: Set the sslctx on outgoing connections (possibly the cause of outgoing s2s connections not being encrypted)

mod_tls: Update for new server SSL syntax

net.server_select: Remove startssl parameter to the client/server creation functions - passing a sslctx now indicates you want to use SSL from the start

MUC: muc.lib.lua: Fix the sending of the occupant JID instead of the nick in role lists and presence broadcasts after role changes (thanks teo)

s2smanager: Fix syntax error)

s2smanager: require_s2s_encryption -> s2s_require_encryption

s2smanager: Make require_s2s_encryption do what it says on the tin

hostmanager: Trailing whitespace

net.server_event: Trailing whitespace

net.server_event: Support :setlistener() method on connections to work with port multiplexing

Merge with trunk.

mod_presence: Quick fix to make probes from local users to local hosts work.

mod_presence: Added handler for presence subscriptions and probes to local hosts.

stanza_router: Added third parameter to core_post_stanza, to control pre-events.

MUC: Fixes and refactoring for the previous commit to work in all cases, text of error stanzas is now broadcast

MUC: Show error message texts when participants are kicked for stanza errors

MUC: Have get_error_condition() use the new stanza:get_error() (muc.lib.lua 11 lines shorter \o/)

util.stanza: Add stanza:get_error() to return type, condition and text of a stanza error

mod_presence: Respond with an unavailable presence when subscribers probe and no resources are available.

mod_privacy: A handful of logging fixes

mod_privacy: Remove the giant if/end block that was really causing problems - skipping stanzas with no to/from (like presence broadcast). Also optimised the code a *lot*, these changes untested at the moment though.

Merge backed out changeset

Backed out changeset c4240df1b412 (or this)

Backed out changeset a4f9ed3f912e (you didn't see this)

mod_privacy: ...and no 'to' for presence implies an outgoing broadcast

mod_privacy: Mmph, no 'from' == from local

mod_privacy: Fix repeated presence-in (should be presence-out) - this stops the blocking of legitimate inbound presence, and inbound/outbound iqs and messages in Gajim's invisible mode (maybe I can sleep now)

mod_privacy: Trailing whitespace (I can't sleep)

prosodyctl: Don't load luarocks as util.dependencies now does this

prosody: Check dependencies (and load LuaRocks) earlier on in the startup process

util.dependencies: Load luarocks.loader/luarocks.require

mod_console: Update !! shortcut for new connection API

prosodyctl: Don't display message about failing to start Prosody is daemonizing is disabled (if daemonizing is disabled then Prosody is stopped by the time control returns to prosodyctl, which then can't see Prosody running)

util.dependencies, prosody, prosodyctl: Give util.dependencies a check_dependencies() function so the caller can decide what to do when dependencies aren't met - update prosody/prosodyctl for this change

s2smanager: Whitespace

xep227toprosody: Fixed some global accesses.

xep227toprosody: Initial commit (thanks stefan).

xmlhandlers: Removed unused variables.

xmlhandlers: A little optimization.

MUC: Removed old commented code.

MUC: Converted some local functions into methods.

mod_privacy: Removed a useless 'require' within a function.

Merge with trunk.

mod_privacy: Cleaned up code.

mod_privacy: Reduced a function.

mod_privacy: Fixed global access.

prosodyctl: Require util.dependencies to run dependency checks, not only for when starting Prosody directly (thanks Joe)

mod_privacy: Imported from prosody-modules.

mod_component: Cleaned up unused variables.

prosody: Listen for component connections on port 5347 by default.

xmlhandlers: Rearranged a little code.

xmlhandlers: Fixed indentation and added some semicolons.

mod_disco: Added option 'disco_items' to allow appending items to a host's disco#items result.

mod_component: Fix name of config option in error message (thanks nulani!)

xmppcomponent_listener: Update for new connection API

util.dataforms: Add optional type parameters (defaults to 'form')

mod_xmlrpc: Obsolete, remove

mod_bosh: I == fail.

mod_bosh: Simplify cross-domain support, and make it work - default is for cross-domain to be disallowed

mod_bosh: Support for cross-domain access control using CORS

net.httpserver: More robust handling of headers split across multiple packets

util.stanza: Trailing whitespace

net.httpserver: Make it possible to return responses with no body

net.httpserver: Close connection on invalid HTTP status line

modulemanager: Remove obsolete actions code

net.server_{select,event}: Fail gracefully if socket doesn't have a setoption method (LuaSec issue I think)

net.server_event: Replace all calls to _start_ssl() to its bigger brother starttls() - fixes 5223 w/ libevent

objectmanager: Obsolete, remove

actions: Obsolete, remove

mod_actions_http: Obsolete, remove

mod_bosh: Trailing whitespace

s2smanager: Log error and fail gracefully if we can't open a socket for an outgoing s2s connection (thanks foucault)

net.xmppserver_listener: Handle stream-error errors from xmlhandlers, and close session in response

net.xmppserver_listener: Extend session:close() with a remote_reason parameter

s2smanager: No-one noticed that Prosody stopped sending to/from on stream headers recently? :)

xmlhandlers: Move stream-error detection to somewhere more appropriate (it was never reached) - s2s stream errors now reported properly

mod_bosh: Update for new xmlhandlers syntax

net.xmpp{client,server,component}: Update for new xmlhandlers syntax

net.xmppserver_listener: Pass reason for session disconnection to disconnect handler, if known

xmlhandlers: More refactoring, split up stream_ns and stream_tag, add stream_error_tag so that callers don't need to be so worried about the separator we use

xmlhandlers: Define ns_separator and ns_pattern to save repeating it in literal form throughout the file

net.server_event: Remove access to starttls method when starttls is negotiated - fixes offering starttls to client who are already using it (thanks darkrain and Adium)

mod_presence: Automatically deny presence requests for hosts, fixes traceback in #153

stanza_router: Log the name of unhandled stanzas (thanks bear)

util.signal: Using stdlib.h instead of malloc.h.

mod_muc: Remove unused history_length declaration

prosodyctl: Use mode r+ for opening the file so 1) it fails if the file doesn't exist 2) we have write access to lock it

mod_posix: Adjust file open mode depending on whether file exists (take that fopen designers!!!)

util.pposix, mod_posix, prosodyctl: Bump pposix version to 0.3.3 for mkdir

xmppclient_listener: Allow the tcp_keepalives option in the config to control whether keepalives are used

net.server_event: Add conn:setoption() to set options on the socket

net.server_select: Add conn:setoption() to set options on the socket

mod_saslauth: Fixed some indentation and added some semi-colons.

mod_saslauth: Made some variables local to avoid unnecessary global access.

sessionmanager: Added resource prepping, and invalid resource checking to the bind_resource function.

mod_register: Return a <not-acceptable/> error on empty usernames (thanks Neustradamus).

componentmanager: Add dialback_secret to components to allow s2s to work (thanks Flo)

util.prosodyctl: Report Prosody as not running if the pidfile isn't locked

mod_posix: Lock pidfile when in use, shut down if we can't write or lock the pidfile

util.datamanager: Use pposix.mkdir if available

util.pposix: Add mkdir(path)

prosodyctl: Move definition of prosody singleton to prior to loading datamanager, and add platform

util.pposix: Replace the unwieldy module table generation with luaL_register() call - side effect - it now sets the pposix global to the module table

mod_posix: Set umask to 'umask' from the config, or 027

prosodyctl: Set umask to protect data files, bump pposix dep to 0.3.2

util.pposix: Add pposix.umask(), bump version to 0.3.2 (and do the same in mod_posix)

util.pposix: Fix return type of lc_abort to shush compiler warning

util.posix: Trailing whitespace

net.server: When libevent backend is in use, override signal.signal to use server.hook_signal

net.server_event: Add server.hook_signal(signal_num, handler) to wrap libevent's signal-catching interface

mod_posix: Remove the lines added to work around the util.signal loop bug

util.signal: Restore the old debug hook earlier, just in case we receive another signal between clearing the signal queue and restoring it

util.signal: Update version in header, and author's email

util.signal: Queue up multiple signals, instead of trampling on the previous debug hook (and never clearing our own)

prosody: net_activate_ports: Accept strings as well as numbers for specifying ports

prosody: Read list of possible config extensions from configmanager, removes old TODO

configmanager: Add parsers() method to return an array of supported config formats

s2smanager: Split sending of stream header into a :open_stream() method

net.dns: Make sure math.randomseed() gets passed an integer

net.server_select: Fix oops in last commit

net.server_select: Allow setting the logger using server.setlogger

s2smanager: Allow new_outgoing() to create sessions without automatically connecting them (set 3rd parameters to false)

s2smanager: Stamp a 'to' on the reply stream:stream. This makes prosody happy.

s2smanager, hostmanager: Make dialback secrets per-host

s2smanager: Trim trailing whitespace

mod_saslauth: Oops.

Merge with Paul

mod_muc/muc.lib: Use stanza:get_child() to locate MUC child element

mod_saslauth: Use module:get_option()

mod_saslauth: Add sasl_backend config parameter

Merge with Rob

Added notification of configuration changes for MUCs

Add support for non-anonymous MUC rooms

prosodyctl: Gracefully handle a missing stty command, and fall back to ANSI escape sequences

mod_httpserver: Rudimentary directory detection, return forbidden instead of causing a traceback (since commit 0325f241a26c)

prosody.cfg.lua.dist: Remove lie about requiring console_enabled

prosody.cfg.lua.dist: Remove trailing whitespace

util.events: Rename add_plugin() and remove_plugin() to add_handlers() and remove_handlers() respectively

util.signal: Update header comment for new filename

util.sasl_cyrus: Report an error if Cyrus SASL init fails.

util.sasl_cyrus: Removing whitespace.

util.sasl_cyrus: Automatically initialize Cyrus SASL with the first used service name.

util.sasl_cyrus: Change variable name.

util.sasl_cyrus: Fixing cyrus mechanism list parsing. (Thanks darkrain)

net.httpserver: Optimized response serialization.

mod_saslauth: Adjust sanitizing.

mod_saslauth: Sanitize debugging information so it won't break terminal emulation when using GSSAPI auth.

first working version with Cyrus SASL support.

added comment to remind us to fix binary output breaking the terminal

util.sasl_cyrus: Further fixing and cleanup.

util.sasl_cyrus: Initializing Cyrus SASL library and a bit cleanup.

util.sasl_cyrus: Log errors if CyrusSASL init fails.

mod_saslauth: Make service_name configurable for CyrusSASL users.

mod_saslauth: Add support for CyrusSASL.

Adding sasl_cyrus.lua. A sasl.lua drop-in replacement to use CyrusSASL for all c2s authentication.

mod_saslauth: Requiring c2s encryption means requiring c2s encryption... thanks Flo

net.dns: Update synchronous path for new connection API

util.prosodyctl: Saner determination of Prosody executable path

mod_pep: Added a TODO.

mod_pep: Handle service discovery queries for bare account JIDs (thanks darkrain).

mod_disco: Handle and fire events for service discovery queries for bare account JIDs (thanks darkrain).

s2smanager: Give reasons to destroy_session in more cases, including when DNS lookup fails

Merge with backout branch

s2smanager: Send reply stream header only after checking we serve this host (sorry darkrain... :) )

Backed out changeset 78c5cb163ea9, to fix another way. Haven't done this for a while :)

s2smanager: More whitespace

s2smanager: Mark stream as opened sooner, this prevents a duplicated stream header on host-unknown errors (thanks darkrain and his mail server)

s2smanager: Whitespace

net.server_event: Add properties like _ip and _port to server objects too

net.server_event: Add :serverport() method to be compatible with old API

mod_bosh: Update for new connection API

httpserver_listener: Update for new connection API

net.httpserver: Fix usage of old connection API syntax

xmppserver_listener: Make log messages during SRV retries clearer

xmppserver_listener: When a connection fails, pass the reason to destroy_session

s2smanager: Have both destroy_session and bounce_sendq accept a reason string to include in bounced stanzas

net.server_event: Load ssl/socket libraries if not already available

util.timer: Use luaevent's built-in method of repeating an event (fixes a weird crash)

prosody: Fixed a possible nil concatenation.

prosody: Fix to net_activate_ports to mend binding to specific interfaces

net.http: Don't expect the body on redirects

prosody: Added config option 'ssl_ports' to allow multiplexed SSL ports.

mod_httpserver: Text files are text/plain, and not plain/text.

net.httpserver: Removed mime handling (now in mod_httpserver). Unknown dynamic content is now always served as text/html.

mod_httpserver: Removed a log message.

mod_httpserver: Read files in binary mode; fixes issues with serving binary files.

mod_httpserver: Skip returning a Content-Type when not known (application/octet-stream is not a correct default).

mod_httpserver: Return Content-Type header based on file extension.

mod_httpserver: Delay setup until after server is started.

mod_bosh: Delay setup until after server is started.

prosody: Use the multiplex listener when the 'ports' config option is specified.

net_activate_ports: Use the default config option 'ports' when no option is specified.

multiplex_listener: Initial commit. Multiple protocols on a single port.

modulemanager: Fire item-removed events on module unload.

modulemanager: Fixed a global access.

prosody: Call tostring on the key being used for nil global read before concatenating it with a string.

prosody: Log a warning and traceback, but don't throw an error on nil global read.

Mainfile: Broke up a really long line.

Merge with 0.6

mod_vcard: Stricter matching of vcard stanzas with vcard_compatibility enabled, fixes intercepting stanzas to the full JID that it shouldn't

util.signal: Make kill() available on Solaris; really fixes #136.

mod_posix: Fix to not loop in SIGTERM either, but the same happens with SIGHUP (where the same 'fix' can't be applied) - shall investigate tomorrow

prosody: Report the current socket backend in use

net.server_event: Add get_backend() method

net.server_select: Add get_backend() method

mod_posix: Set empty SIGINT handler when a SIGINT is caught

prosody: Clarify and add some comments to describe what we're doing when and why

Rename closeallservers to closeall in the public API (same as net.server_select) and expose setquitting

net.server_event: Add setquitting() function to be compatible with net.server_select

net.server_event: Fix closeallservers() to work correctly after the giant refactorizification

net.server_event: Return "quitting" on loop exit to be compatible with net.server_select, and give Prosody a way to know why the loop broke

mod_posix: Catch SIGINT

Merge with trunk

prosody: Less strict matching for the magic 'interrupted' error

mod_pep: Support item retrieval use cases

mod_pep: Allow storage of urn:xmpp:avatar:data node (payload only with base64 data)

prosodyctl: Nicer errors when addplugin command fails

util.datamanager: Store data stores with no host in '_global' folder

util.pluginloader: Don't specify a host for the plugin data store (clever waqas...)

mod_compression: Tweak some log levels

componentmanager: Set ssl_ctx[_in] for components correctly, and use global SSL context if available

prosody: Expose global_ssl_ctx through prosody object

Disable SSLv2 by default, it's known to be insecure.

mod_proxy65: Strip trailing whitespace

util-src/Makefile: Clean up makefile (re-commit because MattJ shouldn't commit anything at 3AM)

net.server_select, net.server_event: Convert to unix line endings from Windows

util-src/Makefile: Clean up makefile, rename lsignal.c to signal.c

configure: fix typo of 'yes' -> 'yet'

configure: Add 'linux' ostype and rename lflags to LDFLAGS to match expectations.

Redo merge with Waqas' PBKDF2 optimizations.

Merge with Waqas.

net.server_select: Restore checks for wantread/timeout errors on receive

mod_proxy65: Don't read data from the connection untill the proxying is activated

mod_proxy65: Make the proxying bidirectional

mod_proxy65: Use a bigger buffer for data we're proxying

mod_proxy65: Only lock the reading side when throttling

net.server_select: Add a function to just lock a stream for reading

mod_proxy65: Throttle connections to prevent senders flooding the server's buffers if the receiver doesn't receive fast enough

mod_proxy65: Replace error() calls with module:log("error", ...)

net.server_select: Make bufferlen() method return, of all things, the buffer length

net.server_event: Port fix in 2dc9bbf25447 to libevent-based backend

net.server_select: Fix possibility of losing data sent from a socket just before it closes (thanks Sjoerd Simons)

net.dns: Fix for blocking dns lookups to find waiting coroutines correctly (not that we use this in Prosody...)

net.dns: Port some DNS fixes to the resolver:feed() function for net.adns to use

Merge with 0.6

util.dependencies: Fix package name of LuaFilesystem

Merge with Tobias

mod_console: Show compression status on s2s:show() output.

Merge with tip.

Merge with Tobias

modulemanager, net.dns: Remove trailing whitespace

prosodyctl: Experimental 'addplugin' command

mod_compression: Removing trailing whitespace.

mod_compression: Declaring the de-/compression pipes as local.

mod_compression: Some comment clean up.

Merge with tip.

mod_compression: Removing forgotten debugging output.

mod_compression: Define db (dialback) namespace in stream header.

Merge with tip.

mod_compression: Enabeling compression for outgoing s2s streams.

mod_compression: Some further refactoring.

mod_compression: Make setup_compression work for s2s sessions too.

mod_compression: Moving compression setup in a dedicated function.

mod_compression: Prepare activating of compression on s2s.

Merge with tip.

Enable one way stream compression on s2s links.

Fixing some typos.

util.pluginloader: Support for fetching plugins from the data store

net.httpserver: Fix to work with new server API

net.httpserver: Quick fix to set the correct Content-Type on simple (string) responses, for a few known types

mod_proxy65: Remove trailing whitespace

mod_proxy65: Fix log:module -> module:log :)

Merge with trunk

util.sasl.plain: Allow empty authzid (thanks bjc).

util.hmac: Optimized.

util.sasl.scram: Optimized binaryXOR.

util.sasl.scram: Fixed a variable redeclaration.

modulemanager: Fire events module-loaded and module-unloaded, both receive a table with 'module' and 'host' fields, thanks bjc

util.sasl.scram: Making =2D and =3D substitution actually work.

util.stanza: Add stanza:get_child(name, xmlns) to find a child tag given a name/xmlns

util.sasl.plain: A little refactoring.

Merge with 0.6.

core.xmlhandlers: Fixed processing of empty namespaces (which caused an issue with jwchat).

mod_register: Properly notify contacts of subscription removal on account deletion.

mod_presence: Use the local host object as the origin for auto-generated subscription approvals and cancellations.

util.sasl.digest-md5: Fixing some variable access.

Merge with Tobias

xmppserver_listener: Update for new server API, fixes traceback when closing s2s connections

Make some more variables to locals.

util.sasl: Move some variables to local space. Fix a bug.

mod_console: Update for new server API, fixes traceback when closing console sessions

util.sasl.plain: Fail gracefully on empty <auth/> tag

mod_saslauth: Fix typo in variable name

net.server_select: Update conn.close() to use new connection method convention

mod_proxy65: Use new jid.join() from util.jid

tests/test.lua: Changes to environment handling of tests, and replace module() with dummy function that doesn't alter the current environment

tests: Add tests for util.jid.join()

tests/test.lua: Print the current test being run if verbosity sufficient

util.jid: Add join(node, host, resource) function to join the components and return nil if invalid

mod_proxy65: Update listener callback names for new server API

Merged with tip.

mod_saslauth: Allow relogins after failed SASL login.

util.sasl: Adding clean_clone() method.

net.server_event: Add addclient/wrapclient compatible with server_select, DNS and s2s should now work with libevent \o/

net.server_event: tostring() some debug logging parameters

net.server_event: Add set_send() for compatibility with server_select

net.server_event: Hide starttls function when the connection is not SSL-enabled

net.server_event: Count the number of client connections *upwards* :)

net.server_handler: Add stub handlers as fallbacks for those listeners don't implement

net.server_event: Fix to make ontimeout() listener callback work

net.server_select: Rename server.setsend() to server.set_send() for consistency

net.adns: Some cleanup, happens to also make it compatible with libevent

s2smanager: Allow configuration of the dialback_secret in the config

Merge with 0.6.

mod_presence: Use the local host as origin for subscription request acks.

mod_presence: Removed an unnecessary compatibility workaround which was causing issues with unavailable presence exchange after subscription removal.

mod_roster: Ask remote server to remove pending subscription requests when removing roster items.

Tagging 0.6.1

Tagging 0.6.0

Makefile: Fix to install new util/sasl directory

Merge with 0.6

util.serialization: Correctly serialize tables with 'false' as a key, fixes an issue with rosters not saving (thanks mathias, Tobias) 0.6.1

Merge with trunk

Merge with trunk.

MUC: Added support for the room-destroy owner use case.

MUC: Slightly refactored form processing.

Merge with 0.6

util.dataforms: Don't require type when parsing form XML

SASL: Using locally mapped s_gmatch instead of unavailable gmatch.

Merge with trunk

MUC: Only allow moderators to change the room subject.

MUC: Prevent visitors from broadcasting messages.

MUC: Improved handling of incoming groupchat messages (state preserved for possible later use).

Removed some legacy doc/ files.

Merge with Tobias's SASL redesign branch

Merge with trunk.

Reduce needed roundtrips during DIGEST-MD5 login.

Adding some human readable error messages.

Fail if username or password don't pass SASLprep.

Use new cofig option reading API.

Allow SASL PLAIN over unsecure connections when intended by admin.

Typo.

Handle , and = in usernames for SCRAM.

Provide SASL PLAIN mechanism only if TLS is active.

Cleaning up.

Tidying up.

Enable restriction of supported mechanisms in the SASL library.

SASLprep authentication and password in SASL PLAIN implementation.

SASLprep usernames and passwords.

Making interop with libpurple. (Thanks darkrain).

Add check for forbidden char sequences in validate_username().

Completed SCRAM-SHA-1 implementation to a ready-to-test state.

Added missing require for generate_uuid.

Initial commit of SCRAM SASL mechanism.

Merge with sasl branch.

Adding a note for possible round trip savings. sasl

Adding support for digest-md5 profile in DIGEST-MD5 implementation. sasl

Change of the digest-md5 profile. sasl

Broken DIGEST-MD5 client support again. sasl

Add support for plain profile in digest-md5 implementation. sasl

Getting PLAIN mechanism work with the new API. sasl

Move each mechanism in an own file. sasl

Fail if mechanism has already been selected. sasl

Store stage in SASL object. sasl

Importing SASL Digest-MD5 code. Now for real. sasl

Importing SASL Digest-MD5 code. sasl

List RFC numbers. sasl

Allow ampersands in passwords for SASL PLAIN mechanism. sasl

Making mod_saslauth use the new SASL API. sasl

Adjust SASL PLAIN mechanism to the new API. sasl

Adding some docu. sasl

Mostly making the code run; includes fixing typos and so on. sasl

Initial commit of the SASL redesign. sasl

Merge with 0.6

util.dependencies: Log an error if the current version of LuaSec installed contains The Bug (thanks Remko)

Merge with 0.6 on prosody.im 0.6.0

xmppclient_listener: Escape control characters when logging invalid XML.

Merge with 0.6

s2smanager: Log warning when trying to send a stanza from a host we don't serve, instead of a traceback (thanks stpeter)

Merge with trunk

net.server: Log an error when libevent is requested, but luaevent is unavailable, and don't load luaevent when not requested.

core.sessionmanager, net.*_listener: Remove the evil collectgarbage() calls

Merge with trunk

Merged with 0.6.

prosody: Added support for command line argument '--config'.

Merge with 0.6

util.datamanager: Replace popen(mkdir) with lfs.mkdir, keeping the just-in-time creation until we have the new datamanager API

util.dependencies: Missed a Debian/

util.dependencies: Clearer message, add homepages, etc.

util.dependencies: Add LuaFileSystem as a hard dependency

Merge with trunk

Merged with 0.6.

util.serialization: Replaced commas with semi-colons between table fields.

util.serialization: Concise output for empty tables.

Mainfile: Fixed some comments.

tests/modulemanager_option_conversion.lua: Add standalone test script for the new modulemanager config option API

modulemanager: New module API methods for getting config options with type conversion, get_option_string, get_option_number, get_option_boolean, get_option_array, get_option_set

util.dependencies: Make the commands line up properly in the "missing dependency" output. Yes, this was the commit you didn't know you were waiting for!

mod_console: Update for new net.server API

Merged with 0.6.

mod_presence: Route incoming presence subscription stanzas (types unsubscribe, subscribed and unsubscribed) to the user before roster pushes.

mod_presence: Acknowledge subscription requests by responding with an unavailable presence.

sessionmanager: Added function send_to_interested_resources().

sessionmanager: Fixed and cleaned function send_to_available_resources(). The 'to' attribute for presence subscription stanzas is now preserved.

loggingmanager: Explicitly flush log messages if the __FLUSH_LOG environment variable is defined (workaround for MSVCRT buffering piped output).

mod_proxy65: Update for new net.server API, untested

mod_proxy65: Import from prosody-modules, thanks Ephraim :)

net.server: Add some comments to explain to waqas how it all works :)

xmppcomponent_listener: Use new API for writing to components, fixes traceback (thanks Tobias)

s2smanager: Fix syntax error introduced in merge

Merge with trunk

stanza_router: Don't log full stanzas destined for s2s

objectmanager: Convert to unix line-endings

s2smanager: Don't log full stanza when sending outwards

s2smanager: Don't tostring() the data before sending, sends2s already does this.

net.server_select: Bring up to date to new common connection API

net.httpserver, net.http: Update for new net.server API (untested)

*_listener: Update for new net.server API, specifically .listener -> .onincoming, .disconnect -> .ondisconnect

net.adns: Update for new net.server API (doesn't work with libevent yet)

s2smanager: Update for new net.server API (s2s still doesn't work with libevent for other reasons)

net.server_event: Comment accidentally uncommented vdebug()

net.server_event: Handle and ignore 'wantread' error from receive(), treat as a timeout

net.server_event: Remove premature non-optimisation

net.server_event: Fix moved line caused by Mercurial's crecord and my selective commits

net.server_event: Obey nowriting/nointerface for locks in interface methods

net.server_event: Use conn property for send/receive instead of caching, fixes trying to use original socket after SSL-wrapping

net.server_event: Set startsslcallback property to nil when we're done handshaking, otherwise we keep trying to repeat the handshake

net.server_event: Add set_sslctx() method to connections

net.server_event: conn.usingssl -> conn._usingssl

net.server_event: Use correct listener callbacks

net.server_event: Small whitespace fixes

net.server_event: Correct a few instances of .sslctx to ._sslctx

net.server_event: Call connection's onconnect, no need to pass closures around now

net.server_event: Use connection id in all relevant logging

net.server_event: Define id property for connection objects, to aid logging

net.server_event: Define vdebug function for convenience

net.server_event: Change to new standard addserver() syntax

net.server_select: Change addserver() parameters to be compatible with new standard syntax

mod_tls: Switch to : syntax for connection methods

xmppclient_listener: Use : syntax for connection methods, to be compatible with new server.lua

xmppclient_listener: Switch to .onincoming listener method, to be compatible with new server_event.lua

net.server: Small fix for addtimer() compatibility code

net.connlisteners: Standardise on new syntax for addserver(), and clean up a bit

sessionmanager: Use : syntax for calling connection methods

mod_bosh: Don't log response XML

util.timer: Fix libevent timers (event.base doesn't exist...)

net.server_event: Export base as event_base

net.server_event: Comment overly verbose log message

util.timer: Use libevent for lightweight timers if available and configured (use_libevent option)

net.server: New net.server to choose the appropriate library from server_select/server_event based on the availability of luaevent and the use_libevent config option

net.server: Rename to net.server_select

net.server_event: Remove redundant getid() function

net.server_event: Initial commit of server_event.lua. Don't get too excited, it's not used at all yet, and is still incomplete :)

s2smanager: Fail outgoing s2s connection if hostname does not pass idna_to_ascii(), thanks Flo + waqas

s2smanager: Queue db:verify unless we already sent a db:result (if we had then it can could a dialback deadlock). Also remove some redundant code which could cause a db:result to be sent while still negotiating features (e.g. TLS) and break things. Collectively these fix a 'random' s2s failure (usually with ejabberd for some reason) - resulting in an 'unbound prefix' XML error, or 'ssl handshake failure'. Was this commit message long enough? I think so.

util.sasl: Add COMPAT comment

mod_console: Moved activation of the console port from the main file to mod_console.

prosody.net_activate_ports: Slightly refactored and definition moved to before modules are loaded.

mod_register: Log a debug message when a session's IP is not available.

mod_bosh: Set session.ip for BOSH sessions.

util.sasl: Added compatibility workaround for jwchat sending an encoded trailing '\0' in SASL responses.

net.dns: Be more strict about the records we cache

net.dns: Be more strict about checking the DNS replies we receive

util.sasl: Improved a log message.

util.sasl: Allow authzid=username (for compatibility with Smack's non-compliant behavior).

util.sasl: Return proper error when client provides authzid.

Changed separator between attribute names and prefixes from '|' to '\1' (optimization and cleanup).

net.connlisteners: Log an error when a listener fails to load.

componentmanager: Improved logging for stanzas being bounced for unavailable components.

mod_posix: Log warning when no_daemonize is used, and instruct on how to update config

mod_posix: Switch config option to 'daemonize', fall back to 'no_daemonize' if not set, default behaviour remains the same... daemonize if mod_posix is loaded

modulemanager: api:get_option(): Handle correctly option values of boolean false, don't assume value unset

Merge with trunk

net.dns: Fixed indentation and coding style.

util.dataforms: Support for jid-multi field type

net.dns: Initialize default resolver on module load (instead of on first use).

net.dns: Updated to use util.windows.get_nameservers for enumerating nameservers on Windows.

net.httpserver: Pass correct connection object to disconnect listener, which fixes a small leak

prosodyctl: Put 'pidfile' in quotes to make more clear that it is the literal name of the option

MUC: Include occupants' real JIDs in their presence (semi-anonymous rooms).

Makefile.win: Added support for util.windows, improved cleanup of temporary files, switched to dynamic linking with MSVCRT, etc.

util.windows: Initial commit. Adds support for querying the windows DNS API for nameservers.

util.dataforms: Only add value to rendered form if supplied in the data

util.pposix: Add abort() function

server.lua: Standardise on 'client' variable to refer to the socket, makes the code a bit cleaner

Merge with trunk

mod_welcome: Change $user to $username in default welcome message (thanks to chris for spotting)

Prosody top-level error handler modified to log properly on non-string error messages.

mod_console: Added proper cleanup for disconnected console sessions.

MUC: Fixed: affiliation='none' was omitted from some presence broadcasts.

xmppserver_listener: Minor logging fix: Prefer the session logger when available to log invalid XML warnings.

MUC: Fixed an issue with multi-session nicks where the 'from' attribute in a presence broadcast was not being properly set.

server.lua: Add addsocket(), refactor all code to use it, fixes nasty socket object leak - moral of the story is to not duplicate code, and not prematurely optimise. But you knew that already didn't you?

rostermanager: Fixed a global access.

rostermanager: Refactored roster loading to remove duplicate code.

rostermanager: Log a warning when a self-contact is detected.

rostermanager: Ensure meta-data entry is present on roster load.

rostermanager: Remove self-contacts from loaded rosters.

PEP: Better reload support.

PEP: Send publish IQ result before broadcast.

PEP: Stricter checks on payload validity.

PEP: Clone payloads to allow plugins to reuse stanzas.

PEP: Fixed namespace for the <item> element in PEP broadcasts.

util.require: Yes hg, I really did want to remove it, thanks.

prosody, util.require: Remove util.require, the shortest-lived module so far. Woke up this morning with a much simpler idea, which is also effective against C modules (I believe). Yay for metatables :)

mod_presence: Send unavailable presence when sending unsubscribed presence stanzas (some legacy clients continue to display unsubscribed contacts as available).

xmlhandlers: Reset state on error or stream close, fixes possible traceback

connlisteners: Localize tostring, fixes possible traceback when LuaSec not installed

MUC: List occupants in a room's disco#items response.

Merged with trunk.

MUC: Added config option 'restrict_room_creation' to allow restricting room creation to admins.

usermanager: Removed an unnecessary global access.

usermanager: Logged a clear warning when the 'admins' option is not a table.

usermanager: Changed function is_admin to allow checking for host-specific admins.

mod_lastactivity: Gave a positive priority to the presence event hook.

MUC: Added 'name' config option, for specifying the component's name in disco responses.

net.dns: Don't expire records with TTL of 0 instantly

mod_lastactivity: Persist data across reloads.

mod_lastactivity: Allow users to request their own last activity.

prosody.cfg.lua.dist: Convert to unix line endings from DOS

prosody: Use rawget to test for the existence of ssl (LuaSec) so we don't look for a nil global

util-src/Makefile: Add missing flags to building of util.signal

net.httpserver: Pass on interface option from new_from_config() (thanks Chris)

prosodyctl: Remove dependency on hostmanager, and friends

s2smanager: Use session-specific logger to log outgoing data on outgoing s2s connections

mod_lastactivity: Initial commit.

mod_uptime: Removed event hook for iq/bare. mod_uptime only deals with iq/host queries.

mod_uptime: Removed unused variables.

mod_uptime: Updated to use events (which also fixes a few minor issues).

mod_saslauth: Fixed access of globals.

mod_saslauth: Marked the im-session stream feature as optional. This allows smart clients to save a round trip.

mod_time: Updated to use events (which also fixes a few minor issues).

mod_ping: Updated to use events (which also fixes a few minor issues).

mod_console: Fixed traceback occuring on using module:list on unknown hosts.

mod_console: Added help text for config:reload().

MUC: Re-enable nick changes for non-multisession nicks.

mod_console: Add missing hosts:list() command

MUC: Added support for reason messages in role and affiliation changes (e.g., reason for kick, etc).

MUC: Rewrote code for mediated invites to be more robust, and to support legacy clients.

mod_vcard: Cleaned up unused variables and global accesses.

mod_vcard: Removed stream feature.

mod_vcard: Refactoring and cleanup.

mod_vcard: Moved completely to new event based hooks.

mod_vcard: Fixed traceback on attempt to set vcards by non-c2s sessions.

MUC: Improved handling of error stanzas and made error messages concise.

MUC: Ignore invisible presence (incorrectly broadcasted or forwarded by ejabberd).

MUC: Fixed an incorrect error message.

MUC: Kick occupants on sending error messages to other occupants.

Merge with trunk.

modulemanager: Module loading rewritten to gracefully deal with errors in module initialization.

modulemanager: Use componentmanager to create new components.

componentmanager: Added a FIXME comment.

componentmanager: Unload mod_tls for components before removing them.

componentmanager: Let the default component handler handle stanzas if a component handler isn't available.

MUC: Multiple sessions per nick.

modulemanager: Fixed: Stanza modules were being auto-loaded for components (regression in hg:1e674dae31ae).

modulemanager: Fixed traceback on loading modules on unknown hosts.

modulemanager: Slightly rearranged code for more robust unloading of modules.

stanza_router: Added a compatibility workaround for missing 'id' attribute in <iq/> elements.

util.stanza: Don't add xmlns to tags when serializing if same as the parent tag's xmlns. Should hopefully shut up Gajim once and for all :)

certs: Update default certs

net.dns: Don't cache some records indefinitely

mod_tls: Offer the host-specific cert (when there is one) to incoming c2s/s2s connections, fixes #30 (thanks, albert, Flo, johnny, and all who nagged me :) )

hostmanager: Create a server sslctx for incoming connections

net.server: Allow changing the sslctx of a connection after it has been established

xmppserver_listener: Use listener log() if session doesn't have one yet (thanks Flo)

mod_console: Add commands host:activate(host, config) and host:deactivate(host, reason) to add/remove hosts at runtime

s2smanager: Add incoming_s2s to the prosody object

hostmanager: deactivate() now accepts a reason, closes s2s connections as well as disconnecting users, and unloads modules for the host

hostmanager: Add return _M;

tests: Fix stanza_router tests to work with the new routing code, finally all tests pass again \o/

tests: More environment magic to help get stuff working in a sandbox

stanza_router: Localize hosts, full_sessions and bare_sessions, and take from the prosody object instead of _G

componentmanager: Handle missing prosody object (helps us pass some tests)

prosody: Move global protection earlier (to before modules are loaded, etc.)

prosody: Require new require :)

prosody: Require some core/util libraries which core modules depend upon, C modules and other modules which write to _G

prosody: Rename global net_activate_ports -> prosody.net_activate_ports

util.require: A replacement for Lua's require/module that doesn't load into the global environment by default (C modules still get past this)

util.helpers: Add copyright header

tests: Have fake module() set _M to satisfy some modules

s2smanager: Fix access of 'config' global without requiring configmanager

tests: Add tests for new modulemanager load_modules_for_host code

modulemanager: Re-organise module loading to still work when no global modules_enabled is defined in the config (thanks hoelzro for accidentally discovering this one)

util.helpers: Add get_upvalue(function, name) helper

util.dataforms: Incorporate slightly modified patch for list-single type from Florob

mod_vcard: Hide me from the trailing-whitespace police

mod_vcard: Add vcard_compatibility option to handle vcard stanzas routed to the full JID by ejabberd MUC rooms

Merge with 0.5

xmppserver_listener: Fix typo (thanks Jorj)

Merge with 0.5

net.server: Better handling of closing sockets during send

xmppserver_listener: More forcefully close s2s connections (fixes fd leak)

Merge with 0.5

net.dns: Remove sockets from socketset when closing them, fixes a leak

Merge with 0.5

rostermanager: Fixed a traceback on roster save.

modulemanager: Changed api:get_host_items to include items from the global host in its result.

util.dataforms: Small fix to allow generating forms without specifying any input data

util.dataforms: Support for jid-single field type especially for Florob :)

mod_tls: Don't try to start TLS if we can't actually do it (thanks Florob)

componentmanager: Auto-load mod_tls for components #hack

componentmanager: Remove FIXME

componentmanager: Fix oops in pattern for matching subdomain

componentmanager: Use ssl_ctx of 'parent' host (should fix TLS for components)

mod_tls: Catch s2s-stream-features and add starttls feature if possible

mod_dialback: Catch s2s-stream-features and add dialback feature

s2smanager: Make s2s-stream-features a per-host event

util.stanza: Remove silly dependency on util.logger

util.array: Oh no it isn't!

modulemanager: Bump log level of unhandled non-default-namespace elements, and log their full XML

util.stanza: Soften dependency on util.termcolours

util.stanza: Make xml_escape publicly accessible

s2smanager: Don't send version=1.0 in reply to incoming stream tag if they didn't advertise 1.0 (makes happy some old ejabberd versions)

sessionmanager: Mark client streams as opened sooner to avoid wrapping errors in unnecessary stream tags

s2smanager: Improve log message on missing to/from in stream header

mod_console: Add a space before '(encrypted)' in s2s:show()

mod_tls: Mark sessions as not secure when negotiating outward TLS, so they get marked secure later. Fixes missing (encrypted) for outgoing sessions in s2s:show(). Thanks albert, McKael :)

hostmanager: Only initialse SSL contexts if SSL library available

mod_console: Also search piggy-backed, er, multiplexed domains when passing a filter to s2s:show()

Merge with 0.5

util.array: Small logic fix for array:filter()

util.array: Fix for array:filter() (in-place filtering)

mod_console: Add module:list() to help

mod_console: Add module:list() command to show modules loaded on a host

util.array: Per-array methods now always mutate the array, array.* return a mutated copy, and most methods (e.g. sort) now return the array

modulemanager: Add host.modules to contain a table of modules for a host

Merge with 0.5

util.array: Fix for array:filter() (in-place filtering)

mod_console: s2s:show(): Indicate when a connection is encrypted

mod_tls: require_s2s_encryption -> s2s_require_encryption

require_encryption deprecated, use c2s_require_encryption instead

mod_tls: Mark starttls feature as <required/> if require_s2s_encryption is enabled

mod_tls: Mark session as not secure before negotiating TLS

s2smanager: Mark session as secure if it was negotiating TLS and opens a new stream

Merge with 0.5

mod_console: Add module:list() to help

mod_console: Add module:list() command to show modules loaded on a host

util.array: Per-array methods now always mutate the array, array.* return a mutated copy, and most methods (e.g. sort) now return the array

modulemanager: Add host.modules to contain a table of modules for a host

mod_tls: Only advertise TLS if the server told us which host they are connecting to

xmppserver_listener: Lower log-level of debug message to, er, 'debug'

net.adns: Bump log-level of DNS handler errors to, er, 'error'

Merge with 0.5

stanza_router: Reply to IQ requests with missing 'id' attribute with a bad-request error.

rostermanager: Fixed: Roster version was not being properly updated in some edge cases.

rostermanager: Added support for saving rosters of offline users to the save_roster function.

mod_tls: :up() out of the starttls tag in stream:features

Specify XMPP version on response stream to incoming s2s connection.

Minor changes; outgoing TLS works.

hostmanager: Create ssl context for each host (fixes #30 for outgoing s2s connections)

loggingmanager: Whitespace fix

s2smanager: Small comment

s2smanager: Don't wait for stream:features from non-XMPP-1.0 hosts

s2smanager: Send stream:features for incoming s2s connections which support XMPP 1.0

s2smanager: Give outgoing sessions a host field (the local one)

stanza_router: Add COMPAT comment for Pidgin workaround

net.server: Small logging improvements

net.server: Pass current time to timer callbacks

net.server: Increase SSL handshake round-trip limit, and make it configurable

net.server: Call handler's status() to notify it of ssl handshake success

net.server: Provide a way to get sslctx of a client connection

net.server: Provide a way to get sslctx of a server

xmppserver_listener: Add status() function to signal when a connection completes its SSL handshake

xmppserver_listener: Add logger to s2s sessions

xmppserver_listener: Small whitespace fix

xmppserver_listener: Better log messages on invalid XML

mod_dialback: Initiate dialback on incoming stream:features

mod_tls: Advertise and handle TLS for s2s connections

util.stanza: Add __type to metatable

sessionmanager: Use UUID for stream ids to clients, no math.random anymore :)

sessionmanager: Add c2s_timeout option for unauthenticated client connections

util.timer: Pass current_time to timer callbacks

mod_httpserver: Update to use new httpserver.new_from_config syntax

mod_bosh: Update to use new httpserver.new_from_config syntax

net.httpserver: Allow modules registering to provide more than just a default path when using httpserver.new_from_config

Merge with 0.5

util.muc: Fix location of <x> element on error replies

Merge with 0.5

mod_bosh: Fix for 'invalid key to next' error when 2 clients lose connection at the same time

net.server: Fix missing concatenation operator in error message

MUC: Prep given JID when changing affiliation.

Merge with 0.5

Merge

mod_register: Added helpful text to registration error responses.

mod_register: Changed error type for hitting registration rate limit from 'cancel' to 'wait'.

mod_register: Fixed: No error was returned if username failed nodeprep.

util.encodings: Removed a bit of unreachable code.

util.encodings: Included idn-free.h, which explicitly declares the idn_free function.

util.encodings: Fixed: Last change was not ANSI C compatible.

Merge with 0.5

modulemanager: Load modules for components, too

componentmanager: Preserve existing events table (if any) when registering a component

componentmanager: Fire event on component activation

componentmanager: Use create_component for, er, creating components

hostmanager: Only load vhosts, not components

Merge with 0.5

mod_saslauth: Prep username used for authenticating a session

Merge with 0.5

util.encodings: Don't throw an error but return nil when passed nil or a non-string value

Merge with 0.5

util.pposix: Compatibility with Solaris systems (thanks Filip)

util.signal: Change ifdef to allow signal.kill() on Solaris (thanks Filip)

Makefile: Don't combine variable export with assignment for compatibility with other shells (thanks Filip)

Merge with 0.5

Tagging 0.5.2

Merge with trunk

MUC: Added multi-session support to the room-exiting occupant use case.

MUC: Renamed a variable name.

MUC: Refactored to remove some duplicate code.

Merge with 0.5

Merge with waqas 0.5.2

Merge with waqas

mod_legacyauth: Don't allow server-generated resource identifiers, as these are not support by legacy auth.

mod_legacyauth: Undo auth on bind fail. Legacy auth is atomic.

mod_legacyauth: Added node and resource prepping.

Makefile.win: Updated the windows Makefile with more appropriate paths.

util.encodings: Fixed an issue with cross-module memory deallocation (crashes on some windows versions).

core.s2smanager: Always use last record in the DNS cache

net.dns: Even better parsing of nameservers from resolv.conf

Merge with 0.5

net.dns: Remove elements from the cache when expired so as to not leave holes in the array

mod_console: s2s:close: Use session:close() if that exists, otherwise just destroy the session

net.dns: Stricter matching of nameserver entries in resolv.conf

MUC: Added legacy error code to the presence error returned when a banned user attempts to join.

MUC: Added legacy error codes to nickname conflict presence errors.

Merge with trunk

MUC: Added MUC feature to the disco#info replies of rooms.

Merge with 0.5

net.dns: Respect commented nameserver entries in resolv.conf (thanks Remko)

mod_welcome: Change $user to $username in default welcome message (thanks to neustradamus for spotting)

Re-tagging 0.5.2

mod_httpserver: Configurable filesystem path to serve from

Re-tagging 0.5.2

prosody.cfg.lua.dist: Add example of declaring admins for a server

net.dns: (for some reason this commit didn't pull over from 0.5) Remove hard-coded 4.2.2.1 from dns.lua

Merge with 0.5

net.dns: Accidentally committed a hard-coded 4.2.2.1 nameserver

core.s2smanager: Don't recurse CNAMEs infinitely :)

net.server: Fix traceback when closing connections with buffered data get closed during send

Merge with 0.5

Tagging 0.5.2

Merge with 0.5

mod_vcard: Handle vcard requests from local components.

Merge with 0.5

mod_console: Show status and priority of clients

Merge with 0.5

s2smanager: Timeout unauthed s2s connections

util.helpers: It would be a good idea to fire an event when we say we are

Merge with 0.5

s2smanager: Compatibility with domains which use CNAMEs

Merge with 0.5

s2smanager: Pass A-record lookups through adns module

prosody: Add prosody.installed flag to indicate whether Prosody has been installed or is running from checkout

prosody: Add prosody.platform which can be either 'windows', 'posix' or 'unknown'

Merge with 0.5

net.adns: Utilise new net.dns API to handle DNS network errors

net.dns: Multiple internal changes and API extensions to allow for more reliable DNS lookups

net.server: Add checking for nil sockets to prevent traceback

ejabberd2prosody: Fixed a problem with null roster groups.

ejabberd2prosody: Fixed escape code processing when parsing strings.

ejabberd2prosody: Added support for ask='both' in subscriptions.

MUC: Removed some debug logging.

MUC: Added a send() method to the component. Fixes issues with local mod_vcard.

mod_vcard: Handle vcard requests from local components.

MUC: Correct routing of vCard requests to bare JID.

configmanager: Assign a chunk name to config files loaded using the default config loader (fixes issues with some diagnostic tools).

mod_offline: Fixed undefined global access.

ComponentManager: Removed unused variable.

ComponentManager: Removed dependency on core_route_stanza. The default component handler now replies using origin.send().

ComponentManager: Fixed: Default handler sent error replies on result stanzas.

ComponentManager: Fixed a bit of logging.

Merge with 0.5 (no changes!)

mod_httpserver: Backport from trunk more thorough validation of URLs prior to processing

MUC: Preserve stanza attributes for private messages.

MUC: Don't kick on errors in private messages.

MUC: Discard non-persistent rooms as soon as they become empty.

Removed util.muc (replaced by new MUC plugin library)

Removed legacy mod_muc (replaced by new one).

MUC: Removed commented code.

mod_console: c2s:show(): Group listed clients by host

Fix for Makefile hack to install MUC plugin

Updated the Makefile to work with the MUC plugin folder.

Merged with Tobias

Automated merge with http://prosody.im/source/hg

Add NODEprepping to SASL Digest-MD5 authentication handling.

MUC: Fixed traceback on unauthorized access of the room configuration form.

MUC: Added service discovery replies for rooms.

MUC: Fixed an undefined global access.

MUC: Added support for room configuration forms, persistence and hidden rooms.

MUC: Refactored IQ handling to be more easily extensible.

MUC: Added kicking support.

MUC: Fixed a variable scoping bug causing problems with presence routing on affiliation/role change.

MUC: Fixed: Unavailable presence was being sent for all role and affiliation changes. Now sent only for kicked occupants.

MUC: Changed a MUC library method into a function.

MUC: Fixed stanza routing for reloaded rooms.

MUC: Added support for reloading MUC library code.

MUC: Workaround for Miranda sending 'nick' instead of 'jid' when changing affiliation.

MUC: Some fixes for minor bugs in IQ handling.

MUC: Added support for requesting various lists (owner, admin, voice, etc).

MUC: An admin or owner MUST NOT be able to revoke moderation privileges from another admin or owner.

MUC: Owners can now modify roles and affiliations

MUC: Added support for generating unique room names

MUC: Send appropriate error to banned users on join.

MUC: Renamed _participants table to _occupants

MUC: New basic mod_muc based on the new MUC library

MUC: Initial support for roles and affiliations

MUC: Fixed function declarations.

MUC: The MUC lib is now metatable based. Cleaned up code, etc.

MUC: Added initial MUC lib

Merge with 0.5

datamanager: Fixed logging errors on deletion of datastores not owned by a user@host

mod_presence: Fixed: Don't recursively handle inbound presence directed at local host

modulemanager: Fixed: Internally generated stanzas could be missing namespaces, which causes tracebacks in logging (e.g., auto-generated offline presence)

net/dns: Fixed regression causing nameserver initialization to fail on Windows

mod_compression: Fixed: Starting compression only worked before auth

Merge with 0.5

ejabberd2prosody: More intelligent searching for erlparse library

Uncertain merge with 0.5's SASL

util.sasl: Fix 2 global sets (one a tpyo)

Allow ampersands in passwords for SASL PLAIN mechanism and fixing a typo.

Change variable name. The previous choice was too ugly looking.

Use NODEprep for prepping usernames used during SASL logins.

Do SASLprep for SASL PLAIN mechanism to be more conform with RFC 4616.

Don't allow double compression.

Support compression also after SASL.

Merge with waqas

mod_compression: Fixed some undefined global accesses

net.adns: Add some debug logging to help track down traceback

net.server: Add checking for nil sockets to prevent traceback

net.dns: Automatically add nameserver 127.0.0.1 if /etc/resolv.conf missing or empty on a non-Windows system (thanks Louis Mamakos)

Merge waqas with Tobias. Eww.

Removed util/discohelper.lua

Removed core/discomanager.lua

modulemanager: Removed unused variables and reference to core.discomanager

modulemanager: Removed unnecessary code in the unload function

modulemanager: Removed legacy disco#items hook

modulemanager: add_feature and add_identity APIs updated to use only the add_item API

componentmanager: Removed disco#items hook, and reference to core.discomanager

mod_disco: Rearranged some lines, and added a FIXME comment

mod_disco: Removed reference to core.discomanager

mod_disco: Removed legacy IQ hooks

mod_disco: Handle disco#items queries using new APIs

mod_disco: Added identity server/im with name 'Prosody'

mod_disco: Handle disco#info queries using new APIs

modulemanager: Added module API function to get all items for a given host based on a key

modulemanager: Module API functions add_item and add_feature updated to use the add_item API

mod_pep: Added name 'Prosody' to the pubsub/pep identity

modulemanager: Changed the add_identity module API to accept an optional name parameter (the 'name' attribute for the <identity/> element)

Added: functions add_item and remove_item to add and remove items to the module API

componentmanager: Added function to get a list of children for a given hostname

mod_register: Updated to use module:get_option instead of configmanager

mod_posix: Updated to use module:get_option instead of configmanager

mod_legacyauth: Added a FIXME

mod_legacyauth: Refactored a bit

mod_legacyauth: Updated to use module:get_option instead of configmanager

mod_legacyauth: Removed useless 'require' call on every login attempt

core.s2smanager, xmppserver_listener: Move the responsibility of setting session.log from the latter to the former for incoming sessions (outgoing are already like this)

xmppclient_listener: Remove useless comment

core.sessionmanager, xmppclient_listener: Move responsibility for setting session.log to the former from the latter, much more sensible

net.server: Comment all calls to mem_free/collectgarbage... not really suitable for a realtime server, let's trust Lua's GC - it's good.

Shutdown prosody if changing user or group fails.

Make mod_posix not complain about root user, if setuid is set to something different as root.

Add setuid and setgid support.

Remove print which was used for debugging purposes.

Using pcall to make save the rest from zlib fails. Emit errors on those fails.

Forgot to use the configured compression_level. Now it's used.

Add config option handling.

Another unwanted spaces at the end of a line.

Add a TODO for s2s compression support.

Remove space at the end of a line.

Add FIXME to remember TLS compression detection.

Actually inject de- and compression into the reading/writing functions.

Remove unwanted spaces.

Commit initial version of mod_compression.

Removing tabs at the end of a line.

mod_httpserver: Set default file handler (you can now request static files as /*) and restructure code a bit

net.httpserver: Allow overriding default request handler

mod_bosh: Strip BOSH namespace from stanzas to allow for some clients which may send them without the correct xmlns

mod_bosh: Calculate rid difference just once

mod_bosh: Basic handling of rids (more to come)

mod_bosh: Correct reply when closing sessions

net.httpserver: Don't log response bodies!

util.iterators: Add tail() iterator, to return the last n items

util.iterators: Add head() iterator, to return the first n items

Merge with Tobias

Moving realm at the beginning of the digest-md5 message send by the server.

Fixing a SASL issue by always passing the realm from SASL framework init to the handlers.

mod_bosh: Updated to use module:get_option instead of configmanager

mod_watchregistrations: Updated to use module:get_option instead of configmanager

mod_selftests: Mark as global

mod_tls: Updated to use module:get_option instead of configmanager

mod_selftests: Updated to use module:get_option instead of configmanager

mod_welcome: Updated to use module:get_option instead of configmanager

ejabberdsql2prosody: Removed unnecessary stanza reserialization for private storage

ejabberdsql2prosody: Added support for offline messages

ejabberdsql2prosody: Fix access of undefined global

mod_version: Rewritten to use new API. Added reply caching, and fixed some issues.

mod_version: Use the module API to read configuration options instead of configmanager

Merge with albert and waqas

Fixed: Zeros could be stripped from the version string the Makefile extracts from the local hg repository (thanks albert)

Merge with 0.5

Fixed: Outbound subscription requests silently dropped (regression in hg:7f17d0d00fbb)

mod_xmlrpc: Correct stripping of filename/line number prefix in RPC method error results

mod_saslauth: Fix coding style and layout, and use of arg[] for vararg

mod_saslauth: Fix indentation

mod_saslauth: Fix traceback on attempted login for non-existent users

Merge with 0.5

xmppcomponent_listener: Fix to collect component sessions on disconnect

Merge with 0.5

mod_bosh: Fix error reply for host-unknown errors

net.httpserver: Allow response.body to be a non-string

Merge with waqas

ejabberdsql2prosody: Added support for Private XML Storage

ejabberdsql2prosody: Added support for vCards

ejabberdsql2prosody: Added an XML parser

Merge with 0.5

Fixed: Self-references could be added to rosters via presence subscriptions

Fixed: IQ replies are not sent back on publishing a PEP event

Tagging 0.5.1

mod_console: EOT (Ctrl-D) closes the connection.

Merge with 0.5

MUC: Added the MUC child element to conflict errors 0.5.1

Added: Support for PROSODY_SRCDIR and PROSODY_PLUGINDIR environment variables

mod_pep: Added support for pubsub item retraction

Merge with 0.5

xmpp{client,server,component]_listener: Open stream if sending an error and it isn't already open. Fixes #120

mod_console: Finally add in the missing 'help' command \o/

configmanager: Default options appearing before Host "*" to global (fixes potential traceback)

hostmanager: Warn when user puts port configuration under vhost section

core.loggingmanager: Enable timestamps by default for file log sinks

net.server: Much improve SSL/TLS error reporting, do our best to understand and hide OpenSSL's ridiculously unfriendly error messages

ejabberdsql2prosody: Allow for multiple INSERTs to the same table

Merge with 0.5

Fixed: Possible duplicate error replies for unhandled stanzas

net.httpserver: Reduce log level of 'request left open' message

Merge with 0.5

mod_presence: Tag outgoing unavailables generated by a disconnect with a from attribute

xmpp{client,server}_listener: Report contents of packets containing invalid XML

mod_console: Show status and priority of clients

ejabberdsql2prosody: Fixed a nil global access error

ejabberdsql2prosody: Add support for rosterusers.ask == "B" (both pending in and out subscriptions)

ejabberdsql2prosody: Fix typo, and improve the warning message

ejabberdsql2prosody: Display a warning if a row has more columns than expected

ejabberdsql2prosody: Added support for all mysql escape sequences

ejabberdsql2prosody: Added support for the escape sequence '\\' in strings

ejabberdsql2prosody: Fixed: 'ask' value should be nil for pending-in subscriptions

ejabberdsql2prosody: Fixed: pending-in subscriptions could halt processing

ejabberdsql2prosody: Added support for rosters

ejabberdsql2prosody: Added a second required command line parameter: hostname

ejabberdsql2prosody: Improved help message

ejabberdsql2prosody: Initial commit

mod_xmlrpc: Remove file and line number from XML-RPC errors

mod_xmlrpc: Fixed typos

usermanager: Reduced some code

usermanager: Removed an unnecessary check

mod_xmlrpc: Added support for secure calls by non-admins

modulemanager: Added get_option(name, default_value) to plugin API

Switch to using a more generic credentials_callback/handler for SASL auth.

mod_saslauth, usermanager: Fetch list of mechanisms from usermanager

prosody: net_activate_ports: Check listener exists before trying to open port for it

Merge with 0.5

net.server: Fail to open port if legacy SSL requested, but SSL not available

prosodyctl: Also switch group when we switch user

pposix, mod_posix: Bump pposix version number

pposix: Add setgid() function

net.server: Remove listener from listeners table when calling removeserver

prosody: Correctly allow console ports to be changed through the config

mod_console: Set default_interface to 127.0.0.1

net.server: Set sslctx to false when SSL wrapping fails, to avoid attempting to wrap clients with a broken context

Merge with 0.5

ejabberd2prosody, erlparse: Add support for parsing non-ASCII strings and binaries, and atoms enclosed in single quotes

ejabberd2prosody, erlparse.lua: Convert from Windows line endings (thanks teo)

net.server: Continue to initialise port listener even when SSL errors occur

Merge with 0.5

mod_presence: Ignore presence sent to host and invalid JIDs, fixes traceback (thanks Deepspawn)

ejabberd2prosody, erlparse.lua: Convert from Windows line endings (thanks teo)

Merge with 0.5

pposix: Change LOG_EMERG -> LOG_CRIT, which makes more sense, thanks to intosi for reporting and an initial patch

mod_muc: Set correct 'from' JID when sending the room subject to joiners, fixes a traceback

Tagging 0.5.0

mod_muc: Expose rooms table to the host and plugins

prosody: Send friendly text with system-shutdown stream error

xmppclient_listener: Use error text as disconnect reason if there is any

mod_console: Add server:shutdown() command

mod_console: Add config:reload() command

prosody: Return success/error from prosody.reload_config()

mod_console: Rename server:reload() to server:insane_reload() (basically no-one should use it except me...)

Merge with 0.5

util.xmlrpc: Fixed table serialization (regression introduced in previous change) 0.5.0

Merge with 0.5

mod_httpserver: Update to use new new_from_config() too

mod_bosh: Update to use new new_from_config()

net.httpserver: Allow specification of the default base URL when using new_from_config()

Merge with 0.5

prosody.cfg.lua.dist: Add mod_pep to the default config file

Merge with 0.5

net.server: Initiate the handshake when we should, the more correcter fix for the previous correct fix

Merge with 0.5

net.server: Fix copyright header line endings and text

net.server: Correct fix for SSL traceback earlier

Merge with 0.5

mod_bosh: Mark a session as secure if it is created with HTTPS

net.httpserver: Mark a request as secure if it is made using HTTPS

Merge with 0.5

mod_httpserver: Use new httpserver helper to initialise ports

mod_bosh: Use new httpserver helper to initialise ports

net.httpserver: Add helper function to set up HTTP server according to given config options

net.server: Don't continue with socket initialisation if SSL handshake failed, fixes nil socket traceback

Merge with 0.5

net.server: Don't close handler if it is already nil when SSL handshake fails

prosody: Load util.helpers at startup

util.helpers: New util library to aid with debugging, etc.

prosody: Call initialisation functions at once

prosody: Start of refactoring of main file

util.pubsub -> util.broadcast

prosody.cfg.lua: Various small changes

prosody.cfg.lua.dist: Move enabled line higher up (people including myself often miss it)

prosody.cfg.lua.dist: Add auto-loaded modules to the config

mod_uptime: Fix bad uptime if module is loaded at startup

Remove version number from copyright headers

Add copyright header to those files missing one

stanza_router: Catch and log an error case which I don't think should happen (but sometimes seems to)

Remove completed items from TODO

util.pubsub: Fix undefined global accesses

util.sasl: Convert spaces to tabs

util.stanza: Convert spaces to tabs

util.hmac: Convert spaces to tabs

util.prosodyctl: Fix undefined global access

eventmanager: Convert from Windows line endings

mod_time Convert from Windows line endings

discomanager: Convert from Windows line endings

mod_ping: Convert from Windows line endings

mod_disco: Convert from Windows line endings

util.discohelper: Convert from Windows line endings

mod_presence: Convert from Windows line endings

util.events: Convert from Windows line endings

mod_console: Expose commands and environment table

modulemanager: Small code improvement, move autoloaded modules list to the top of the file

configmanager, modulemanager: Allow components to have modules specified in the config (but don't load the global set of modules for them)

mod_console: Add quit and exit as aliases for 'bye' command

mod_console: Check for commands when not executing in the global environment

prosodyctl: Quit when user pressed ^C in password prompts

prosodyctl: Don't 'blugh' when ^C is pressed during reading passwords

prosodyctl: Fix traceback when issued with no parameters

util.xmlrpc: Support for multiple parameters in requests

util.xmlrpc: Add create_request

mod_console: server:version() and server:uptime() commands

mod_uptime: Use time of server start rather than module load

mod_uptime: Convert to unix line endings

prosody: Record time the server started

s2smanager: Fix to correctly bounce stanzas if first connection attempt fails instantly

mod_console: Add c2s:close() command

net.xmppclient_listener: Fix potential traceback when no reason is specified for closing a session

Merged with trunk

mod_presence: Fixed: Presence probe replies now get sent to the full JID of the probe sender

Merge with main branch.

Remove to-unicode conversion because it's done in sasl.lua now.

Move to-unicode conversion from mod_saslauth.lua to sasl.lua.

Fixed decoding of parameters.

mod_console: Allow customisation/suppression of the banner

util.hmac: Some optimisations

util.hmac: Fix a global set

mod_presence: Send unavailable presence to resources from non-available resources on disconnect

Moved automatic unavailable presence generation on disconnect from sessionmanager to mod_presence

sessionmanager: Replace raw session by an event data table for resource bind/unbind events, allowing extra data

mod_presence: Broadcast presence to resources before contacts

mod_presence: Prevented normal presence from non-interested resources from being dropped

mod_presence: Changed handle_normal_presence to use a local roster rather than origin's roster

mod_presence: Simplified roster iteration

mod_presence: Eliminated a jid_split

mod_presence: Removed some unnecessary code

sessionmanager: Reset bare_sessions[user] after resource conflict resolution. Fixes the other stanza gobbling bug \o/

mod_presence: Declare t_insert, fixes a potential traceback

sessionmanager: Newly created sessions shouldn't have a priority. Fixes one of the stanza-gobbling bugs \o/

s2smanager: Log the hostname and address when s2s connection fails instantly

hostmanager: Add disallow_s2s to config, defaults to false unless anonymous_login is enabled, then defaults to true

stanza_router: Check host.disallow_s2s before routing over s2sout. you can haz no s2s.

Merged branches

Added man page for prosodyctl

mod_presence: Removed dead code

datamanager: Fixed incorrect callback result checking

mod_pep: Escape + in pattern

prosodyctl: Add message for not-running error

prosodyctl: Use prosodyctl_timeout option if it exists in the config

prosodyctl: Improve usability with status messages, and waiting up to 5s for the server to start/stop

mod_pep: Pass origin/session to publish_all()

Added HMAC utility module

prosody: Add fallbacks/ to path

Makefile: Install fallbacks/ directory

mod_offline: Initial commit

Merged with trunk

mod_pep: Fixed boolean indexing error while casting all messages for a user

Send xml:lang in stream headers, fixes #78

Making sure the node is in unicode when passing it to password lookup function.

Automated merge with http://waqas.ath.cx:8000/

modulemanager: Don't close stream on stream:error with unsupported-stanza-type (fixes #102)

prosody.cfg.lua.dist: Removed 'presence' from default modules list

stanza_router: Removed unnecessary xmlns check

stanza_router: Don't fire preprocessing events if stanza is not from full JID

Merge with nolan

Serialize unknown stanza before logging.

util.pluginloader: Append "@" to chunk names (fixes weird formatting in plugin tracebacks)

mod_pep: Fixed a nil access error

mod_pep: Use cached caps

Merged with trunk

mod_pep: Entity capabilities

Merge with nolan

net.httpserver: Don't upset logger when response is nil

Log stanza if stanza.to isn't set for some component errors.

mod_console: Reload/unload a module on a component host if it is loaded there

Automated merge with http://waqas.ath.cx:8000/

util.stanza: Serializer optimizations, and nicer output for empty elements

mod_pep: Broadcast only to available recipients with caps

mod_pep: Ignore presence subscriptions when extractng hash information

mod_pep: Added function get_caps_hash_from_presence

util.muc: Fixed duplicate parameter names in function room:set_subject

util.muc: Fixed incorrect parameters for a function call

mod_pep: Removed some YODO comments

mod_pep: Added handler for disco responses

mod_message: Advertise offline message support as per XEP-0160 (thanks nolan)

xmppclient_listener: Pass session close reason to destroy_session (to be used in unavailable presence)

mod_iq: Change sub-event names for IQ errors and results to use stanza IDs

util.stanza: Add stanza:get_text() to retrieve all child text nodes #api

stanza_router: Fire events also for stanzas to components

mod_message, mod_presence: Maintain list of top resources. Less work in routing messages to bare JIDs. - #optimization

util.events: Replaced ipairs with slightly faster numeric for loop - #optimization

util.stanza: Rewrote stanza_mt.__tostring. 20-30% faster stanza serialization. - #optimization

util.stanza: Remove numeric attributes while deserializing

xmlhandlers: Remove numeric attributes

stanza_router: Remove unused variables and code

stanza_router: A little refactoring

stanza_router: Remove unused variables

stanza_router: Remove even more old routing code

stanza_router: Remove some more old routing code

stanza_router: Call core_post_stanza from core_route_stanza in place of old routing code

stanza_router: Removed unused function: select_best_resources

stanza_router: Removed old routing code

mod_component: Rewrite jabber:client stanzas to jabber:component:accept, thanks JaredH!

mod_pep: Use new style events

mod_iq: Fire sub-events for IQ results and errors

mod_pep: Broadcast from the user's bare JID, not full JID

mod_pep: Remove data when a user disables a node

mod_pep: Added some comments

mod_pep: Fixed detection of contact presence changes

mod_muc: Now based on util.muc

mod_announce: Work with non-local admins

mod_announce: Use usermanager.is_admin to verify admin status

sessionmanager: Fire event on resource unbind

Automated merge with http://waqas.ath.cx:8000/

modulemanager: Enabled access to the module API from plugin libraries

modulemanager: Added simple module:require implementation

README: Update for new MUC address

prosodyctl: Allow commands to be implemented in modules

modulemanager: Expose api table to allow others to extend the module API

mod_groups: Support for public groups, and extra logging

util.pluginloader: Remove unnecessary return value suppressing the real load error

modulemanager: Fix copy/paste error, should be name instead of module_name

mod_announce: New module to send a message to all online users

mod_httpserver: Allow configuration of ports and base path, like mod_bosh

mod_groups: Experimental shared roster support

prosody: Switch anonymous_login check to use the new datamanager callback syntax

util.datamanager: Allow multiple data storage callbacks, and allow them to modify parameters

rostermanager: Fire event on roster load

sessionmanager: Fire event on resource bind

modulemanager: Call 'load' method when loading a module

Merge with Tobias

Adjust PLAIN and DIGEST-MD5 mechanisms to new password_handler API.

Adding a parameter for realm to the password_callback.

Adding COMPAT comment.

util.array: Add support for + operator to create a new array from two arrays joined

util.array: Make array:reverse() and array:shuffle() return the array to allow chaining

util.array: Add array:append() method, to append a new array to an existing one

stanza_router: Skip prepping 'to' in many common cases - #optimization

stanza_router: Skip prepping 'from' on c2s origins - #optimization

stanza_router: Fixed a corner case where processing could continue after an error reply

stanza_router: A little refactoring

componentmanager: Using prosody.events instead of core.eventmanager

Main: Don't use empty event data objects for some global events. Some handlers don't expect it.

Main: removed some eventmanager references (replaced by prosody.events)

Fire global events using prosody.events

Merge with trunk

modulemanager: Removed unused function get_module_filename(name)

modulemanager: Changed to use util.pluginloader

util.pluginloader: Initial commit - a plugin resource loader

stanza_router: Remove unused variables

Removed core.presencemanager. This has been superseded by mod_presence.

stanza_router: Remove all traces of presencemanager

mod_roster: Removed references to presencemanager and core_route_stanza

mod_roster: Using core_post_stanza in place of core.presencemanager.handle_presence

util.muc: Relaxed top-level routing checks to allow node-less rooms, and removed redundant checks

util.muc, mod_muc: Commented rewriting of vCard requests' recipients' JID from full to bare, and marked it as a TODO

mod_muc: Don't reply with an error in response to unacceptable result stanzas

util.muc: Don't reply with an error in response to unacceptable result stanzas

util.muc: Fixed error occuring on room leave

stanza_router: Use stanza.attr.from's host instead of origin.host when routing stanzas to remote hosts (fixes problem with sending from node@host components)

Merge with waqas via albert!

modulemanager: Change the ideitity attribute typ to type

s2smanager: Remove srv_hosts from session when connected, this fixes attempting to reconnect s2s sessions when they are closed during shutdown

loggingmanager: Log timestamps when using default file logging

loggingmanager: Enable debug level for default file logging when 'debug' mode is enabled in the config

mod_console: Redirect print() to console session when executing commands in global environment

mod_console: Fix syntax error

mod_console: Add s2s:close() to close s2s sessions between two hosts

Automated merge with http://waqas.ath.cx:8000/

mod_pep: Add pubsub#publsih disco feature to host

mod_dialback: Change FIXME comment to COMPAT

Automated merge with http://waqas.ath.cx:8000/

mod_pep: Add host identity pubsub/pep

modulemanager: Added function add_identity(category, type) to the modules API

Merge

mod_pep: Fix a nil index bug

net.http: (Re-)add url[en|de]code functions

modulemanager: Use module_name in log entry to fix 'error initialising module "nil"' error

mod_message: Require stanza lib to prevent traceback on error replies

Automated merge with http://waqas.ath.cx:8000/

mod_pep: Give the presence handler a higher than default priority

modulemanager: Allow setting a priority while adding an event handler via the module:hook API

mod_pep: Send items to contacts coming online

mod_pep: Fix undefined global access

mod_pep: Maintain user nodes for delayed delivery

mod_console: Show total incoming/outgoing s2s connections

modulemanager: Don't require xmlns to be non-nil

modulemanager: module:log() -> self:log() fix

modulemanager: Allow setting priority of stanza handlers

modulemanager: Add module:hook([xmlns, ] name, handler) which uses new stanza events

mod_console: Allow running code in the global environment by prefixing with '>'

mod_console: Some "improvements" to the useless server:reload() command :)

mod_console: Much improved module load/unload/reload commands

prosody: prosody_reload_config => prosody.reload_config (guess I accidentally missed it when converting the others)

prosody: Prefix hg: to changeset ids in the version

mod_version: Use version from prosody.version

prosody: Read version from prosody.version file and set, er, prosody.version!

Makefile: Experimental support for recording the version of an installed Prosody

modulemanager: Load mod_message, mod_iq and mod_presence implicitly

s2smanager: Use a UUID as the dialback secret

stanza_router: Remove unused s2s dialback functions

Merge with trunk

util.sasl: Remove some nastiness

util.uuid: Added function seed(string) to allow further seeding of the PRNG

util.uuid: Now generates RFC 4122 complaint UUIDs (version 4 - random)

util.uuid: More uniqueness!

sessionmanager: It really is username@host, not host@username :)

Makefile: Set data directory permissions to 750 on install [thanks Dwayne Bent]

Makefile: Specify permissions on installed executables [thanks mhavela]

prosody: Add support for general 'interface' option which is used as the default network interface

net.server: Display server port in error messages

Adding .hgignore

My merge!!!!

stanza_router: workaround for a Pidgin bug which sets 'to' to the SRV result

mod_privacy: Initial commit

stanza_router: Remove the 'to' attribute when it's value is the bare JID of the local user sending the stanza

prosody.cfg.lua.dist: Enable mod_register by default, but with registration disabled, and add a comment about it

sessionmanager: It's username@host, not host@username :)

mod_message: Fix global access

mod_iq: Limit sub-events to get and set IQs

mod_presence: Fix a global access

mod_presence: Check for nil 'to' attribute in all cases for outgoing stanzas

mod_presence: Check for nil 'to' attribute in all cases for incoming stanzas

mod_presence: return true from incoming presence handlers to prevent further processing

mod_presence: Handle non-subscription presence and routing

mod_presence: Handle subscriptions and probes

mod_presence: Add hooks for inbound presence

mod_presence: Fix a comment

mod_presence: Handle all outbound presence stanzas

mod_presence: A little cleanup

mod_presence: Remove JIDs from directed presence list on sending error or unavailable presence

mod_presence: Handle outbound presence to full JIDs

mod_message: A little cleanup

mod_message: mod_message now handles all cases

stanza_router: Reply with an error on groupchat messages to bare JID

mod_message: Added code to handle error groupchat and headline messages to bare JID

mod_message: Move bare JID processing to it's own function

stanza_router: Don't reply with an error on invalid JIDs in error or result stanzas

stanza_router: Proper error for clients sending stanzas after auth but before resource binding

mod_iq: Correctly handle the lack of 'to' on IQs

mod_iq: Immediately return an error for IQs to non-existing bare JIDs

mod_iq: Include event data in sub-events

mod_iq: Error reply for IQ to non-existing session. mod_iq now handles all 'iq/full' cases

componentmanager: Create events object for configured hosts, and carry it over to a new component if one is registered with no events object

Merge backout with following commits

Backed out changeset 98f0e9eadf3b (better fix on the way)

Automated merge with http://waqas.ath.cx:8000/

mod_iq: Fire sub-events for IQs directed at bare JIDs and hosts

modulemanager: Keep track of event handlers added by module:hook, and remove them on module unload

stanza_router: Don't route before firing events... waqas, is this safe?

componentmanager: Add events object to registered components if they don't already have one

stanza_router: Fire global event if host doesn't have events, fixes #103

net.xmppclient_listener: Add small comment

stanza_router: Fire events for non-jabber:client and pre-auth stanzas

modulemanager: Stopped using core.eventmanager in module:fire_event

mod_welcome: Use module:hook instead of module:add_event_hook

mod_watchregistrations: Use module:hook instead of module:add_event_hook

modulemanager: module:fire_event now fires on the global and host-specific events objects as well

xmppcomponent_listener: Removed unused reference to core.eventmanager

modulemanager: Made some code more concise

modulemanager: module:hook now allows global modules to hook events on the prosody.events object

Removed core.eventmanager2

mod_presence: Changed to use the prosody.events object directly, rather than through eventmanager2

stanza_router: Changed to use the prosody.events object directly, rather than through eventmanager2

core.eventmanager2: Now uses the new prosody.events object

Added new prosody.events object

mod_console: c2s:show(), c2s:show_secure(), c2s:show_insecure()

mod_console: Allow restricting results to matching JIDs in s2s:show()

prosody: Remove global functions

mod_posix: Use global prosody object

prosody: (un)lock_globals() -> prosody.(un)lock_globals()

prosody: New global 'prosody' object

Automated merge with http://waqas.ath.cx:8000/

mod_message, mod_iq: A little cleanup

mod_iq: Initial commit

mod_message: Initial commit

modulemanager: Added hook(event, handler) to the plugin API

stanza_router: Fix syntax errors

Automated merge with http://waqas.ath.cx:8000/

stanza_router: Fire per-host stanza events

httpclient_listener: Don't use print()...

sessionmanager: Removed a redundant check

sessionmanager: Fixed an old FIXME: A problem caused by an error on an authenticated but unbound session

sessionmanager: Add/remove sessions from full_sessions and bare_sessions when binding/unbinding sessions

sessionmanager: Added reference to globals full_sessions and bare_sessions

sessionmanager: Removed reference to global 'sessions'

Added globals bare_sessions and full_sessions, which map bare and full JIDs to sessions.

Removed unused global 'session'

mod_tls: Add <required/> to stream feature when TLS is required

mod_legacyauth: Hide stream feature when secure auth is enabled, and session isn't secure

mod_saslauth: Don't offer bind/session when they aren't authenticated yet :) [thanks albert, again...]

mod_saslauth, mod_legacyauth: Deny logins to unsecure sessions when require_encryption config option is true

xmppclient_listener: A connection is also secure when it uses legacy SSL

net.server: A connection is not secure if we delay the TLS handshake

sessionmanager, mod_tls: Mark a session as secure when TLS is active

stanza_router: Break off resource selection for messages into a standalone function

mod_presence: Lower some log levels to their correct values

mod_presence: Use logger supplied by modulemanager

mod_presence: Leave alone the from attribute of session.presence. Big thanks to albert for figuring out the steps to reproduce this bug, and for giving us a ([very] slight) performance increase!

Add log message when DNS lookup is cancelled

net.adns: Fix for calling handler when cancelling DNS lookup

mod_watchregistrations: admin -> admins

prosodyctl: Add error message for no-pidfile

s2smanager: Timeout DNS requests after 60 seconds (or dns_timeout in config)

net.adns: Add support for cancelling a non-blocking lookup, optionally calling the handler

net.dns: Add support for cancelling a coroutine-based request

mod_watchregistrations: New plugin to send a message to admins when a new user registers

mod_roster: Add some comments for the error cases to improve readability

s2smanager: Only send reply </stream:stream> when connection is still open

mod_roster: Don't send a query element in roster response if roster is unchanged

Merge with 0.4

Tagging 0.4.2

Close std{in,out,err} when daemonizing 0.4.2

Tagging 0.4.2

Merge with 0.4

Finally add README and INSTALL files

Merge with 0.4

stanza_router: Fix for subscriptions to users on components [0.4 branch only]

mod_register: Attach session to user-registered and user-deregistered events

core: hosts[*].events

Merge with 0.4

mod_saslauth: Fix logic error which prevented SASL ANONYMOUS from working

mod_welcome: New plugin to welcome users who register on the server

mod_register: Fire events and log on account creation/deletion

modulemanager: Add module:fire_event() to module API

stanza_router: Handle outbound presence if inbound handlers don't catch it

util.events: Dispatch code now accepts a variable number of arguments

util.events: Much more efficient index building

stanza_router: s/conn/stream/ in log message

stanza_router: Remove FIXME and replace with meaningful comment

componentmanager: Don't error on stanzas to bare component JID

prosody.cfg.lua.dist: Update example to a better one

util.events: handler priorities

modulemanager: require util.stanza

modulemanager: Don't close the stream on unhandled stream:features

stanza_router: Added global function core_post_stanza

util.jid: Eliminate global method use

util.muc: Made internal methods local

stanza_router: Improved message routing order

Dropped support for resource based components

stanza_router: Removed global function core_handle_stanza

Automated merge with http://waqas.ath.cx:8000/

stanza_router: Cleaner namespace handling

stanza_router: Refactored core_handle_stanza, and added handling for unsupported top-level stanzas

stanza_router: Fire events after all checks

Merging SASL buggy client workaround with current tip.

.

Some beauty treatment.

Adding minimal support for authorization identities to workaround buggy SASL implementations.

adding RFC comment

stanza_router: Removed some unnecessary code

stanza_router: Removed a FIXME

xmlhandlers: Removed another unnecessary check

xmlhandlers: Removed an unnecessary check

core.xmlhandlers: Removed unused variables

stanza_router: Fixed an invalid stanza check

util.stanza: Omit unused clone parameter from error_reply()

mod_presence: Added a FIXME comment about directed presence

stanza_router: Remove unnecessary directed presence handling

stanza_router: Prevent further processing of a handled stanza

mod_presence: return true from the presence handler

util.events: event handlers can now return a result, which also interrupts further handling of the event

util.muc: A MUC library - initial commit

Merge with 0.4

stanza_router: Bounce stanzas to/from invalid JIDs with a jid-malformed error

stanza_router: Pass session.to_host to modulemanager, fixes modules for s2sin_unauthed

mod_muc: commented connection replace detection code because google keeps resendng directed presence

mod_muc: s/broadcast_history/send_history/ - since the cast isn't broad

mod_muc: Extracted sending of occupant list into its own function

mod_muc: Extracted history broadcast into its own function

fallbacks/bit: bit manipulation API (compatible with bitlib for now)

mod_pep: Initial commit (extremely basic implementation)

util/serialization: Fixed serialization formatting

util/sasl: Removed unnecessary references to util.encodings.idna

mod_roster: Advertize roster versioning support

Default config: Add 'presence' to list of modules

Merge with 0.4

util.prosodyctl: Import CFG_SOURCEDIR from the global environment (thanks macaronyde!)

Tagging 0.4.1

util.serialization: Write nil for non-serializable data types, and bump the log level to 'error' 0.4.1

tools/ejabberd2prosody: Fixed private storage export

tools/ejabberd2prosody: Fixed private storage export

Merge with 0.4

prosodyctl: Add message for unable-to-save-data error

util.prosodyctl: Return success status of usermanager.create_user()

prosodyctl: Reformat note to fit in small-width terminals

Merge with 0.4

prosodyctl: Use correct path for the data directory

Merge with 0.4

mod_posix: Reload the config and reopen log files on SIGHUP

loggingmanager: File log sinks react to reopen-log-files event

prosody: Add functions to reload the config and re-open log files

prosodyctl: status: Show warning if we can't find a running Prosody, and we didn't switch user

prosodyctl: Switch to Prosody user before attempting to do anything

net.httpserver: Fix for urlencoding to always produce 2 digits

Merge with 0.4

net.http, net.httpserver: Remove urlcodes table... it really isn't needed (thanks Jan Harkes)

net.httpserver: Fix potential nil access

mod_bosh: Give BOSH sessions a logger (thanks Florob)

mod_component: Vastly reduce the code, having split most of it to where it should be, xmppcomponent_listener

util.serialization: Log a warning when trying to serialize something we can't

prosody, xmppcomponent_listener: Add listener for XEP-0114 component connections

modulemanager: No need for print()

util.multitable: No globals today, thank you. Fixes missing table entries and a potential traceback

Merge with 0.4

prosodyctl: Hide ejabberd compatibility commands from command listing

loggingmanager: Support for specifying a single sink with *sinkname (*syslog should now work)

Merge with 0.4

net.connlisteners: Lower log level of multiple listeners warning (not interesting to end-users)

net.server: Add getserver() method to find the server listening on the specified port

util.datamanager: Lower log level of 'Setting data path' to 'debug'

componentmanager: Reduce log output at startup to 'debug'

hostmanager: Reduce log output at startup to 'debug'

modulemanager: Don't load modules when modules_enable is false

prosody: Less verbose logging during shutdown sequence

mod_posix: Don't let the server run as root without the magic run_as_root in config

prosody: Define prosody_shutdown() before emitting the server-starting event

Makefile: Process and install prosodyctl

prosodyctl: Multiple fixes for start/status/stop

Merge with 0.4

prosodyctl, util.prosodyctl: New prosodyctl utility for managing Prosody servers

prosody: Add log messages during shutdown sequence to indicate progress

mod_console: Add s2s:show() command to list s2s connections

prosody: Don't require console_enabled option anymore

Merge with 0.4

Word-wrap HACKERS file

configure: Change --data-dir to --datadir to make consistent with help and other dir flags

loggingmanager: Add a comment about 'nowhere' sink type

Merge with 0.4

loggingmanager: Support prepending timestamps in file/console/stdout log sinks

mod_dialback: Miscellaneous logging improvements, changing levels, improving messages and using session loggers where possible

sessionmanager: Miscellaneous logging improvements, changing levels, improving messages and using session loggers where possible

s2smanager: Miscellaneous logging improvements, changing levels, improving messages and using session loggers where possible

presencemanager: Lower log level of a message

mod_saslauth: Remove 2 instances of raising errors and replacing with more graceful handling

mod_saslauth: Various logging fixes

mod_saslauth: Use module logger instead of creating a new one

mod_dialback: Use module logger instead of creating a new one

modulemanager: Update logger when a module becomes global

Merge with 0.4

loggingmanager: Add ability to set 'log' config option to a filename, which causes all levels >= info to be logged to that file

Merge with 0.4

mod_*: Fix many unnecessary global accesses in modules (already committed to main repo)

core.componentmanager: Really fix marking components as disconnected when unregistered

configure: Honour --sysconfdir parameter; thanks to Michael Scherer

mod_posix: Fix calls to log() (replace with module:log) and make some global accesses explicit

mod_posix: Fix for removing the pidfile on exit

mod_muc: The default component name is now 'Chatrooms'

mod_muc: The default room name is the room node

Automated merge with http://waqas.ath.cx:8000/

mod_presence: Broadcast a user's presence to only the user's 'available' resources

mod_muc: The default component name is now 'Chatrooms'

mod_muc: The default room name is the room node

Merge with 0.4 branch

net.httpserver: Fix traceback when sending response to a destroyed request

net.httpserver: Don't log the response body (can be binary data...)

xmlhandlers: Fix tag pattern again for the default namespace

Merge with 0.4 branch

mod_bosh: Put dummy authid in session creation response to keep JSJaC happy

mod_bosh: Add log message for clients connecting to unknown host

mod_bosh: Fix nil indexing when client connects to unknown host

core.loggingmanager: Reinstating global log() function

mod_posix: Remove some debug coooooooooode

mod_presence: Fix for local presence subscriptions and probes

stanzarouter: Make _G.hosts local

mod_*: Fix a load of global accesses

core.componentmanager: Fix global access

xmpp{server,client}_listener: Fix global accesses

net.server: Fix global access/incorrect parameter

net.httpserver: Fix potential nil access

net.http: Fix potential nil access

net.server: Fix incorrect parameter passing

net.server: Fix global access

Merge with 0.4.1

mod_posix: Integrate with loggingmanager, register syslog sink, remove redundant logging code

mod_posix: Remove pidfile on exit

core.loggingmanager: Refactoring, converted to a module. Now possible to register additional sink types (think syslog) from other modules

util.set: Add set.xor() to get a set consisting of items not in both sets

util.set: Add set:empty() to discover if the set is the empty set

util.set: Add metatable to sets to allow +, -, /, ==, tostring and to double as iterators

util.array: Add array.collect() to collect results from iterators into an array, and use module() to correctly set the module name

prosody: Fire events during server shutdown process

Merge with 0.4.1

core.loggingmanager: Add default logging settings (to console) and fill out code for adding sinks which catch all sources

mod_presence: Remove some rather drastic debugging code

Merge with 0.4.1

core.loggingmanager: Filled out most code, and cleaned up

util.logger: Fix for attempting to call a table

mod_presence: Fix incorrect internal routing for probes and subscriptions

Merge with 0.4.1

prosody: Remove logging code and instead load core.loggingmanager to set up logging

core.loggingmanager: A new manager (yay!) to manage log output

util.logger: Revamped logger library, but backwards-compatible for users of logger.init()

Merge

core.s2smanager: Buffer data sent before connection

core.s2smanager: Logging improvements

Merging stable into unstable

net.adns: Call handler for records already cached

componentmanager: Set host.connected = nil when deregistering a component so that we fully restore it when we reload

core.xmlhandlers: expat is the XML parser, not us. Don't reject valid XML.

Merge

prosody: Simple whitespace fix in error output

core.configmanager: Fire event when (re)loading config file

net.server: Fix potential nil handler usage

Automated merge with http://waqas.ath.cx:8000/

Stopped using presencemanager in stanza_router

Automated merge with http://waqas.ath.cx:8000/

mod_presence: initial commit

core/eventmanager2 - new event manager

Allow setting LFLAGS with ./configure --lflags=

mod_debug: Set default interface to 127.0.0.1

net.server: Simple logging fix

core.s2smanager: Don't initiate dialback if we don't have a connection yet

net.server: Remove some debug code which slipped through

Makefiles: Add signal.so to install targets

prosody: Add prosody_shutdown() function to initiate a server shutdown, add code to gracefully close connections before stopping

mod_posix: Allow logging and pidfile options to take effect without needing to daemonize. Add the ability to catch SIGTERM.

xmppserver_listener: Add session:close() method to outgoing s2s connections too

net.server: Add server.setquitting() to gracefully quit the socket loop

util.lsignal: Add lsignal library for catching POSIX signals

Makefiles, util.signal: Add lsignal library for catching POSIX signals

componentmanager: Set core_route_stanza after stanza_router is loaded

componentmanager: Use core_route_stanza to reply in the default component

componentmanager: Restore default component when unregistering

componentmanager: Small logging fix

componentmanager: Improve default component stanza handler

mod_component: Deregister component on disconnect

net.adns: Flush buffer after sending DNS request

mod_component: Update for new net_activate_ports

Allow config to specify listening interfaces

Remove more debugging code which was accidentally committed (don't trust hg)

core.s2smanager: Remove some debugging

Merge

Merge

net.adns: Catch errors in DNS response callbacks

prosody: Don't look to use SSL when LuaSec not available (thanks Florob)

Merge

sessionmanager, componentmanager: Fix some wacky indentation (thanks greyback!)

mod_debug: Run on a different port, and use a different listener to mod_console

Automated merge with http://waqas.ath.cx:8000/

Fixed: Send correct error reply for IQs directed at unavailable resources

Fixed: Issue with presence error routing

mod_muc: Fix malformed presence stanzas (thanks elmex)

util.stanza: stanza:reset() method to reset building state

core.s2smanager: Look away... wait for it... now! Hopefully s2s should be back to normal.

net.server: Ensure some logging parameters are strings

componentmanager: Reply with service-unavailable for unconnected components

core.s2smanager: Check for valid host and port before attempting connection

sessionmanager, s2smanager, mod_component: Send reply </stream:stream> when client closes stream

net.httpserver: Don't log that a request has been left open if it is destroyed

util.dataforms: Allow form layouts to specify default values for fields

util.dataforms: Set form type when generating a form

util.dataforms: Support for retriving the field value data from forms

util.dataforms: Fixes for hidden field type

util.dataforms: Fix some field types which didn't render properly

util.dataforms: Add support for <required/> fields

util.dataforms: Fixed to actually work, mostly

core.sessionmanager: Hop out of <status> tag so that MUC doesn't insert into the wrong level

Tagging 0.4.0

Tagging VERSION 0.4.0

mod_bosh: Fix to correctly timeout idle sessions

mod_debug: Some updates

core.componentmanager: Fix global set, causing problems with multiple components. Fixes #82.

mod_debug: New debug module (a simplified mod_console, with raw Lua access to a running Prosody's internals)

Add lock_globals() and unlock_globals() functions (for when you really need to use globals)

Load util.array and util.iterator at startup

Automated merge with ssh://hg@prosody.im/prosody-hg

Move SSL initialisation into the correct spot (thanks albert)

Added: componentmanager: Automatically add component.host.name to the disco items list of host.name

Fixed: Some nil access bugs

Added: MUC: Room invites

Added: util/events.lua: An event handling library

Fixed: mod_saslauth: "anonymous_login" currently makes SASL ANONYMOUS an exclusive mechanism. Corrected advertised mechanisms and error replies.

Fixed: mod_saslauth: Changed anonymous host option from "sasl_anonymous" to "anonymous_login"

Added: Prevent disk writes for anonmous hosts (option: core/anonymous_login = true)

Added: datamanager: Allow a callback to be installed which selectively prevents disk writes

Fixed: s2smanager: Apply nameprep on hostnames passed in stream tag (part of issue #57)

Fixed: sessionmanager: Apply nameprep on hostname passed in stream tag (part of issue #57)

Fixed: modulemanager: IQs with extended elements in the default namespace could cause backtraces (related to issue #74)

Fixed: mod_roster: Prep JIDs being added to roster (part of issue #57)

Fixed: mod_register: Node prepping was not being applied to usernames (part of issue #57)

Fixed: mod_regster: traceback when removing accounts

Fixed: rostermanager: Create new roster item if one doesn't exist on subscription approval (fixes issue #77)

Fixed: stanza_router: Respond with correct stanza error on malformed stanzas

Fixed: net/http.lua: HTTP request callback wasn't being called on some errors

util.array: Add :reverse() method

util.datetime: Allow specifying a time to format

util.array: Expose array.* functions, to be used for unwrapped arrays

util.iterators: New iterators library

util.array: New array library

util.set: Rename private items container, optimise set.difference() and add set.intersection()

core.rostermanager/mod_roster: Support for roster versioning

util.datamanager: Don't delete data when first entry in table is 'false'. My favourite bug so far.

mod_component: Remove some commented code

core.configmanager: Make components use 'component' module by default if none specified

Update example config, categorise modules, add new modules

prosody.cfg.lua.dist: Remove some factual inaccuracies

mod_component: Use net_activate_ports to start port listener based on config

mod_component: Set default listening interface to 127.0.0.1

net.connlisteners: Allow listeners to specify default interface

prosody: Expose net_activate_ports as a global function for use by plugins

prosody: Allow ports to be specified as just numbers

util.set: Fix to make constructor work, and functions defined correctly

util.set: New util library

net.http: Don't throw error on invalid URLs. Fixes #56.

Add initial mod_component for XEP-0114 support. Albert, where are you?

net.xmppclient_listener: Set default namespace to jabber:client

net.xmppserver_listener: Set default namespace to jabber:server

core.xmlhandlers: Filter out default stream namespace from stanzas

core.stanza_router: Allow routing from components

Merge

Merge

Don't reject some valid IQs. Thanks to elmex for spotting.

0.3->0.4

Automated merge with http://waqas.ath.cx:8000/

mod_xmlrpc: Limit usage to admins

mod_legacyauth: Added stream feature: <auth xmlns='http://jabber.org/features/iq-auth'/>

usermanager: Added is_admin(jid)

Added core.objectmanager

util/xmlrpc: Added <nil/> extension to RPC functions (allowing nil parameters and return values)

mod_saslauth: Disable SASL ANONYMOUS unless explicitly enabled with sasl_anonymous = true

net.adns: Set new send in net.server after 'connecting UDP' socket

net.server: Allow replacement of send function on an open socket

util.logger: Small code tidying :)

Support to filter logging by source via pattern matching from config file.

prosody: Load logger after reading the config

Automated merge with http://waqas.ath.cx:8000/

XML-RPC: Set appropriate Content-Type header in HTTP response

MUC: Kick participants for error replies only on a selected list of error conditions

Let global modules add disco features for all hosts

mod_xmlrpc: Handle RPC stanzas sent over XMPP (XEP-0009: Jabber-RPC)

Allow global modules to hook stanza handlers

Added mod_xmlrpc

Added util/xmlrpc.lua - functions for converting between XML-RPC stanzas and Lua objects

core.presencemanager: Convert Windows line endings to UNIX

net.adns: Return _M

net.adns: Load the correct dns lib

net.adns: Add helper module for performing non-blocking DNS lookups

net.dns: Add methods necessary for allowing non-blocking DNS lookups

net.server: Don't call shutdown method on socket if it doesn't have one, eg. for UDP

net.server: Check for potential nil handler on close

mod_bosh: Set Content-Type in response headers

pposix: Standardize error messages

pposix: Small fix for copyright notice

Automated merge with http://luaetta.ath.cx:1234/

Merged with main tip.

Make the code actually build.

Added missing code.

Adding setrlimits() binding.

tests: Add test for iq error replies

core.configmanager: Small fix to check validity of Component definitions

mod_muc: Don't bounce error replies in response to errors

net.server: Fix to make sure we send a string to logging function

core.stanza_router: Don't bounce errors to iq type=result/error

prosody: Log top-level errors

core.s2smanager: Remove some old commented code, break a long line in 2

util.dataforms: Return the form

net.server: Don't retry if client closes socket during SSL handshaking

Adding initial util.pubsub

core.stanza_router: Reply with error to groupchat messages directed at unavailable resources or offline users

core.componentmanager: Refactor a little to make XEP-0114 plugin a little simpler

net.server: Some fixes for SSL/TLS handshake handling

util.dataforms: First commit, incomplete

core.xmlhandlers: Remove redundant check in condition

prosody: Protect main loop. Dare I say crashing finally becomes impossible.

util.timer: More small fixes I forgot to commit

util.timer: Fix crash when loaded but no tasks set, fix skipping some tasks when multiple set, and one removed

util.multitable: Add mt:search(), use nil for wildcard keys

Better handling of found, but unloadable, core libraries (eg. undefined symbols)

core.xmlhandlers: Optimise completed stanza logic

net/xmppclient_listener: Add some logging and handle unestablished sessions error'ing

mod_register: Fixed an error happening during account deletion

MUC: Added copyright notice

MUC: Replaced some duplicate code

MUC: Removed commented and unused code

Added util/timer.lua - a timer API

MUC: Workaround for a Gajim bug (it includes <x xmlns='http://jabber.org/protocol/muc'/> in nick change presences)

MUC: Use util.stanza.clone instead of pre/deserialize for cloning stanzas

util/stanza: Added clone function

MUC: Syntax error in last commit - this is lua :)

MUC: Throw an error if we try talking to ourselves

core.presencemanager: Set 'from' attribute on outgoing unavailable directed presences

Automated merge with http://waqas.ath.cx:8000/

MUC: Bug fixes and workarounds

Automated merge with http://waqas.ath.cx:8000/

MUC: Logging - logger doesn't like nils

Automated merge with http://waqas.ath.cx:8000/

MUC: Added logging

Automated merge with http://waqas.ath.cx:8000/

MUC: Various fixes

MUC: Fixed: Presence for user joining the roomi was sent twice to the user

mod_bosh: Possible fix for invalid key to next crash

net.server: Fix some more potential nil handler accesses

Merge from waqas

Merge waqas with waqas

MUC: Made vCards work by redirecting vCard requests to bare JIDs

MUC: Kick participants sending error messages to other participants

MUC: Private stanzas (private messages, IQs, etc)

MUC: Presence and message stanzas now fully work (status messages, xhtml-im, etc)

Added tests/run_tests.bat for running tests on Windows

Fixed tests/test.lua to work on Windows

Logging format improvement

Logging format improvement

util.pposix: Add getuid/setuid (we don't use them yet)

mod_version: Operating system detection. Disable with hide_os_type = true in config

Add -Wall to default CFLAGS

Adding TODO notice on UUIDs for usage with SASL ANONYMOUS.

Merging with tip.

Adding inital support for ANONYMOUS mechanism in SASL.

Use $CC, $LD in Makefile. Add --c-compiler, --linker flags to ./configure script. Add --lflags to ./configure script. Thanks to Lorenzo for the initial patch!

Add tests for util.multitable

util.pposix: Fix incompatible pointer type compiler warnings

Add RunScript command to config to run a Lua script prior to starting the server

Add Include command to include extra configuration files from the main one

Report errors in the config file to the user

Fix to correct my email address in AUTHORS file

Fixed: kick_old resource conflict resolution policy could fail with a backtrace

Fixed: User resources not disconnected correctly on account delete

stanza_router: Fix handling of iq from c2s to bare JIDs, thanks to jaharkes for spotting

Add test to check for incorrect handling of iq from c2s to local bare JIDs

Small fix to change verbosity level of subtests

Correct tests for stanza routing IQs to bare JIDs

Merge with waqas for MUC/routing fixes

Change the to attribute of messages to the recipients' bare JID when the recipient/resource is offline.

Stanza router: Message to bare JID fixes

mod_muc: Room history

Fixed: Some presence stanzas from local users were not being routed correctly to components (ghosts in mod_muc)

Fixed directed presence handling to work correctly for components

Changed mod_muc to work with changed component manager

modulemanager initializes hosts[host] if it isn't already initialized when loading a module.

Component-host module loading code was breaking module reload, andduplicated older code. Changed to reuse older code.

util.stanza: Temporary fix for serializing attributes with namespaces

net.server: Fix nil table index assignment

stanza_router: Fix for when clients don't specify priority in initial presence

net.server: Fix potential fatal error in server.lua

mod_bosh: Fix for 'invalid key to next' error when using BOSH

Remove redundant logging and debug printing from mod_bosh

Fix for nil handler error after close

Fix for never checking if the first module for a host is already loaded (affects global modules)

Retagging 0.3.0, used up my mistake quota for today

Update COPYING file... probably the worst thing I could forget to commit in this release :) 0.3.0

Licensing/version updates for some files (forgot to commit, doh...)

Remove redundant linking in util-src modules' Makefile

Happy birthday to me, happy... 0.3.0!

mod_bosh: No need to tostring() uuids now

util.uuid: Return a string, not a number. Looked so innocent.

Update main prosody file, since it doesn't match *.lua pattern, and sed -i treats symlinks badly

Update copyright notices for 2009

0.2->0.3

GPL->MIT!

mod_muc: Add 'nick' to unavailable presence of nick changes. Thanks to Asterix for spotting :)

mod_muc: Convert to unix line endings

Load net.server after util.dependencies to catch missing luasocket

Automated merge with http://waqas.ath.cx:8000/

tools/ejabberd2prosody: Support for pending-in roster items

mod_muc: Add support for being a component

componentmanager: Add support for loading components defined in the config

configmanager: Add support for defining components

hostmanager: Fire event when all hosts are loaded from config

modulemanager: Really fix call_module_method to work properly

modulemanager: Add get_host_type() API method, and fix up call_module_method to work properly

modulemanager: Add module:set_global() as a cleaner way for a module to declare itself 'global'

core.modulemanager: Some refactoring to make upcoming changes a little easier

Friendlier message when config file not found

util.dependencies: Not finding our own libraries is fatal

util.dependencies: Show useful messages when our own libraries are not found, too

server.lua: Comment out unnecessary or very verbose logging, and log the rest as debug level

server.lua: Use Prosody logger for errors, silence non-errors

Port to new server.lua, quite some changes, but I believe everything to be working

net.http: custom_headers -> headers

net.http: Remove request from conn->request table when conn closed

mod_console: Make global

mod_posix: logging fix

Fix for pposix version detection

modulemanager: Comment out logging of modules hooking stanzas, too noisy

util.datamanager: Small fix for clearer logging of data path

Fixed server.lua to use prosody logger for errors

pposix: Remove debug line

pposix: Add syslog_setmask (use config: minimum_log_level = 'warn' etc.)

mod_posix: Check version of pposix

pposix: Add _NAME and _VERSION

stanza_router: That'll teach me to not commit at this time of night. Or not.

Replacing pretty_print() with top_tag() for logging

Fix invalid loglevels in mod_saslauth

mod_posix/pposix: Fix reporting of incorrect PID on daemonization. Log correct PID, and support writing a pidfile (pidfile = '/path/to/prosody.pid' in config). Added getpid() to pposix and improved function names.

mod_posix: Support for logging to syslog (log = 'syslog' in config)

net.connlisteners: Fix to report errors loading connlisteners

net.http: Don't log content from server

net.http: Fix to send query part of URL to server

Stringprep!

util/jid: string prepping functions added: prepped_split and prep

util/logger: setwriter now returns the old writer on success

stanza_router: Fixed error replies for unhandled stanzas

net.http: Fix for callbacks being triggered multiple times for the same request

modulemanager: Check for syntax errors before reloading a module

mod_console: Added module:reload

mod_muc: Added unload, save and restore callbacks to allow reloading code while preserving state

modulemanager: Added reload support, with callbacks for saving and restoring state

Automated merge with http://waqas.ath.cx:8000/

modulemanager: Fixed error on unloading modules with no handlers

mod_muc: deregister component on unload

datamanager: Change log message from type "warn" to "debug" when loading a file fails

mod_saslauth, mod_tls: minor code cleanup

mod_version: Removed and rearranged some code

componentmanager: Removed unneeded parameter from componentmanager.deregister_component

sasl: Set realm to be the current realm when the client didn't send a realm, or sent an empty one

BOSH: Allow BOSH servers to be configured through config file

mod_actions_http: Show tables as 'list's

Add mod_actions_http for executing actions through HTTP

Add core.actions for managing server 'actions'; and make modulemanager register actions 'load' and 'unload'

core.httpserver: Rename request.responseheaders to the more logical request.headers

mod_httpserver: Add require 'net.httpserver'

modulemanager: Change pairs() to ipairs() to allow ordered module loading

Set session.ip to the IP address of connecting clients

BOSH: Make previous fix a bit more efficient

BOSH: Fix for error when closed session was in inactive_sessions list

Add option to in-band registration to allow only whitelisted IPs to register

Added rate limiting to in-band registration, and added IP [black/white]lists

Add child_with_ns() method to stanza elements, and fix child_with_name() to iterate tags rather than all children

Automated merge with http://waqas.ath.cx:8000/

Removed core/offlinemessage.lua along with documentation and references - we have core/offlinemanager.lua instead

modulemanager: Per-host event hooks for plugins - solves issue 41

sasl: Don't fail for realm=""

Implement session:close() for BOSH, and add checking for attempts to connect to hosts we don't serve

Change default maximum inactivity period to 60s from 30s

Add more tests for util/stanza.lua serialization routines

Add test for previous commit

Restore fix for missing last_add on deserialized stanzas. Thanks to tsing for discovering.

Numerous BOSH improvements... handle client disconnects, either explicit or implicit through inactivity; allow specifying BOSH default parameters through config; fix to prevent prematurely closing request connections in some cases, before they were replied to

Protected call for HTTP request callbacks, to catch errors

Fix to prevent calling HTTP request callback twice with the same data

Default mod_console to listening on localhost only. May be changed with console_interface=xxx.xxx.xxx.xxx in the config

Automated merge with http://waqas.ath.cx:8000/

modulemanager: module.unload now gets called when modules are being unloaded

componentmanager: Added support for component deregistering

Remove warning of already-loaded modules at startup

mod_muc: Room subject should be sent only the newly joined occupant

Modulemanager: Basic modules can now be unloaded correctly

mod_console: replace all \n with \r\n in the output, and send \0 as a marker character after every response

mod_muc: Room subjects stored, and room persistence code in place. First user now the owner.

Send host, and not the recipient's JID to module manager (fixes #53)

Initial mod_muc: XEP-0045: Multi-User Chat

Add allow_registration option to disable account registration

Don't use TLS connection handler when SSL/TLS not available or configured (thanks to Ricardo for finding)

Makefile fix for clean target

Updating 0.2.0 tag

Small fix for logging in connlisteners (warning != warn) 0.2.0

Remove some old debugging code from mod_bosh

Remove some debugging code that slipped in

Fix specifying ports in config, and SSL support

Remove logging for server.lua

Remove borken tags

Fix incorrect version number as tag (again) (again)

Fix incorrect version number as tag (again) (again)

Added tag 0.2.0, -m, Fix incorrect version number as tag (again) for changeset 90da4c9b34b5

Added tag 0.20, -m, Fix incorrect version number as tag for changeset 90da4c9b34b5

Added tag 0.20, -m, Fix incorrect version number as tag for changeset 90da4c9b34b5

Added util.multitable.set

Delete the offline message store only when offline messages are present

Return an empty set intead of an error when no disco items are available for a host

Added tag 0.2 for changeset 90da4c9b34b5

HTTP requests now have status code as a number instead of a string. Switched parameters on both http.request() and the callback to better match LuaSocket's http module

Destroy session on failed dialback instead of throwing an error

Automated merge with http://waqas.ath.cx:8000/

Moved directory auto-creation to datamanager

More error replies for offline and non-existing users

Directed presence

Changed order of checking for component hosts to check the full and bare JIDs before the hostname (at another place)

Automated merge with http://waqas.ath.cx:8000/

Changed order of checking for component hosts to check the full and bare JIDs before the hostname

Fix for not loading global modules when host-specific modules are specified in config

Initial mod_bosh, works, kind of, but quite incomplete

Add initial mod_httpserver for serving static content

Adding initial net.httpserver (lots of work to do on it)

Fix nil status code for http request callbacks

Merge from waqas

Bounce stanza errors on failed s2s

Fix data loss when closing connection with a large write queue. Thanks albert :)

Second merge from waqas

Merge from waqas

Fixed URL encoding to generate %0x instead of %x

Optimized stanza_mt.__tostring (called when doing tostring(stanza))

Change xmlhandlers to match stream opening tag with ns+tag

Protect loading of connlisteners, to catch errors

Remove old debugging line from sessionmanager

Remove a FIXME from mod_tls

Add support for dialback piggy-backing. Fixes #37. Thanks to CShadowRun for helping me test :)

Make wraptcpclient set timeout to 0, and add it to the list of exported functions from server.lua

Oops, don't call server.loop() because we'll be running inside the server

Pass HTTP request object to callback

HTTP request callbacks now: handler(code, content) (where code may be 0, and content an error message)

Non-blocking HTTP requests (adding net.http)

0.1 -> 0.2

Newline at end of file for sessionmanager

New, faster, stanza serialization

Add commented line to disable logging entirely

Fix blank tracebacks for c2s/s2s connections

Enable dialback for components

Changed mod_roster to use the newer presence manager API

Don't try processing stanzas not of type get or set in module manager

Fixed a variable redeclaration

Make the ejabberd importer work with host-only roster items

Added: Ports now read from the config

stanza_dispatch != dispatch_stanza

Removed the unnecessary idna.to_ascii applied to the DIGEST-MD5 disgest-uri response values, which was causing auth failures with some clients.

Return error when the given realm value does not match the sent realm value. Prevents impersonation of an account on one virtual host, but a user with the same username on another host.

Fixed util.encodings.base64.decode to not truncate results when encountering an '=' before the end of the given input.

Automated merge with http://waqas.ath.cx:8000/

Latin1 support for SASL DIGEST-MD5 (second, and possibly final commit)

Typo in variable name in last commit

stanza_dispatch = core_process_stanza, fixed for xmpp{client,server} listeners, and sessionmanager for the new syntax

Automated merge with http://waqas.ath.cx:8000/

Latin1 support for SASL DIGEST-MD5 (initial commit)

Small logging adjustment for mod_posix

Slightly more secure dialback secret generation

Merge from waqas

Removed unused variables

Combined and merged similar code

Removed pre-multitable code from module manager

Remove some debugging from pposix.c

Add mod_posix, fixes #5

Add posix support library, and adjust makefiles for it

Code tidying for xmpp{client,server}_listeners

Temporary hack for global modules

Remove print()s from sessionmanager and s2smanager

Make it possible to set custom output handler for logger

Remove old commented code from server.lua

Some code cleaning for the main script

Merge from waqas

Changed module manager to use multitable (initial commit)

Fix add_event_hook in module API

Move the setting of data_path to fix #unfiledbug

Log in hostmanager when a vhost is activated/deactivated

Datamanager logs data_path

Move module loading to modulemanager

Merge from waqas/myself

Merge from waqas

Fixed: Stopped tryint to send error replies on unauthed connections

Add hostmanager, and eventmanager

Small fix for multitable

Re-commit TLS fix

Merge

Backed out changeset 099d8a102deb (committed too much)

Don't say we need TLS after we've already started the handshake

Add TLS socket to readlist before handshake starts, fixes major slow-down on TLS connections

Comment out debug logging for now

Remove linger option on sockets, made no difference, and I forgot to remove it earlier

Fix the last couple of places where we send strings from mod_dialback

Remove an incorrect line which I didn't add, and fix the proper way. Corrects the sending of stanzas over unauthed s2sout's. Also fixes mod_dialback to send stanzas and not strings.

Fix for s2s with jabberd2 (we weren't routing db:verify's over s2sout_unauthed)

Disconnect with stream errors on bad XML, or invalid stream namespace

Add a couple more tests for jid.split

Merge from waqas

MultiTable: Remove all empty sub-tables when elements are removed

Merge from waqas

util.multitable - A table with multiple key for each entry

Automated merge with http://waqas.ath.cx/

Changed util.datamanager to use util.serialization

Changed the datastore for vCards from vCard to vcard in mod_vcard and mod_register

Automated merge with http://waqas.ath.cx/

Changed the ejabberd import script to use util.serialization

Added module util.serialization

Abstract xmlhandlers a bit more, also add error callbacks

Don't send stream:features to incoming s2s connections

Fix logger ids for c2s and s2sout

Automated merge with http://waqas.ath.cx/

Change modules to use the new add_feature module API method.

Added function add_feature to modules API (for adding disco features)

Reorder the disco info elements to place always included elements first

Added tag 0.1.0 for changeset c157c1412bda

Fix Makefile to link with Lua again 0.1.0

Fix configure to save LFLAGS, and also set proper defaults for all sensible OSes

Automated merge with http://84.46.7.57:1234

Making makefile work under OS X finally. Yeah OS X's gcc is a little bit strange.

Using new LFLAGS variable.

Added an error log message for this case

Quick fix for an issue that needs more looking into

Automated merge with http://waqas.ath.cx/

Fix for handling latin1 encoded hostnames in SASL

Fix GPL'ing MIT/X licensed code :)

Update HACKERS

Fill blank with URL

Remove stray merge marker

Merge from waqas

config and data directories taken from path, and quoted to allow spaces in path

Converted prosody.cfg.lua.dist to use windows end-of-lines

Fix license (left some boilerplate in)

and the C files too

Insert copyright/license headers

Fix port number in mod_console instructions

lxmppd -> Prosody

Fix macosx ostype target

Fix debian ostype target

Change sed usage back into one sed script for incompetent versions of sed

Use install to strip symbols

'install' libs to util before top-level make install

Potential fixes for building on Mac OSX

No need for the placeholder file in tests/ because the directory is no longer empty

Add test for latin1toutf8 (which passes)

Converting latin encoded responsed to utf-8 when needed.

Automerge with waqas.

Automated merge with h-h.

Remove that idn stuff for realm because it's either an ugly hack that the password_handler isn't ready for or something worse.

Added function latin1toutf8 to sasl.lua, for processing non-utf8 responses

Makefile fix for creating datadir in correct place on install

Installation improvements (auto-creation of data directories)

Don't overwrite config on make install if it already exists

Path fix for auto-creating directories

Merge from waqas

Auto-create data directories on start

Merge with Tobias

idna-to-unicode so password_handler looks for the right domain.

Do idna-to-ascii to the realm we send first in Digest-MD5.

Yet another fix for the makefile :)

Fix missing prosody.cfg.lua.install

Don't write to prosody.cfg.lua from Makefile. Much apologies to poor albert :(

Add -fPIC to util-src/Makefile

Another automatic merge, this gets annoying."

Fixed the ejabberd importer to work with the pipe sign "|" as a separator in erlang lists

Autocommit.

Automated merge.

Automated merge.

Make ejabberd2prosody.lua a little more cross-platform :)

Make ejabberd2prosody.lua eecutable

Automated merge with http://waqas.ath.cx/

ejabberd db dump importer for Prosody

More Makefile improvements (install the certificates, and update the config on install to find them)

Update Makefile to set correct paths on install with Debian package

Add some example certificates and update the config to point to them

Add COPYING, remove LICENSE

Merfe from Tobias

Apply IDNA to ASCII on hostnames.

Forced merge.

Use unsigned int instead of uint because uint is already in use on OS X.

To use free you should include stdlib.h rather than malloc.h according to man page of free() and various C reference websites.

Do idna_to_ascii when building own response.

Fix for loading connlisteners when running without CFG_SOURCEDIR

Also look for binary modules in the parent directory when running tests

Automated merge with http://waqas.ath.cx/

Moved incoming c2s presence handling from stanza_router to presencemanager

Update Makefile to now pass config paths to prosody. Update prosody, modulemanager and connectionlisteners to obey these paths.

Fix for configmanager when config file can't be found

Rename and update config. Update Makefile for this change.

More Makefile improvements

Add a top-level Makefile and ./configure script. Update util-src Makefile for this.

Removing pull_from_master.sh. Use hg fetch instead.

Load prosody instead of main.lia in mod_console

Make prosody executable

Automated merge with http://waqas.ath.cx/

Added a FIXME

Improved the regexp used to parse the client response a bit. Authenticating with non-ascii realm values now works.

Fixed logging in datamanager

main.lua -> prosody

Merge from waqas

Quickfix for dns.lua to not crash on failed connection to name servers

Added option core.data_path

No more reading 1 byte at a time from sockets

Merge from waqas

Completely switched to new hashes library from the old md5 library

Switched from md5 to sha256 for dialback key generation

Stopped using the lbase64 library

Added make.bat for windows

Removed MS specific preprocessor statements from the Makefile

Add module:unload() to mod_console, and allow module:load() to take config param

Merge from waqas

Makefile now works on windows with Microsoft's compiler

Minor changes to C files (to prevent compiler warnings)

Some mod_console updates

is_loaded() and incomplete unload() for modules

Bumper commit for the new modulemanager API \o/ Updates all the modules, though some more changes may be in store.

Nice enhancement for logging output

Removing servermanager... it is no longer used

Log reason for connection failure

(Basic) IDNA and SRV fallback support

Fix to make a global configmanager instance

Fix for hashes.c and encodings.c to rename luaopen for util_*

Fix a waqas copy/paste error. It was my fault again apparently.

Merge from waqas

Added options to limit the number of resources and for handling of resource conflicts

Update mod_selftests to use the hosts on http://xmpp.org/interop/servers.shtml

Yes, we don't put these things in here, we put them in here.

Wrapped a core_process_stanza call in an xpcall call

Added mod_ping with support for [XEP-0199: XMPP Ping]

Changed format for XEP-0090 to the legacy format

Added mod_time with support for [XEP-0202: Entity Time] and [XEP-0090: Entity Time] (deprecated)

Merge from waqas

Modules now sending disco replies

Minor bug fix

Added helper method to discomanager

Add rough Makefile for util-src/

Removed commented code

Added util-src/hashes.c - support for sha1, sha256 and md5 hashes

Added util-src/encodings.c - support for base64, stringprep and idna encodings

Update TODO

Refuse to run without SSL/TLS unless run_without_ssl is set in config

Change loading order of modules, config before dependency checking

Some mod_console changes

Trivial whitespace fix in the missing dependency message

Add MD5 to the list of checked dependencies

Friendlier messages on missing dependencies

Fix softreq, so it reports when no suitable MD5 library is found

SSL library is optional, not a fatal error

Some ends too much.

Some changes to report more correct SASL failures. Support for disabled accounts.

Merging with main branch.

Checking some variables for nil so no errors occur that'll break the server.

Removing some debug messages.

Merge from waqas

Added temporary fix for srv on windows: using opendns nameservers

Check to prevent error on IQs from completely unhandled origins

Backed out the backout. Now we're back out.

Reverted my change to modulemanager, to restore those made by waqas

Backed out changeset 79bd7a3e906c

Merge from waqas

Ahem, a bit of an identity crisis..

Removing lxmppd.cfg.dist

Typo prevented modulemanager.load() from returning the error if load failed.

Merge from waqas

Added mod_disco

Added discomanager

Added discohelper

Account deletion support

Check to prevent error for IQs from completely unhandled origins

Removed useless check

Only start console if it is enabled in the config. Note that the exact option is going to change tomorrow.

Add initial mod_console

Comment out remote debug, will later be enabled via config

Small fix for connlisteners to accept nil for userdata

Fix various mistakes in dns.lua

Fix dns for poor Windows users, who have never seen a resolv.conf

Add new lxmppd.cfg.lua.dist example config file

New configmanager. Old-style config files still work, but will print a warning

Fix mod_selftests syntax, and switch it to use config

All the people who don't use TLS, this one's for you.

Add helper function for adding message bodies to stanzas

Now possible to specify nil origin to core_route_stanza. Origin will be chosen as the host of the 'from' attribute on the stanza. Returns false on no such host.

Import initial configmanager, not sure if it works yet, but it does pass the unit tests ;)

Update test.lua with a work-in-progress

Better names for variables

Remove old TODO

Remove some declarations I added while debugging

Improve jid.split() and jid.bare() to pass new test cases with invalid JIDs

Add jid.bare() helper function

Adding selftests module, but not enabling in config

Oops, never added the tests for s2smanager to the repo

Add run_tests.sh

Update unit testing to output coverage reports

Remove or comment useless prints, or change them to log()

Add event for server startup completed: server-started

Don't error reply to stanzas direct over the s2s stream they came from

Use a stanza for c2s stream features instead of an array of strings. Removes a FIXME.

Log number of open sessions on session creation

Remove a debug print() from xmlhandlers

Remove version=1.0 on s2s stream headers, again.

Remove an old FIXME comment

Fix the reversed to/from on the final db:result. Fixes M-Link and Gmail. Thanks dwd!!

Comments and logging fixes

Send version=1.0 again in s2s stream header

Fix for setting the correct host on the socket, seems to fix s2s with XCP

Show which session got disconnected in log message

Don't error if the original s2s connection has closed before we get the dialback result

Don't send version 1.0. Who cares about Gmail?

Send version=1.0 in s2s stream header. Send s2s stream:features when in 1.0 mode.

Don't attempt to auth connection unless stanzas are being sent across it

Log sent s2s stanzas

Incorrect function set as callback

Don't error if streamopened/streamclosed callback is not specified for a session

Extra checks before sending error replies to incoming stanzas

Fix sending of unavailable presence on disconnect

Don't forget to escape XML in attributes. Thanks to the Postgres Q&amp;A room on conference.jabber.org :)

We have SRV resolving \o/

Small fix for servermanager

Fix to prevent send retry when connection is already closed

*ahem* Yes, move along please... though really, quite a classic. :)

session:disconnect() -> session:close() for consistency with other Lua APIs

Remove useless check for unavailable presence (which never exists)

Quite some changes, to:

s2s sessions can now be disconnected, with or without a stream error. Fixes #8

Allow us to close client connections, with or without a stream error. Partially fixes #8, we still need the same for s2s (though it should be almost a straight copy of the code, I'm too tired atm)

Flush write queue before closing socket

Fixed s2s manager's send queue to not store recieved stanza objects (as these can chnage after the send call)

Send unsubscribe and unsubscribed on roster item delete, and broadcast available resources' presence in reply to pre-approved subscription request

Adding logging for outbound presence broadcasts (changed it a bit)

Adding logging for outbound presence broadcasts

Second fix for broadcasting presence of available resources to newly approved contact

Fix for broadcasting presence of available resources to newly approved contact

Moved presence subscription code from stanza_router to presencemanager

Merge with waqas

Fix for putting TLS in stream:features for connections already using TLS. Thanks to albert for spotting.

Fix logging in some cases for client disconnects

Removed unused function send_to_session from sessionmanager (send_to_session replaced by session.send)

Fixed mod_tls to use session.send for sending stanzas

Fixed servermanager to use session.send for sending stanzas

Removed useless [[local send = require "core.sessionmanager".send_to_session]] from mod_uptime and mod_version

Fixed mod_saslauth to use session.send for sending stanzas

Fixed sessionmanager to not send session in place of stream features...

Fixed mod_register to use session.send for sending stanzas

Fixed mod_private to use session.send for sending stanzas

Fixed sessionmanager to use appropriate method for sending stream features

Fixed mod_legacyauth to use session.send for sending stanzas

Fix mod_vcard to use session.send for sending stanzas

Merge with myself (!)

Merge from waqas

Code cleanup for resource binding

Unused variables in mod_tls

You can never have too many tests

Warn when subtest function does not exist

If iq child element has no xmlns, use parent's

Fix mod_roster to use session.send for sending stanzas

Small fix for mod_version

Providing some human readable error messages and some fixes.

Using md5.sum rather than hashes.md5 because we don't want hexadecimal

mod_saslauth: Code cleanup

Made SASL module fit the new interface.

base64 encode the sasl responses

Started using realm in password hashing, and added support for error message replies from sasl

Comment out DIGEST-MD5 until it is fully implemented

Merge new SASL code from Tobias and Waqas

Merging with Waqas' code.

Set username in a SASL object.

Set username on SASL success

Merge with Waqas changes to mod_saslauth.

Made PLAIN method in sasl.lua module follow new interface.

mod_saslauth: Added base64 decoding, encoding check, and cleaned the code up.

Adding some TODO for some security issue.

Merging my new SASL code with Waqas' adjusted saslauth module.

mod_saslauth updated for digest-md5

Rewrote SASL Digest-MD5 responce generating code, fixed some realm related issue and tested it successfully with Psi. Thanks to dwd, remko and jake.

Merging.

Forward response stanzas to sasl.lua and some other stuff.

Fixing some parsing and some other stuff.

Some early attempts on DIGEST-MD5.

Fix logging of disconnect reason, and also sending of unavailable presence on disconnect

Fix routing of outbound iq stanzas

Add tests for core.stanza_router

Add new logger for tests to use

Some fixes for our test runner

Return registered host table when registering a component

Log how many queued stanzas we send

Merge from waqas

Some bugs fixed

Update hostname for identi.ca

Remove some old unused (and empty) functions from s2smanager

Only reply with errors if the stanza is not an error or a result (don't know how much bandwidth this just cost me :) )

Update rostermanager to use new logger

A treat for Linux users ;)

Fix outgoing s2s from components. Fixes #16

Now outgoing s2s sessions are associated with their from_host, fixes #15

Some more logging fixes

Yep, s2s definitely works now. This is just a small fix for logging...

I knew it ;) Fix sending error replies over s2s (though we shouldn't be error'ing on stream:features anyway)

Print out the stanza also

Fix for detecting when we are routing a stanza to ourself (I'm sure this has something to do with you, waqas...)

Another small fix, for logging in s2smanager

Another small fix, for logging in s2smanager

Mmm, s2s fixed :)

Merge from waqas

Added error replies for unhandled stanzas

Added basic offline message support

Added util.datetime: Utility methods to support XEP-0082: XMPP Date and Time Profiles

Added support for storing (and removing), loading and appending to lists of data to datamanager (for supporting offline messages)

Fixed stanza deserialization

Add support for remote debugger

Missed importing a function in last commit

Change sending reply stream header to use top_tag()

Add new top_tag() method to stanzas

Some s2s fixes. Now connect() does not block, and stanzas are not lost when connection is slow

Renamed some of the variables in jid.split test to make it clearer

Fix jid.split test function

Merge from waqas

Fixed typo

Merge from waqas

Added mod_uptime: [XEP-0012: Last Activity] queries now work when directed at the server.

Hack to allow s2s stanzas to work until we do proper namespace handling

Move some code about so that we don't leave connections hanging if they hit the connection timeout

Actually show error and position when we show a traceback :)

Prevent slow connects for s2s from blocking for so long

We don't fail if modules fail to load at startup :)

We now fail if modules fail to load at startup.

Updated usermanager with DIGEST-MD5 support

Fix some very misleading logging

Committing code to get nicer tracebacks for errors, also we no longer consider such errors fatal (probably a bad thing, I know...)

Just committing this warning, because I want to know if the problem really affects us

Add host field to local host sessions

Merge from waqas

Redirecting all stanzas not from origin of type s2sin and c2s to core_handle_stanza

Shortened log output for incoming stanzas and an added check.

Fix for checking components, but we need to look at this whole block to optimise it, really we do

Fixed some whitespace.

Reworked the way lxmppd.cfg is used

Re-applying my changes to componentmanager. Sigh.

Adding component support. Again...

/me glares at waqas for messing up the repo

/me glares at MattJ

Commented a buggy check

Internal component support

Foxed: Copy stanza type in reply for presence and message stanzas

Part 2 of internal components. Should have mentioned that the previous commit was from waqas, this one from me.

Part one of internal component support

Merge (for some reason)

imported patch srv-for-cdr-se.patch

A little whitespace fix

Datamanager now deletes files with no data

Reformatted lxmppd.cfg.dist and removed redundant variable

Removed require "core.stanza_dispatch"

Remove obsolete stanza_dispatch.lua

merge from waqas

Priority based message routing, etc

Added resource priority handling, etc

Fix for previous commit (again)

Fix for previous commit

Fix for add_iq_handler to allow multiple origin types too

vcards for s2s

Fix MD5 loading check

mod_roster fix

Another fix for s2s (well, let's say it was more for modules)

Fix s2s once and for all

General fixes for s2s, to make it more robust (I hope), sending data to remote hosts sane (s2ssession.send() works as expected), recycle outgoing dialback connections, etc.

Fix for mod_version over s2s

mod_version is here

Was a bit hasty to remove send_s2s() from stanza_router. We still use it, and there is no problem with it.

sends2s -> s2s_session.send(), s2s_session.send() -> s2s_session.sends2s()

Added support for XEP-0049: Private XML Storage (mod_private)

mod_vcard: Fixed to use new util.stanza.add_child

Combined some lines

Datamanager Fixes and improvements

Don't set cursor inside added child when using add_child()

Make add_child() behave as expected. Old add_child() is now add_direct_child()

Better logging of s2s connections

Merge presence/subscription support from waqas

Bug fixes and checks for presence subscriptions, etc

Outbound presence subscription

Routing code reorganization

Inbound subscription request

Inbound unsubscribe

Inbound subscription cancellation

Inbound subscription approval

Minor fixes, comments

Little tweak for more useful logging of closed s2s sessions

Log when an incoming dialback verification request is an invalid key for our domain

Remove misleading log message regarding s2s/dialback

Backed out changeset 4adc53e03b4d (garbage collection)

Extra garbage collection, for debugging

(0) -3840 tip

mercurial