Comparison

plugins/mod_websocket.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 12894:0598d822614f
child 13209:c8d949cf6b09
comparison
equal deleted inserted replaced
12976:a187600ec7d6 12977:74b9e05af71e
6 -- 6 --
7 -- luacheck: ignore 431/log 7 -- luacheck: ignore 431/log
8 8
9 module:set_global(); 9 module:set_global();
10 10
11 local add_task = require "util.timer".add_task; 11 local add_task = require "prosody.util.timer".add_task;
12 local add_filter = require "util.filters".add_filter; 12 local add_filter = require "prosody.util.filters".add_filter;
13 local sha1 = require "util.hashes".sha1; 13 local sha1 = require "prosody.util.hashes".sha1;
14 local base64 = require "util.encodings".base64.encode; 14 local base64 = require "prosody.util.encodings".base64.encode;
15 local st = require "util.stanza"; 15 local st = require "prosody.util.stanza";
16 local parse_xml = require "util.xml".parse; 16 local parse_xml = require "prosody.util.xml".parse;
17 local contains_token = require "util.http".contains_token; 17 local contains_token = require "prosody.util.http".contains_token;
18 local portmanager = require "core.portmanager"; 18 local portmanager = require "prosody.core.portmanager";
19 local sm_destroy_session = require"core.sessionmanager".destroy_session; 19 local sm_destroy_session = require"prosody.core.sessionmanager".destroy_session;
20 local log = module._log; 20 local log = module._log;
21 local dbuffer = require "util.dbuffer"; 21 local dbuffer = require "prosody.util.dbuffer";
22 22
23 local websocket_frames = require"net.websocket.frames"; 23 local websocket_frames = require"prosody.net.websocket.frames";
24 local parse_frame = websocket_frames.parse; 24 local parse_frame = websocket_frames.parse;
25 local build_frame = websocket_frames.build; 25 local build_frame = websocket_frames.build;
26 local build_close = websocket_frames.build_close; 26 local build_close = websocket_frames.build_close;
27 local parse_close = websocket_frames.parse_close; 27 local parse_close = websocket_frames.parse_close;
28 28
368 }); 368 });
369 369
370 module:hook("c2s-read-timeout", keepalive, -0.9); 370 module:hook("c2s-read-timeout", keepalive, -0.9);
371 end 371 end
372 372
373 if require"core.modulemanager".get_modules_for_host("*"):contains(module.name) then 373 if require"prosody.core.modulemanager".get_modules_for_host("*"):contains(module.name) then
374 module:add_host(); 374 module:add_host();
375 end 375 end