prosody.git
14 years agomod_tls: Switch to : syntax for connection methods
Matthew Wild [Sat, 21 Nov 2009 17:16:46 +0000 (17:16 +0000)]
mod_tls: Switch to : syntax for connection methods

14 years agoxmppclient_listener: Use : syntax for connection methods, to be compatible with new...
Matthew Wild [Sat, 21 Nov 2009 17:15:59 +0000 (17:15 +0000)]
xmppclient_listener: Use : syntax for connection methods, to be compatible with new server.lua

14 years agoxmppclient_listener: Switch to .onincoming listener method, to be compatible with...
Matthew Wild [Sat, 21 Nov 2009 17:14:59 +0000 (17:14 +0000)]
xmppclient_listener: Switch to .onincoming listener method, to be compatible with new server_event.lua

14 years agonet.server: Small fix for addtimer() compatibility code
Matthew Wild [Sat, 21 Nov 2009 17:13:21 +0000 (17:13 +0000)]
net.server: Small fix for addtimer() compatibility code

14 years agonet.connlisteners: Standardise on new syntax for addserver(), and clean up a bit
Matthew Wild [Sat, 21 Nov 2009 17:11:59 +0000 (17:11 +0000)]
net.connlisteners: Standardise on new syntax for addserver(), and clean up a bit

14 years agosessionmanager: Use : syntax for calling connection methods
Matthew Wild [Sat, 21 Nov 2009 17:07:22 +0000 (17:07 +0000)]
sessionmanager: Use : syntax for calling connection methods

14 years agoobjectmanager: Convert to unix line-endings
Matthew Wild [Sat, 21 Nov 2009 23:04:26 +0000 (23:04 +0000)]
objectmanager: Convert to unix line-endings

14 years agos2smanager: Don't log full stanza when sending outwards
Matthew Wild [Sat, 21 Nov 2009 13:49:48 +0000 (13:49 +0000)]
s2smanager: Don't log full stanza when sending outwards

14 years agos2smanager: Don't tostring() the data before sending, sends2s already does this.
Matthew Wild [Sat, 21 Nov 2009 13:47:45 +0000 (13:47 +0000)]
s2smanager: Don't tostring() the data before sending, sends2s already does this.

14 years agomod_bosh: Don't log response XML
Matthew Wild [Sat, 21 Nov 2009 13:15:46 +0000 (13:15 +0000)]
mod_bosh: Don't log response XML

14 years agoutil.timer: Fix libevent timers (event.base doesn't exist...)
Matthew Wild [Sat, 21 Nov 2009 03:16:14 +0000 (03:16 +0000)]
util.timer: Fix libevent timers (event.base doesn't exist...)

14 years agonet.server_event: Export base as event_base
Matthew Wild [Sat, 21 Nov 2009 03:15:59 +0000 (03:15 +0000)]
net.server_event: Export base as event_base

14 years agonet.server_event: Comment overly verbose log message
Matthew Wild [Sat, 21 Nov 2009 02:41:09 +0000 (02:41 +0000)]
net.server_event: Comment overly verbose log message

14 years agoutil.timer: Use libevent for lightweight timers if available and configured (use_libe...
Matthew Wild [Sat, 21 Nov 2009 02:40:21 +0000 (02:40 +0000)]
util.timer: Use libevent for lightweight timers if available and configured (use_libevent option)

14 years agonet.server: New net.server to choose the appropriate library from server_select/serve...
Matthew Wild [Sat, 21 Nov 2009 02:39:08 +0000 (02:39 +0000)]
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

14 years agonet.server: Rename to net.server_select
Matthew Wild [Sat, 21 Nov 2009 02:36:35 +0000 (02:36 +0000)]
net.server: Rename to net.server_select

14 years agonet.server_event: Remove redundant getid() function
Matthew Wild [Fri, 20 Nov 2009 23:24:41 +0000 (23:24 +0000)]
net.server_event: Remove redundant getid() function

14 years agonet.server_event: Initial commit of server_event.lua. Don't get too excited, it's...
Matthew Wild [Fri, 20 Nov 2009 22:58:56 +0000 (22:58 +0000)]
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 :)

14 years agos2smanager: Fail outgoing s2s connection if hostname does not pass idna_to_ascii...
Matthew Wild [Fri, 20 Nov 2009 15:07:39 +0000 (15:07 +0000)]
s2smanager: Fail outgoing s2s connection if hostname does not pass idna_to_ascii(), thanks Flo + waqas

14 years agos2smanager: Queue db:verify unless we already sent a db:result (if we had then it...
Matthew Wild [Fri, 20 Nov 2009 04:39:54 +0000 (04:39 +0000)]
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.

14 years agoutil.sasl: Add COMPAT comment
Matthew Wild [Wed, 18 Nov 2009 03:35:42 +0000 (03:35 +0000)]
util.sasl: Add COMPAT comment

14 years agomod_console: Moved activation of the console port from the main file to mod_console.
Waqas Hussain [Wed, 18 Nov 2009 03:30:03 +0000 (08:30 +0500)]
mod_console: Moved activation of the console port from the main file to mod_console.

14 years agoprosody.net_activate_ports: Slightly refactored and definition moved to before module...
Waqas Hussain [Wed, 18 Nov 2009 03:26:43 +0000 (08:26 +0500)]
prosody.net_activate_ports: Slightly refactored and definition moved to before modules are loaded.

14 years agomod_register: Log a debug message when a session's IP is not available.
Waqas Hussain [Wed, 18 Nov 2009 01:23:41 +0000 (06:23 +0500)]
mod_register: Log a debug message when a session's IP is not available.

14 years agomod_bosh: Set session.ip for BOSH sessions.
Waqas Hussain [Wed, 18 Nov 2009 01:22:52 +0000 (06:22 +0500)]
mod_bosh: Set session.ip for BOSH sessions.

14 years agoutil.sasl: Added compatibility workaround for jwchat sending an encoded trailing...
Waqas Hussain [Wed, 18 Nov 2009 01:21:59 +0000 (06:21 +0500)]
util.sasl: Added compatibility workaround for jwchat sending an encoded trailing '\0' in SASL responses.

14 years agonet.dns: Be more strict about the records we cache
Matthew Wild [Wed, 18 Nov 2009 01:09:09 +0000 (01:09 +0000)]
net.dns: Be more strict about the records we cache

14 years agonet.dns: Be more strict about checking the DNS replies we receive
Matthew Wild [Wed, 18 Nov 2009 01:05:38 +0000 (01:05 +0000)]
net.dns: Be more strict about checking the DNS replies we receive

14 years agoutil.sasl: Improved a log message.
Waqas Hussain [Fri, 13 Nov 2009 01:29:37 +0000 (06:29 +0500)]
util.sasl: Improved a log message.

14 years agoutil.sasl: Allow authzid=username (for compatibility with Smack's non-compliant behav...
Waqas Hussain [Fri, 13 Nov 2009 01:10:46 +0000 (06:10 +0500)]
util.sasl: Allow authzid=username (for compatibility with Smack's non-compliant behavior).

14 years agoutil.sasl: Return proper error when client provides authzid.
Waqas Hussain [Thu, 12 Nov 2009 23:24:17 +0000 (04:24 +0500)]
util.sasl: Return proper error when client provides authzid.

14 years agoChanged separator between attribute names and prefixes from '|' to '\1' (optimization...
Waqas Hussain [Thu, 12 Nov 2009 08:42:44 +0000 (13:42 +0500)]
Changed separator between attribute names and prefixes from '|' to '\1' (optimization and cleanup).

14 years agonet.connlisteners: Log an error when a listener fails to load.
Waqas Hussain [Thu, 12 Nov 2009 08:34:38 +0000 (13:34 +0500)]
net.connlisteners: Log an error when a listener fails to load.

14 years agocomponentmanager: Improved logging for stanzas being bounced for unavailable components.
Waqas Hussain [Thu, 12 Nov 2009 08:33:46 +0000 (13:33 +0500)]
componentmanager: Improved logging for stanzas being bounced for unavailable components.

14 years agomod_posix: Log warning when no_daemonize is used, and instruct on how to update config
Matthew Wild [Sun, 8 Nov 2009 15:25:03 +0000 (15:25 +0000)]
mod_posix: Log warning when no_daemonize is used, and instruct on how to update config

14 years agomod_posix: Switch config option to 'daemonize', fall back to 'no_daemonize' if not...
Matthew Wild [Sun, 8 Nov 2009 15:10:44 +0000 (15:10 +0000)]
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

14 years agomodulemanager: api:get_option(): Handle correctly option values of boolean false...
Matthew Wild [Sun, 8 Nov 2009 15:09:11 +0000 (15:09 +0000)]
modulemanager: api:get_option(): Handle correctly option values of boolean false, don't assume value unset

14 years agoMerge with trunk
Matthew Wild [Fri, 6 Nov 2009 23:56:10 +0000 (23:56 +0000)]
Merge with trunk

14 years agoutil.dataforms: Support for jid-multi field type
Florian Zeitz [Fri, 6 Nov 2009 23:51:14 +0000 (23:51 +0000)]
util.dataforms: Support for jid-multi field type

14 years agonet.dns: Fixed indentation and coding style.
Waqas Hussain [Sun, 1 Nov 2009 20:57:33 +0000 (01:57 +0500)]
net.dns: Fixed indentation and coding style.

14 years agonet.dns: Initialize default resolver on module load (instead of on first use).
Waqas Hussain [Sun, 1 Nov 2009 19:52:35 +0000 (00:52 +0500)]
net.dns: Initialize default resolver on module load (instead of on first use).

14 years agonet.dns: Updated to use util.windows.get_nameservers for enumerating nameservers...
Waqas Hussain [Sun, 1 Nov 2009 19:46:43 +0000 (00:46 +0500)]
net.dns: Updated to use util.windows.get_nameservers for enumerating nameservers on Windows.

14 years agonet.httpserver: Pass correct connection object to disconnect listener, which fixes...
Matthew Wild [Sun, 1 Nov 2009 19:41:49 +0000 (19:41 +0000)]
net.httpserver: Pass correct connection object to disconnect listener, which fixes a small leak

14 years agoprosodyctl: Put 'pidfile' in quotes to make more clear that it is the literal name...
Matthew Wild [Sat, 31 Oct 2009 17:15:20 +0000 (17:15 +0000)]
prosodyctl: Put 'pidfile' in quotes to make more clear that it is the literal name of the option

14 years agoMUC: Include occupants' real JIDs in their presence (semi-anonymous rooms).
Waqas Hussain [Sat, 31 Oct 2009 00:11:56 +0000 (05:11 +0500)]
MUC: Include occupants' real JIDs in their presence (semi-anonymous rooms).

14 years agoMakefile.win: Added support for util.windows, improved cleanup of temporary files...
Waqas Hussain [Sat, 31 Oct 2009 00:05:46 +0000 (05:05 +0500)]
Makefile.win: Added support for util.windows, improved cleanup of temporary files, switched to dynamic linking with MSVCRT, etc.

14 years agoutil.windows: Initial commit. Adds support for querying the windows DNS API for names...
Waqas Hussain [Fri, 30 Oct 2009 23:58:23 +0000 (04:58 +0500)]
util.windows: Initial commit. Adds support for querying the windows DNS API for nameservers.

14 years agoutil.dataforms: Only add value to rendered form if supplied in the data
Florian Zeitz [Fri, 30 Oct 2009 01:18:56 +0000 (01:18 +0000)]
util.dataforms: Only add value to rendered form if supplied in the data

14 years agoutil.pposix: Add abort() function
Matthew Wild [Fri, 30 Oct 2009 01:18:38 +0000 (01:18 +0000)]
util.pposix: Add abort() function

14 years agoserver.lua: Standardise on 'client' variable to refer to the socket, makes the code...
Matthew Wild [Mon, 26 Oct 2009 23:35:48 +0000 (23:35 +0000)]
server.lua: Standardise on 'client' variable to refer to the socket, makes the code a bit cleaner

14 years agoMerge with trunk
Matthew Wild [Mon, 26 Oct 2009 23:30:15 +0000 (23:30 +0000)]
Merge with trunk

14 years agoserver.lua: Add addsocket(), refactor all code to use it, fixes nasty socket object...
Matthew Wild [Mon, 26 Oct 2009 23:29:04 +0000 (23:29 +0000)]
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?

14 years agomod_welcome: Change $user to $username in default welcome message (thanks to chris...
Waqas Hussain [Mon, 26 Oct 2009 20:15:05 +0000 (01:15 +0500)]
mod_welcome: Change $user to $username in default welcome message (thanks to chris for spotting)

14 years agoProsody top-level error handler modified to log properly on non-string error messages.
Waqas Hussain [Sun, 25 Oct 2009 16:26:36 +0000 (21:26 +0500)]
Prosody top-level error handler modified to log properly on non-string error messages.

14 years agomod_console: Added proper cleanup for disconnected console sessions.
Waqas Hussain [Sun, 25 Oct 2009 16:21:25 +0000 (21:21 +0500)]
mod_console: Added proper cleanup for disconnected console sessions.

14 years agoMUC: Fixed: affiliation='none' was omitted from some presence broadcasts.
Waqas Hussain [Sun, 25 Oct 2009 16:07:32 +0000 (21:07 +0500)]
MUC: Fixed: affiliation='none' was omitted from some presence broadcasts.

14 years agoxmppserver_listener: Minor logging fix: Prefer the session logger when available...
Waqas Hussain [Sun, 25 Oct 2009 16:06:35 +0000 (21:06 +0500)]
xmppserver_listener: Minor logging fix: Prefer the session logger when available to log invalid XML warnings.

14 years agoMUC: Fixed an issue with multi-session nicks where the 'from' attribute in a presence...
Waqas Hussain [Sat, 24 Oct 2009 23:19:24 +0000 (04:19 +0500)]
MUC: Fixed an issue with multi-session nicks where the 'from' attribute in a presence broadcast was not being properly set.

14 years agorostermanager: Fixed a global access.
Waqas Hussain [Wed, 21 Oct 2009 23:47:40 +0000 (04:47 +0500)]
rostermanager: Fixed a global access.

14 years agorostermanager: Refactored roster loading to remove duplicate code.
Waqas Hussain [Wed, 21 Oct 2009 22:46:54 +0000 (03:46 +0500)]
rostermanager: Refactored roster loading to remove duplicate code.

14 years agorostermanager: Log a warning when a self-contact is detected.
Waqas Hussain [Wed, 21 Oct 2009 22:38:00 +0000 (03:38 +0500)]
rostermanager: Log a warning when a self-contact is detected.

14 years agorostermanager: Ensure meta-data entry is present on roster load.
Waqas Hussain [Wed, 21 Oct 2009 22:34:50 +0000 (03:34 +0500)]
rostermanager: Ensure meta-data entry is present on roster load.

14 years agorostermanager: Remove self-contacts from loaded rosters.
Waqas Hussain [Wed, 21 Oct 2009 22:34:08 +0000 (03:34 +0500)]
rostermanager: Remove self-contacts from loaded rosters.

14 years agoPEP: Better reload support.
Waqas Hussain [Wed, 21 Oct 2009 21:26:27 +0000 (02:26 +0500)]
PEP: Better reload support.

14 years agoPEP: Send publish IQ result before broadcast.
Waqas Hussain [Wed, 21 Oct 2009 21:26:06 +0000 (02:26 +0500)]
PEP: Send publish IQ result before broadcast.

14 years agoPEP: Stricter checks on payload validity.
Waqas Hussain [Wed, 21 Oct 2009 21:16:10 +0000 (02:16 +0500)]
PEP: Stricter checks on payload validity.

14 years agoPEP: Clone payloads to allow plugins to reuse stanzas.
Waqas Hussain [Wed, 21 Oct 2009 21:13:02 +0000 (02:13 +0500)]
PEP: Clone payloads to allow plugins to reuse stanzas.

14 years agoPEP: Fixed namespace for the <item> element in PEP broadcasts.
Waqas Hussain [Wed, 21 Oct 2009 21:12:24 +0000 (02:12 +0500)]
PEP: Fixed namespace for the <item> element in PEP broadcasts.

14 years agoutil.require: Yes hg, I really did want to remove it, thanks.
Matthew Wild [Wed, 21 Oct 2009 19:30:42 +0000 (20:30 +0100)]
util.require: Yes hg, I really did want to remove it, thanks.

14 years agoprosody, util.require: Remove util.require, the shortest-lived module so far. Woke...
Matthew Wild [Wed, 21 Oct 2009 15:25:49 +0000 (16:25 +0100)]
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 :)

14 years agomod_presence: Send unavailable presence when sending unsubscribed presence stanzas...
Waqas Hussain [Wed, 21 Oct 2009 14:01:02 +0000 (19:01 +0500)]
mod_presence: Send unavailable presence when sending unsubscribed presence stanzas (some legacy clients continue to display unsubscribed contacts as available).

14 years agoxmlhandlers: Reset state on error or stream close, fixes possible traceback
Matthew Wild [Wed, 21 Oct 2009 13:05:33 +0000 (14:05 +0100)]
xmlhandlers: Reset state on error or stream close, fixes possible traceback

14 years agoconnlisteners: Localize tostring, fixes possible traceback when LuaSec not installed
Matthew Wild [Wed, 21 Oct 2009 12:59:54 +0000 (13:59 +0100)]
connlisteners: Localize tostring, fixes possible traceback when LuaSec not installed

14 years agoMUC: List occupants in a room's disco#items response.
Waqas Hussain [Wed, 21 Oct 2009 08:32:32 +0000 (13:32 +0500)]
MUC: List occupants in a room's disco#items response.

14 years agoMerged with trunk.
Waqas Hussain [Wed, 21 Oct 2009 07:02:30 +0000 (12:02 +0500)]
Merged with trunk.

14 years agoMUC: Added config option 'restrict_room_creation' to allow restricting room creation...
Waqas Hussain [Wed, 21 Oct 2009 06:58:33 +0000 (11:58 +0500)]
MUC: Added config option 'restrict_room_creation' to allow restricting room creation to admins.

14 years agousermanager: Removed an unnecessary global access.
Waqas Hussain [Wed, 21 Oct 2009 06:41:11 +0000 (11:41 +0500)]
usermanager: Removed an unnecessary global access.

14 years agousermanager: Logged a clear warning when the 'admins' option is not a table.
Waqas Hussain [Wed, 21 Oct 2009 06:40:29 +0000 (11:40 +0500)]
usermanager: Logged a clear warning when the 'admins' option is not a table.

14 years agousermanager: Changed function is_admin to allow checking for host-specific admins.
Waqas Hussain [Wed, 21 Oct 2009 06:39:02 +0000 (11:39 +0500)]
usermanager: Changed function is_admin to allow checking for host-specific admins.

14 years agomod_lastactivity: Gave a positive priority to the presence event hook.
Waqas Hussain [Wed, 21 Oct 2009 06:29:43 +0000 (11:29 +0500)]
mod_lastactivity: Gave a positive priority to the presence event hook.

14 years agonet.dns: Don't expire records with TTL of 0 instantly
Matthew Wild [Tue, 20 Oct 2009 23:01:50 +0000 (00:01 +0100)]
net.dns: Don't expire records with TTL of 0 instantly

14 years agoMUC: Added 'name' config option, for specifying the component's name in disco responses.
Waqas Hussain [Tue, 20 Oct 2009 21:18:17 +0000 (02:18 +0500)]
MUC: Added 'name' config option, for specifying the component's name in disco responses.

14 years agomod_lastactivity: Persist data across reloads.
Waqas Hussain [Tue, 20 Oct 2009 20:02:26 +0000 (01:02 +0500)]
mod_lastactivity: Persist data across reloads.

14 years agomod_lastactivity: Allow users to request their own last activity.
Waqas Hussain [Tue, 20 Oct 2009 20:01:46 +0000 (01:01 +0500)]
mod_lastactivity: Allow users to request their own last activity.

14 years agoprosody.cfg.lua.dist: Convert to unix line endings from DOS
Matthew Wild [Tue, 20 Oct 2009 17:12:46 +0000 (18:12 +0100)]
prosody.cfg.lua.dist: Convert to unix line endings from DOS

14 years agoprosody: Use rawget to test for the existence of ssl (LuaSec) so we don't look for...
Matthew Wild [Tue, 20 Oct 2009 12:25:29 +0000 (13:25 +0100)]
prosody: Use rawget to test for the existence of ssl (LuaSec) so we don't look for a nil global

14 years agoutil-src/Makefile: Add missing flags to building of util.signal
Matthew Wild [Mon, 19 Oct 2009 20:08:40 +0000 (21:08 +0100)]
util-src/Makefile: Add missing flags to building of util.signal

14 years agonet.httpserver: Pass on interface option from new_from_config() (thanks Chris)
Matthew Wild [Mon, 19 Oct 2009 16:56:39 +0000 (17:56 +0100)]
net.httpserver: Pass on interface option from new_from_config() (thanks Chris)

14 years agoprosodyctl: Remove dependency on hostmanager, and friends
Matthew Wild [Mon, 19 Oct 2009 15:53:50 +0000 (16:53 +0100)]
prosodyctl: Remove dependency on hostmanager, and friends

14 years agos2smanager: Use session-specific logger to log outgoing data on outgoing s2s connections
Matthew Wild [Sun, 18 Oct 2009 15:16:27 +0000 (16:16 +0100)]
s2smanager: Use session-specific logger to log outgoing data on outgoing s2s connections

14 years agomod_lastactivity: Initial commit.
Waqas Hussain [Sun, 18 Oct 2009 17:49:03 +0000 (22:49 +0500)]
mod_lastactivity: Initial commit.

14 years agomod_uptime: Removed event hook for iq/bare. mod_uptime only deals with iq/host queries.
Waqas Hussain [Sun, 18 Oct 2009 17:45:41 +0000 (22:45 +0500)]
mod_uptime: Removed event hook for iq/bare. mod_uptime only deals with iq/host queries.

14 years agomod_uptime: Removed unused variables.
Waqas Hussain [Sun, 18 Oct 2009 17:44:18 +0000 (22:44 +0500)]
mod_uptime: Removed unused variables.

14 years agomod_uptime: Updated to use events (which also fixes a few minor issues).
Waqas Hussain [Sun, 18 Oct 2009 14:42:45 +0000 (19:42 +0500)]
mod_uptime: Updated to use events (which also fixes a few minor issues).

14 years agomod_saslauth: Fixed access of globals.
Waqas Hussain [Sun, 18 Oct 2009 13:50:35 +0000 (18:50 +0500)]
mod_saslauth: Fixed access of globals.

14 years agomod_saslauth: Marked the im-session stream feature as optional. This allows smart...
Waqas Hussain [Sun, 18 Oct 2009 13:48:34 +0000 (18:48 +0500)]
mod_saslauth: Marked the im-session stream feature as optional. This allows smart clients to save a round trip.

14 years agomod_time: Updated to use events (which also fixes a few minor issues).
Waqas Hussain [Sun, 18 Oct 2009 13:45:41 +0000 (18:45 +0500)]
mod_time: Updated to use events (which also fixes a few minor issues).

14 years agomod_ping: Updated to use events (which also fixes a few minor issues).
Waqas Hussain [Sun, 18 Oct 2009 13:26:58 +0000 (18:26 +0500)]
mod_ping: Updated to use events (which also fixes a few minor issues).

14 years agomod_console: Fixed traceback occuring on using module:list on unknown hosts.
Waqas Hussain [Sun, 18 Oct 2009 13:10:05 +0000 (18:10 +0500)]
mod_console: Fixed traceback occuring on using module:list on unknown hosts.

14 years agomod_console: Added help text for config:reload().
Waqas Hussain [Sun, 18 Oct 2009 13:01:13 +0000 (18:01 +0500)]
mod_console: Added help text for config:reload().