mod_roster_command: Fix traceback and log error message when loaded into Prosody (thanks epaulin)
--- a/mod_roster_command/mod_roster_command.lua Fri Dec 02 20:53:09 2011 +0000
+++ b/mod_roster_command/mod_roster_command.lua Sat Dec 03 15:29:00 2011 +0000
@@ -9,6 +9,13 @@
-- COPYING file in the source package for more information.
-----------------------------------------------------------
+if not rawget(_G, "prosodyctl") then
+ module:log("error", "Do not load this module in Prosody, for correct usage see: http://code.google.com/p/prosody-modules/wiki/mod_roster_command");
+ module.host = "*";
+ return;
+end
+
+
-- Workaround for lack of util.startup...
_G.bare_sessions = _G.bare_sessions or {};