Diff

plugins/muc/muc.lib.lua @ 2008:6b6b924ee558

MUC: Re-enable nick changes for non-multisession nicks.
author Waqas Hussain <waqas20@gmail.com>
date Sun, 18 Oct 2009 16:45:56 +0500
parent 2006:0c62bed9d338
child 2035:b8c3dbf76a2e
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua	Sun Oct 18 12:26:53 2009 +0100
+++ b/plugins/muc/muc.lib.lua	Sun Oct 18 16:45:56 2009 +0500
@@ -253,7 +253,7 @@
 						self:broadcast_presence(pr, from);
 					else -- change nick
 						local occupant = self._occupants[current_nick];
-						local is_multisession = next(occupant, next(occupant));
+						local is_multisession = next(occupant.sessions, next(occupant.sessions));
 						if self._occupants[to] or is_multisession then
 							log("debug", "%s couldn't change nick", current_nick);
 							local reply = st.error_reply(stanza, "cancel", "conflict"):up();