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.

(0) -3000 -1000 -480 tip

mercurial