Software / code / prosody-modules
Comparison
mod_roster_command/mod_roster_command.lua @ 492:f806c8a7f985
mod_roster_command: Fix traceback and log error message when loaded into Prosody (thanks epaulin)
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sat, 03 Dec 2011 15:29:00 +0000 |
| parent | 453:1969310ea06a |
| child | 1508:f7cb287dd3c7 |
comparison
equal
deleted
inserted
replaced
| 491:5b3db688213d | 492:f806c8a7f985 |
|---|---|
| 6 -- Copyright (C) 2011 Adam Nielsen | 6 -- Copyright (C) 2011 Adam Nielsen |
| 7 -- | 7 -- |
| 8 -- This project is MIT/X11 licensed. Please see the | 8 -- This project is MIT/X11 licensed. Please see the |
| 9 -- COPYING file in the source package for more information. | 9 -- COPYING file in the source package for more information. |
| 10 ----------------------------------------------------------- | 10 ----------------------------------------------------------- |
| 11 | |
| 12 if not rawget(_G, "prosodyctl") then | |
| 13 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"); | |
| 14 module.host = "*"; | |
| 15 return; | |
| 16 end | |
| 17 | |
| 11 | 18 |
| 12 -- Workaround for lack of util.startup... | 19 -- Workaround for lack of util.startup... |
| 13 _G.bare_sessions = _G.bare_sessions or {}; | 20 _G.bare_sessions = _G.bare_sessions or {}; |
| 14 | 21 |
| 15 local rostermanager = require "core.rostermanager"; | 22 local rostermanager = require "core.rostermanager"; |