Mercurial > prosody-hg
comparison plugins/mod_admin_shell.lua @ 14127:d666e7cd8609 13.0
mod_admin_shell: Show help listing when specifying only a section name
This is significantly better than showing 'table:0x.....'.
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 16 Apr 2026 18:16:05 +0100 |
| parents | 0e9e3efa381f |
| children | c1469296190d 2a050069f37b |
comparison
equal
deleted
inserted
replaced
| 14126:791426dda30d | 14127:d666e7cd8609 |
|---|---|
| 411 -- This happens if it was a "simple" command | 411 -- This happens if it was a "simple" command |
| 412 event.origin.send(result); | 412 event.origin.send(result); |
| 413 end | 413 end |
| 414 return; | 414 return; |
| 415 end | 415 end |
| 416 end | |
| 417 | |
| 418 if (source or line):match("^%w+$") and def_env[source or line] then | |
| 419 source, line = nil, "help:"..(source or line).."();"; | |
| 416 end | 420 end |
| 417 | 421 |
| 418 local chunkname = "=console"; | 422 local chunkname = "=console"; |
| 419 -- luacheck: ignore 311/err | 423 -- luacheck: ignore 311/err |
| 420 local chunk, err = envload(source or ("return "..line), chunkname, env); | 424 local chunk, err = envload(source or ("return "..line), chunkname, env); |
