Mercurial > prosody-hg
annotate core/features.lua @ 14217:7eb0e47418ab 13.0
util.human.io: Add simple version comparison
This is a small helper function that compares version string (it can be passed
to table.sort() as a comparator).
Full version sorts (e.g. semver, and natural/alphanumeric sort in general) are
more complex, and I would like to eventually support those. But this is a
stable branch and we don't need it for anything just yet.
Regarding justification for the stable branch:
The function is being committed with extensive tests, and isn't currently used
anywhere. The plan is to use it in an upcoming update of how TLS profiles are
configured, but the inputs in that case will be fixed (meaning that the risk
of breakage is lower than if we were running it against arbitrary data).
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 12 Jun 2026 11:38:39 +0100 |
| parents | 569fae28a2f3 |
| children | 565debd9c37a |
| rev | line source |
|---|---|
|
12972
ead41e25ebc0
core: Prefix module imports with prosody namespace
Kim Alvefur <zash@zash.se>
parents:
12957
diff
changeset
|
1 local set = require "prosody.util.set"; |
|
12252
4bfe658415a0
core.features: New module to track and expose the features supported by Prosody
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
2 |
|
4bfe658415a0
core.features: New module to track and expose the features supported by Prosody
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
3 return { |
|
4bfe658415a0
core.features: New module to track and expose the features supported by Prosody
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
4 available = set.new{ |
|
4bfe658415a0
core.features: New module to track and expose the features supported by Prosody
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
5 -- mod_bookmarks bundled |
|
4bfe658415a0
core.features: New module to track and expose the features supported by Prosody
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
6 "mod_bookmarks"; |
|
13438
0a0dd2505baa
features: Add mod_server_info
Matthew Wild <mwild1@gmail.com>
parents:
13425
diff
changeset
|
7 -- mod_server_info bundled |
|
0a0dd2505baa
features: Add mod_server_info
Matthew Wild <mwild1@gmail.com>
parents:
13425
diff
changeset
|
8 "mod_server_info"; |
|
13583
e77ef9a4604f
mod_flags: New module to view and manage flags on user accounts via shell/API
Matthew Wild <mwild1@gmail.com>
parents:
13455
diff
changeset
|
9 -- mod_flags bundled |
|
e77ef9a4604f
mod_flags: New module to view and manage flags on user accounts via shell/API
Matthew Wild <mwild1@gmail.com>
parents:
13455
diff
changeset
|
10 "mod_flags"; |
|
13622
4e908958660e
features: Add feature for bundled mod_cloud_notify
Matthew Wild <mwild1@gmail.com>
parents:
13583
diff
changeset
|
11 -- mod_cloud_notify bundled |
|
4e908958660e
features: Add feature for bundled mod_cloud_notify
Matthew Wild <mwild1@gmail.com>
parents:
13583
diff
changeset
|
12 "mod_cloud_notify"; |
|
13657
404d3644ac4a
mod_muc: Integrate support for vcards/avatars on MUC rooms
Matthew Wild <mwild1@gmail.com>
parents:
13622
diff
changeset
|
13 -- mod_muc has built-in vcard support |
|
404d3644ac4a
mod_muc: Integrate support for vcards/avatars on MUC rooms
Matthew Wild <mwild1@gmail.com>
parents:
13622
diff
changeset
|
14 "muc_vcard"; |
|
13718
569fae28a2f3
mod_http_altconnect: Imported from prosody-modules 6d5a19bdd718 w/changes
Matthew Wild <mwild1@gmail.com>
parents:
13657
diff
changeset
|
15 -- mod_http_altconnect bundled |
|
569fae28a2f3
mod_http_altconnect: Imported from prosody-modules 6d5a19bdd718 w/changes
Matthew Wild <mwild1@gmail.com>
parents:
13657
diff
changeset
|
16 "http_altconnect"; |
|
12655
a5a0783e9241
features: Add "permissions" feature for role-auth
Matthew Wild <mwild1@gmail.com>
parents:
12252
diff
changeset
|
17 -- Roles, module.may and per-session authz |
|
a5a0783e9241
features: Add "permissions" feature for role-auth
Matthew Wild <mwild1@gmail.com>
parents:
12252
diff
changeset
|
18 "permissions"; |
|
12955
d32926897ca4
core.features: Add feature for prosody.loader
Kim Alvefur <zash@zash.se>
parents:
12655
diff
changeset
|
19 -- prosody.* namespace |
|
d32926897ca4
core.features: Add feature for prosody.loader
Kim Alvefur <zash@zash.se>
parents:
12655
diff
changeset
|
20 "loader"; |
| 12957 | 21 -- "keyval+" store |
| 22 "keyval+"; | |
|
13110
d5f322dd424b
mod_s2s: Add event where resolver for s2sout can be tweaked
Kim Alvefur <zash@zash.se>
parents:
12252
diff
changeset
|
23 |
|
d5f322dd424b
mod_s2s: Add event where resolver for s2sout can be tweaked
Kim Alvefur <zash@zash.se>
parents:
12252
diff
changeset
|
24 "s2sout-pre-connect-event"; |
|
13170
082c7d856e61
core, plugins: Split prosody:user role into prosody:{guest,registered,member}
Matthew Wild <mwild1@gmail.com>
parents:
13111
diff
changeset
|
25 |
|
082c7d856e61
core, plugins: Split prosody:user role into prosody:{guest,registered,member}
Matthew Wild <mwild1@gmail.com>
parents:
13111
diff
changeset
|
26 -- prosody:guest, prosody:registered, prosody:member |
|
082c7d856e61
core, plugins: Split prosody:user role into prosody:{guest,registered,member}
Matthew Wild <mwild1@gmail.com>
parents:
13111
diff
changeset
|
27 "split-user-roles"; |
|
13201
65fb0d7a2312
moduleapi: Add enum config option method
Kim Alvefur <zash@zash.se>
parents:
13170
diff
changeset
|
28 |
|
65fb0d7a2312
moduleapi: Add enum config option method
Kim Alvefur <zash@zash.se>
parents:
13170
diff
changeset
|
29 -- new moduleapi methods |
|
65fb0d7a2312
moduleapi: Add enum config option method
Kim Alvefur <zash@zash.se>
parents:
13170
diff
changeset
|
30 "getopt-enum"; |
|
13203
aa6c2692a4be
core.moduleapi: Allow specifying an acceptable range for number options
Kim Alvefur <zash@zash.se>
parents:
13201
diff
changeset
|
31 "getopt-interval"; |
|
13204
c9ef35fab0b1
core.moduleapi: Add :get_option_period for parsing time intervals
Kim Alvefur <zash@zash.se>
parents:
13203
diff
changeset
|
32 "getopt-period"; |
|
13211
4d4f9e42bcf8
moduleapi: Add :get_option_integer()
Kim Alvefur <zash@zash.se>
parents:
13204
diff
changeset
|
33 "getopt-integer"; |
|
13425
3cebb30e7503
features: Add module-ready (for commit e20949a10118)
Matthew Wild <mwild1@gmail.com>
parents:
13211
diff
changeset
|
34 |
|
3cebb30e7503
features: Add module-ready (for commit e20949a10118)
Matthew Wild <mwild1@gmail.com>
parents:
13211
diff
changeset
|
35 -- new module.ready() |
|
3cebb30e7503
features: Add module-ready (for commit e20949a10118)
Matthew Wild <mwild1@gmail.com>
parents:
13211
diff
changeset
|
36 "module-ready"; |
|
13455
2a001cd7f99a
core.features: Advertise that events are fired for SIGUSR1/2
Kim Alvefur <zash@zash.se>
parents:
13438
diff
changeset
|
37 |
|
2a001cd7f99a
core.features: Advertise that events are fired for SIGUSR1/2
Kim Alvefur <zash@zash.se>
parents:
13438
diff
changeset
|
38 -- SIGUSR1 and 2 events |
|
2a001cd7f99a
core.features: Advertise that events are fired for SIGUSR1/2
Kim Alvefur <zash@zash.se>
parents:
13438
diff
changeset
|
39 "signal-events"; |
|
14217
7eb0e47418ab
util.human.io: Add simple version comparison
Matthew Wild <mwild1@gmail.com>
parents:
13718
diff
changeset
|
40 |
|
7eb0e47418ab
util.human.io: Add simple version comparison
Matthew Wild <mwild1@gmail.com>
parents:
13718
diff
changeset
|
41 -- util.human.io.simple_version_compare |
|
7eb0e47418ab
util.human.io: Add simple version comparison
Matthew Wild <mwild1@gmail.com>
parents:
13718
diff
changeset
|
42 "simple-version-compare"; |
|
12252
4bfe658415a0
core.features: New module to track and expose the features supported by Prosody
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
43 }; |
|
4bfe658415a0
core.features: New module to track and expose the features supported by Prosody
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
44 }; |
