Merge with 0.5
[prosody.git] / plugins / mod_vcard.lua
index c4afb12868ae1544be495097a1f25b1cb7d1b455..be856897424f024cec00e8949ce4e44bc64aed2e 100644 (file)
@@ -1,4 +1,4 @@
--- Prosody IM v0.4
+-- Prosody IM
 -- Copyright (C) 2008-2009 Matthew Wild
 -- Copyright (C) 2008-2009 Waqas Hussain
 -- 
@@ -8,18 +8,18 @@
 
 
 
-require "util.datamanager"
-local datamanager = datamanager;
+local hosts = _G.hosts;
+local datamanager = require "util.datamanager"
 
 local st = require "util.stanza"
 local t_concat, t_insert = table.concat, table.insert;
 
-require "util.jid"
+local jid = require "util.jid"
 local jid_split = jid.split;
 
 module:add_feature("vcard-temp");
 
-module:add_iq_handler({"c2s", "s2sin"}, "vcard-temp", 
+module:add_iq_handler({"c2s", "s2sin", "component"}, "vcard-temp", 
                function (session, stanza)
                        if stanza.tags[1].name == "vCard" then
                                local to = stanza.attr.to;