MUC: Re-enable nick changes for non-multisession nicks.

Sun, 18 Oct 2009 16:45:56 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Sun, 18 Oct 2009 16:45:56 +0500
changeset 2008
6b6b924ee558
parent 2007
b89d61db74d1
child 2009
3f9cce29c57d

MUC: Re-enable nick changes for non-multisession nicks.

plugins/muc/muc.lib.lua file | annotate | diff | comparison | revisions
--- 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();

mercurial