Changeset

6049:6d410ffd6e13

MUC: Fixed traceback when a JID not in a room requested a role change for an occupant.
author Waqas Hussain <waqas20@gmail.com>
date Tue, 01 Apr 2014 10:02:58 -0400
parents 6047:4db0403bfc0d
children 6050:5d73412aa1ba
files plugins/muc/muc.lib.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua	Tue Apr 01 15:26:40 2014 +0200
+++ b/plugins/muc/muc.lib.lua	Tue Apr 01 10:02:58 2014 -0400
@@ -1060,7 +1060,7 @@
 	if actor_jid == true then return true; end
 
 	local actor = self._occupants[self._jid_nick[actor_jid]];
-	if actor.role == "moderator" then
+	if actor and actor.role == "moderator" then
 		if occupant.affiliation ~= "owner" and occupant.affiliation ~= "admin" then
 			if actor.affiliation == "owner" or actor.affiliation == "admin" then
 				return true;