diff options
author | Waqas Hussain <waqas20@gmail.com> | 2010-01-26 02:29:32 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2010-01-26 02:29:32 +0500 |
commit | 27eb7ab85f639382e9cd7d64cc7fe5fc605bc887 (patch) | |
tree | 033349ed565e377505e19fd987ab3dc3945f4081 /plugins/muc/muc.lib.lua | |
parent | 9f75018162e87587fdcab95ec2ec118bbe1d239a (diff) | |
download | prosody-27eb7ab85f639382e9cd7d64cc7fe5fc605bc887.tar.gz prosody-27eb7ab85f639382e9cd7d64cc7fe5fc605bc887.zip |
MUC: Converted some local functions into methods.
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r-- | plugins/muc/muc.lib.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index abbcb9a4..7063fcbd 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -183,12 +183,12 @@ function room_mt:send_history(to) end end -local function room_get_disco_info(self, stanza) +function room_mt:get_disco_info(stanza) return st.reply(stanza):query("http://jabber.org/protocol/disco#info") :tag("identity", {category="conference", type="text"}):up() :tag("feature", {var="http://jabber.org/protocol/muc"}); end -local function room_get_disco_items(self, stanza) +function room_mt:get_disco_items(stanza) local reply = st.reply(stanza):query("http://jabber.org/protocol/disco#items"); for room_jid in pairs(self._occupants) do reply:tag("item", {jid = room_jid, name = room_jid:match("/(.*)")}):up(); @@ -502,9 +502,9 @@ function room_mt:handle_to_room(origin, stanza) -- presence changes and groupcha local xmlns = stanza.tags[1] and stanza.tags[1].attr.xmlns; if stanza.name == "iq" then if xmlns == "http://jabber.org/protocol/disco#info" and type == "get" then - origin.send(room_get_disco_info(self, stanza)); + origin.send(self:get_disco_info(stanza)); elseif xmlns == "http://jabber.org/protocol/disco#items" and type == "get" then - origin.send(room_get_disco_items(self, stanza)); + origin.send(self:get_disco_items(stanza)); elseif xmlns == "http://jabber.org/protocol/muc#admin" then local actor = stanza.attr.from; local affiliation = self:get_affiliation(actor); |