aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/muc.lib.lua
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2014-03-19 15:01:18 -0400
committerdaurnimator <quae@daurnimator.com>2014-03-19 15:01:18 -0400
commitdde1ed8455c6affd2b967c8fcf3d79aaa874f32b (patch)
treece9728f591088c44f5209c5910ecb25e506bdd99 /plugins/muc/muc.lib.lua
parenta3c091edf5f5a93c8036d38f73ef33305b5e0979 (diff)
downloadprosody-dde1ed8455c6affd2b967c8fcf3d79aaa874f32b.tar.gz
prosody-dde1ed8455c6affd2b967c8fcf3d79aaa874f32b.zip
plugins/muc/muc.lib: Don't get same variable twice.....
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r--plugins/muc/muc.lib.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 173d9827..f3c72e26 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -445,13 +445,12 @@ function room_mt:handle_change_nick(origin, stanza, current_nick, to)
origin.send(reply:tag("x", {xmlns = "http://jabber.org/protocol/muc"}));
return true;
else
- local data = self._occupants[current_nick];
local to_nick = select(3, jid_split(to));
- log("debug", "%s (%s) changing nick to %s", current_nick, data.jid, to);
+ log("debug", "%s (%s) changing nick to %s", current_nick, occupant.jid, to);
local p = st.presence({type='unavailable', from=current_nick});
self:broadcast_presence(p, from, '303', to_nick);
self._occupants[current_nick] = nil;
- self._occupants[to] = data;
+ self._occupants[to] = occupant;
self._jid_nick[from] = to;
local pr = get_filtered_presence(stanza);
pr.attr.from = to;