MUC: Added kicking support.

Mon, 07 Sep 2009 20:48:16 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Mon, 07 Sep 2009 20:48:16 +0500
changeset 1752
4db786919805
parent 1751
55ee6e792e3e
child 1753
a84901db4085

MUC: Added kicking support.

plugins/muc/muc.lib.lua file | annotate | diff | comparison | revisions
--- a/plugins/muc/muc.lib.lua	Mon Sep 07 20:43:25 2009 +0500
+++ b/plugins/muc/muc.lib.lua	Mon Sep 07 20:48:16 2009 +0500
@@ -488,6 +488,7 @@
 	return session and session.role or nil;
 end
 function room_mt:set_role(actor, nick, role, callback)
+	if role == "none" then role = nil; end
 	if role and role ~= "moderator" and role ~= "participant" and role ~= "visitor" then return nil, "modify", "not-acceptable"; end
 	if self:get_affiliation(actor) ~= "owner" then return nil, "cancel", "not-allowed"; end
 	local occupant = self._occupants[nick];

mercurial