One should be able to specify the number/size of offline messages a user
may store until new/old ones are dropped.
I suggest the option is per host (unless specified in the global section).
As a bonus it could accept a list of JIDs to increase/decrease the amount
for specific users. The value "0" for a given JID could grant him unlimited
offline msgs.
MattJ
on
I plan to solve this by introducing a new plugin, mod_limits.
- Limit number/size of offline messages
- Limit roster size
- Limit/restrict PEP node creation
- Private XML
The list is endless. Which raises the question of whether it should actually be just
one plugin. I don't like having the same logic spread around throughout the other
modules, but I also don't like monolithic modules either.
One should be able to specify the number/size of offline messages a user may store until new/old ones are dropped. I suggest the option is per host (unless specified in the global section). As a bonus it could accept a list of JIDs to increase/decrease the amount for specific users. The value "0" for a given JID could grant him unlimited offline msgs.
I plan to solve this by introducing a new plugin, mod_limits. - Limit number/size of offline messages - Limit roster size - Limit/restrict PEP node creation - Private XML The list is endless. Which raises the question of whether it should actually be just one plugin. I don't like having the same logic spread around throughout the other modules, but I also don't like monolithic modules either.
ChangesType-DefectType-Enhancement Difficulty-Easy Status-AcceptedIssue 133 has been merged into this issue.
There is a first draft of this module here: http://prosody.im/files/mod_limits.lua And also a simpler one specifically for MUC: http://code.google.com/p/prosody-modules/wiki/mod_muc_limits They're both only really tested with 0.9 and trunk, but feedback from anyone experimenting with them on any (recent!) version would be just as welcome.
mod_limits has been in prosody-modules, it seems to work well. I am planning to merge it for 0.10, so I am setting the milestone on this ticket.
Changesplease note, that mod_limits is not shown in the list of loaded modules although it is loaded. <blockquote> module:list("example.org") | example.org: | adhoc | admin_adhoc | announce | auth_internal_hashed | bosh | c2s_conn_throttle | c2s_limit_sessions | carbons | csi | dialback | disco | filter_chatstates | http | inotify_reload | iq | lastlog | list_inactive | log_sasl_mech | message | motd_once | offline | pep | ping | presence | privacy | private | query_client_ver | register_redirect | register_web | roster | s2s | saslauth | smacks | storage_internal | throttle_presence | time | tls | uptime | vcard | watchregistrations | welcome | Result: nil module:load | Sorry, I couldn't understand that... console:2: function arguments expected near the end of the line module:load("limits", "example.org") | Command completed with a problem | Message: Last error: global-module-already-loaded </blockquote>
Related #495
⭐+1
mod_limits has been merged into 0.10 in commit cdffe33efae4.
Changes