mod_groups: Move variable to smaller scope
authorKim Alvefur <zash@zash.se>
Thu, 4 Feb 2016 09:07:02 +0000 (10:07 +0100)
committerKim Alvefur <zash@zash.se>
Thu, 4 Feb 2016 09:07:02 +0000 (10:07 +0100)
plugins/mod_groups.lua

index 62a382469d712063b310f337dd5ebb2bbe6fcaf4..d696d45388df400f49caa168de6423ae314589d7 100644 (file)
@@ -10,8 +10,6 @@
 local groups;
 local members;
 
-local groups_file;
-
 local jid, datamanager = require "util.jid", require "util.datamanager";
 local jid_prep = jid.prep;
 
@@ -82,7 +80,7 @@ function remove_virtual_contacts(username, host, datastore, data)
 end
 
 function module.load()
-       groups_file = module:get_option_path("groups_file", nil, "config");
+       local groups_file = module:get_option_path("groups_file", nil, "config");
        if not groups_file then return; end
 
        module:hook("roster-load", inject_roster_contacts);