Software /
code /
prosody
Comparison
plugins/mod_presence.lua @ 5416:0ba3a49d3863
mod_presence: Remove some unused variables
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 03 Apr 2013 13:39:41 +0100 |
parent | 5370:7838acadb0fa |
child | 5776:bd0ff8ae98a8 |
child | 7430:ad0b15f253ee |
comparison
equal
deleted
inserted
replaced
5415:9e7aa5b47bdf | 5416:0ba3a49d3863 |
---|---|
7 -- | 7 -- |
8 | 8 |
9 local log = module._log; | 9 local log = module._log; |
10 | 10 |
11 local require = require; | 11 local require = require; |
12 local pairs, ipairs = pairs, ipairs; | 12 local pairs = pairs; |
13 local t_concat, t_insert = table.concat, table.insert; | 13 local t_concat, t_insert = table.concat, table.insert; |
14 local s_find = string.find; | 14 local s_find = string.find; |
15 local tonumber = tonumber; | 15 local tonumber = tonumber; |
16 | 16 |
17 local core_post_stanza = prosody.core_post_stanza; | 17 local core_post_stanza = prosody.core_post_stanza; |
344 end -- resource not online, discard | 344 end -- resource not online, discard |
345 return true; | 345 return true; |
346 end); | 346 end); |
347 module:hook("presence/host", function(data) | 347 module:hook("presence/host", function(data) |
348 -- inbound presence to the host | 348 -- inbound presence to the host |
349 local origin, stanza = data.origin, data.stanza; | 349 local stanza = data.stanza; |
350 | 350 |
351 local from_bare = jid_bare(stanza.attr.from); | 351 local from_bare = jid_bare(stanza.attr.from); |
352 local t = stanza.attr.type; | 352 local t = stanza.attr.type; |
353 if t == "probe" then | 353 if t == "probe" then |
354 core_post_stanza(hosts[module.host], st.presence({ from = module.host, to = from_bare, id = stanza.attr.id })); | 354 core_post_stanza(hosts[module.host], st.presence({ from = module.host, to = from_bare, id = stanza.attr.id })); |