Diff

plugins/muc/whois.lib.lua @ 7075:47a2deb74b56

MUC: Fix global access when setting 'whois', probably resulted in wrong status code return (thanks EmilyRose)
author Kim Alvefur <zash@zash.se>
date Mon, 11 Jan 2016 13:44:48 +0100
parent 6991:84e01dbb739e
child 7352:50b24b3476e6
line wrap: on
line diff
--- a/plugins/muc/whois.lib.lua	Sun Jan 10 03:57:17 2016 +0100
+++ b/plugins/muc/whois.lib.lua	Mon Jan 11 13:44:48 2016 +0100
@@ -43,7 +43,7 @@
 
 module:hook("muc-config-submitted/muc#roomconfig_whois", function(event)
 	if set_whois(event.room, event.value) then
-		local code = (new == 'moderators') and "173" or "172";
+		local code = (event.value == 'moderators') and "173" or "172";
 		event.status_codes[code] = true;
 	end
 end);