Software /
code /
verse
Comparison
client.lua @ 490:6b2f31da9610
Update for new Prosody module namespace
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 20 May 2023 20:48:03 +0200 |
parent | 460:a523535d8937 |
comparison
equal
deleted
inserted
replaced
489:39ed19f12dca | 490:6b2f31da9610 |
---|---|
1 local verse = require "verse"; | 1 local verse = require "verse"; |
2 local stream = verse.stream_mt; | 2 local stream = verse.stream_mt; |
3 | 3 |
4 local jid_split = require "util.jid".split; | 4 local jid_split = require "prosody.util.jid".split; |
5 local adns = require "net.adns"; | 5 local adns = require "prosody.net.adns"; |
6 local st = require "util.stanza"; | 6 local st = require "prosody.util.stanza"; |
7 local new_id = require "util.id".short; | 7 local new_id = require "prosody.util.id".short; |
8 | 8 |
9 math.randomseed((require"socket".gettime() * 1000000) % 0x80000000); | 9 math.randomseed((require"socket".gettime() * 1000000) % 0x80000000); |
10 | 10 |
11 -- Shortcuts to save having to load util.stanza | 11 -- Shortcuts to save having to load util.stanza |
12 verse.message, verse.presence, verse.iq, verse.stanza, verse.reply, verse.error_reply = | 12 verse.message, verse.presence, verse.iq, verse.stanza, verse.reply, verse.error_reply = |
17 attr.id = new_id(); | 17 attr.id = new_id(); |
18 end | 18 end |
19 return st.iq(attr); | 19 return st.iq(attr); |
20 end | 20 end |
21 | 21 |
22 local new_xmpp_stream = require "util.xmppstream".new; | 22 local new_xmpp_stream = require "prosody.util.xmppstream".new; |
23 | 23 |
24 local xmlns_stream = "http://etherx.jabber.org/streams"; | 24 local xmlns_stream = "http://etherx.jabber.org/streams"; |
25 | 25 |
26 local function compare_srv_priorities(a, b) | 26 local function compare_srv_priorities(a, b) |
27 if a.priority == b.priority then | 27 if a.priority == b.priority then |