aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2008-11-27 17:09:21 +0000
committerMatthew Wild <mwild1@gmail.com>2008-11-27 17:09:21 +0000
commit6953a3a15ec57e841daaa340dc31754301dc951c (patch)
tree97c2e2a35cac0a21e8070bad28f9aded272fa6c8 /plugins
parentce18fc957d0c3d54fa9e5b42cf2fa7ef54129c5c (diff)
downloadprosody-6953a3a15ec57e841daaa340dc31754301dc951c.tar.gz
prosody-6953a3a15ec57e841daaa340dc31754301dc951c.zip
Some mod_console updates
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_console.lua23
1 files changed, 20 insertions, 3 deletions
diff --git a/plugins/mod_console.lua b/plugins/mod_console.lua
index 4471dccb..8b123df4 100644
--- a/plugins/mod_console.lua
+++ b/plugins/mod_console.lua
@@ -37,7 +37,7 @@ function console_listener.listener(conn, data)
-- Handle new connection
session = console:new_session(conn);
sessions[conn] = session;
- session.print("Welcome to the lxmppd admin console!");
+ printbanner(session);
end
if data then
-- Handle data
@@ -129,9 +129,9 @@ function def_env.server:reload()
end
def_env.module = {};
-function def_env.module:load(name)
+function def_env.module:load(name, host)
local mm = require "modulemanager";
- local ok, err = mm.load(name);
+ local ok, err = mm.load(host or self.env.host, name);
if not ok then
return false, err or "Unknown error loading module";
end
@@ -163,3 +163,20 @@ end
function def_env.hosts:add(name)
end
+
+-------------
+
+function printbanner(session)
+session.print [[
+ ____ \ / _
+ | _ \ _ __ ___ ___ _-_ __| |_ _
+ | |_) | '__/ _ \/ __|/ _ \ / _` | | | |
+ | __/| | | (_) \__ \ |_| | (_| | |_| |
+ |_| |_| \___/|___/\___/ \__,_|\__, |
+ A study in simplicity |___/
+
+]]
+session.print("Welcome to the Prosody administration console. For a list of commands, type: help");
+session.print("You may find more help on using this console in our online documentation at ");
+session.print("http://prosody.im/doc/console\n");
+end