Software /
code /
prosody-modules
Comparison
mod_onions/mod_onions.lua @ 4954:e8a487c42b36
merge upstream
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 28 May 2022 16:43:04 +0200 |
parent | 4945:fa415cd9eeca |
comparison
equal
deleted
inserted
replaced
4953:7d6ae8bb95dc | 4954:e8a487c42b36 |
---|---|
8 | 8 |
9 local portmanager = require "core.portmanager"; | 9 local portmanager = require "core.portmanager"; |
10 | 10 |
11 local softreq = require "util.dependencies".softreq; | 11 local softreq = require "util.dependencies".softreq; |
12 | 12 |
13 local bit; | 13 local bit = assert(softreq "bit" or softreq "bit32" or softreq "util.bitcompat", "No bit module found. See https://prosody.im/doc/depends#bitop"); |
14 pcall(function() bit = require"bit"; end); | |
15 bit = bit or softreq"bit32" | |
16 if not bit then module:log("error", "No bit module found. Either LuaJIT 2, lua-bitop or Lua 5.2 is required"); end | |
17 | 14 |
18 local band = bit.band; | 15 local band = bit.band; |
19 local rshift = bit.rshift; | 16 local rshift = bit.rshift; |
20 local lshift = bit.lshift; | 17 local lshift = bit.lshift; |
21 | 18 |