Software /
code /
prosody
Comparison
util/stanza.lua @ 58:85a93adef6f6
Removed unused functions
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sat, 04 Oct 2008 19:51:59 +0500 |
parent | 30:bcf539295f2d |
child | 62:9ec0d447cc9e |
comparison
equal
deleted
inserted
replaced
55:4edb942e9dff | 58:85a93adef6f6 |
---|---|
15 function stanza(name, attr) | 15 function stanza(name, attr) |
16 local stanza = { name = name, attr = attr or {}, tags = {}, last_add = {}}; | 16 local stanza = { name = name, attr = attr or {}, tags = {}, last_add = {}}; |
17 return setmetatable(stanza, stanza_mt); | 17 return setmetatable(stanza, stanza_mt); |
18 end | 18 end |
19 | 19 |
20 function stanza_mt:iq(attrs) | |
21 return self + stanza("iq", attrs) | |
22 end | |
23 function stanza_mt:message(attrs) | |
24 return self + stanza("message", attrs) | |
25 end | |
26 function stanza_mt:presence(attrs) | |
27 return self + stanza("presence", attrs) | |
28 end | |
29 function stanza_mt:query(xmlns) | 20 function stanza_mt:query(xmlns) |
30 return self:tag("query", { xmlns = xmlns }); | 21 return self:tag("query", { xmlns = xmlns }); |
31 end | 22 end |
32 function stanza_mt:tag(name, attrs) | 23 function stanza_mt:tag(name, attrs) |
33 local s = stanza(name, attrs); | 24 local s = stanza(name, attrs); |