diff options
author | Waqas Hussain <waqas20@gmail.com> | 2009-10-18 07:40:14 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2009-10-18 07:40:14 +0500 |
commit | b6af612f7cd2ba2518240c6c50432cc2faa8a84f (patch) | |
tree | e1a72dfd7880311e37effacb1dcdc1eb7f970c6e /plugins/mod_vcard.lua | |
parent | 01b77c1527fe70def16031c6bfedbe1ee5220b1e (diff) | |
download | prosody-b6af612f7cd2ba2518240c6c50432cc2faa8a84f.tar.gz prosody-b6af612f7cd2ba2518240c6c50432cc2faa8a84f.zip |
mod_vcard: Cleaned up unused variables and global accesses.
Diffstat (limited to 'plugins/mod_vcard.lua')
-rw-r--r-- | plugins/mod_vcard.lua | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/plugins/mod_vcard.lua b/plugins/mod_vcard.lua index 3291d1c7..0efc1638 100644 --- a/plugins/mod_vcard.lua +++ b/plugins/mod_vcard.lua @@ -6,19 +6,13 @@ -- COPYING file in the source package for more information. -- -local hosts = _G.hosts; -local datamanager = require "util.datamanager" - local st = require "util.stanza" -local t_concat, t_insert = table.concat, table.insert; - -local jid = require "util.jid" -local jid_split = jid.split; +local jid_split = require "util.jid".split; +local datamanager = require "util.datamanager" -local xmlns_vcard = "vcard-temp"; -module:add_feature(xmlns_vcard); +module:add_feature("vcard-temp"); -function handle_vcard(event) +local function handle_vcard(event) local session, stanza = event.origin, event.stanza; local to = stanza.attr.to; if stanza.attr.type == "get" then @@ -57,7 +51,7 @@ if module:get_option("vcard_compatibility") then module:hook("iq/full", function(data) local stanza = data.stanza; local payload = stanza.tags[1]; - if stanza.attr.type == "get" or stanza.attr.type == "set" and payload.name == "vCard" and payload.attr.xmlns == xmlns_vcard then + if stanza.attr.type == "get" or stanza.attr.type == "set" and payload.name == "vCard" and payload.attr.xmlns == "vcard-temp" then return handle_vcard(data); end end, 1); |