# HG changeset patch # User Waqas Hussain # Date 1410884825 14400 # Node ID 5fd6c739e9bf67d80a4545dd676ecf7584e790ca # Parent 7e69d61a0ef77f88d47c2b2d941d382dec505d5e plugins/mod_muc_unique: Fix undefined global access (thanks Lance) diff -r 7e69d61a0ef7 -r 5fd6c739e9bf plugins/mod_muc_unique.lua --- a/plugins/mod_muc_unique.lua Thu Sep 11 01:17:56 2014 +0200 +++ b/plugins/mod_muc_unique.lua Tue Sep 16 12:27:05 2014 -0400 @@ -1,7 +1,8 @@ -- XEP-0307: Unique Room Names for Multi-User Chat +local st = require "util.stanza"; local uuid_gen = require "util.uuid".generate; module:add_feature "http://jabber.org/protocol/muc#unique" -module:hook("iq-get/host/http://jabber.org/protocol/muc#unique:unique", function() +module:hook("iq-get/host/http://jabber.org/protocol/muc#unique:unique", function(event) local origin, stanza = event.origin, event.stanza; origin.send(st.reply(stanza) :tag("unique", {xmlns = "http://jabber.org/protocol/muc#unique"})