# HG changeset patch # User Kim Alvefur # Date 1447174063 -3600 # Node ID 634b42541f5bb08bd2b61912c79484385154f553 # Parent 1f263aaba83e107888c18e92f306f2a4486c85d1 mod_roster_command: Attempt to update for compatibility with 0.10 diff -r 1f263aaba83e -r 634b42541f5b mod_roster_command/mod_roster_command.lua --- a/mod_roster_command/mod_roster_command.lua Tue Nov 10 17:44:22 2015 +0100 +++ b/mod_roster_command/mod_roster_command.lua Tue Nov 10 17:47:43 2015 +0100 @@ -9,9 +9,8 @@ -- COPYING file in the source package for more information. ----------------------------------------------------------- -if not rawget(_G, "prosodyctl") then +if module.host ~= "*" then module:log("error", "Do not load this module in Prosody, for correct usage see: https://modules.prosody.im/mod_roster_command.html"); - module.host = "*"; return; end @@ -19,10 +18,13 @@ -- Workaround for lack of util.startup... _G.bare_sessions = _G.bare_sessions or {}; +local usermanager = require "core.usermanager"; local rostermanager = require "core.rostermanager"; local storagemanager = require "core.storagemanager"; local jid = require "util.jid"; -local warn = prosodyctl.show_warning; +local warn = require"util.prosodyctl".show_warning; +local prosody = _G.prosody; +local hosts = prosody.hosts; -- Make a *one-way* subscription. User will see when contact is online, -- contact will not see when user is online.