Software /
code /
prosody
Comparison
plugins/mod_debug.lua @ 969:9ab6934fb1ff
mod_debug: Run on a different port, and use a different listener to mod_console
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 08 Apr 2009 21:14:48 +0100 |
parent | 946:cf4d9e2d33d1 |
child | 997:c81b6141d693 |
comparison
equal
deleted
inserted
replaced
968:13e3bdfb02f9 | 969:9ab6934fb1ff |
---|---|
8 | 8 |
9 module.host = "*"; | 9 module.host = "*"; |
10 | 10 |
11 local connlisteners_register = require "net.connlisteners".register; | 11 local connlisteners_register = require "net.connlisteners".register; |
12 | 12 |
13 local console_listener = { default_port = 5582; default_mode = "*l"; }; | 13 local console_listener = { default_port = 5583; default_mode = "*l"; }; |
14 | 14 |
15 local sha256, missingglobal = require "util.hashes".sha256; | 15 local sha256, missingglobal = require "util.hashes".sha256; |
16 | 16 |
17 local commands = {}; | 17 local commands = {}; |
18 local debug_env = {}; | 18 local debug_env = {}; |
100 | 100 |
101 function console_listener.disconnect(conn, err) | 101 function console_listener.disconnect(conn, err) |
102 | 102 |
103 end | 103 end |
104 | 104 |
105 connlisteners_register('console', console_listener); | 105 connlisteners_register('debug', console_listener); |
106 require "net.connlisteners".start("debug"); | |
106 | 107 |
107 -- Console commands -- | 108 -- Console commands -- |
108 -- These are simple commands, not valid standalone in Lua | 109 -- These are simple commands, not valid standalone in Lua |
109 | 110 |
110 function commands.bye(session) | 111 function commands.bye(session) |