Software /
code /
prosody
Diff
plugins/mod_blocklist.lua @ 12977:74b9e05af71e
plugins: Prefix module imports with prosody namespace
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 24 Mar 2023 13:15:28 +0100 |
parent | 12775:1dd468c63a3d |
child | 13213:50324f66ca2a |
line wrap: on
line diff
--- a/plugins/mod_blocklist.lua Fri Mar 17 18:03:07 2023 +0100 +++ b/plugins/mod_blocklist.lua Fri Mar 24 13:15:28 2023 +0100 @@ -9,16 +9,16 @@ -- This module implements XEP-0191: Blocking Command -- -local user_exists = require"core.usermanager".user_exists; -local rostermanager = require"core.rostermanager"; +local user_exists = require"prosody.core.usermanager".user_exists; +local rostermanager = require"prosody.core.rostermanager"; local is_contact_subscribed = rostermanager.is_contact_subscribed; local is_contact_pending_in = rostermanager.is_contact_pending_in; local load_roster = rostermanager.load_roster; local save_roster = rostermanager.save_roster; -local st = require"util.stanza"; +local st = require"prosody.util.stanza"; local st_error_reply = st.error_reply; -local jid_prep = require"util.jid".prep; -local jid_split = require"util.jid".split; +local jid_prep = require"prosody.util.jid".prep; +local jid_split = require"prosody.util.jid".split; local storage = module:open_store(); local sessions = prosody.hosts[module.host].sessions; @@ -36,7 +36,7 @@ -- want to use too much memory either, so this can be tuned by advanced -- users. TODO use science to figure out a better default, 64 is just a guess. local cache_size = module:get_option_number("blocklist_cache_size", 64); -local cache2 = require"util.cache".new(cache_size); +local cache2 = require"prosody.util.cache".new(cache_size); local null_blocklist = {};