Software /
code /
prosody
Comparison
plugins/mod_admin_adhoc.lua @ 7045:49e2456bf2ce
mod_admin_adhoc: Show only connections to/from the host the command was run on
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 03 Jan 2016 17:48:36 +0100 |
parent | 7044:8fcee3339463 |
child | 8192:4354f556c5db |
comparison
equal
deleted
inserted
replaced
7044:8fcee3339463 | 7045:49e2456bf2ce |
---|---|
420 remotehost, localhost = session.from_host or "?", session.to_host or "?"; | 420 remotehost, localhost = session.from_host or "?", session.to_host or "?"; |
421 end | 421 end |
422 local sess_lines = { r = remotehost, | 422 local sess_lines = { r = remotehost, |
423 session_flags(session, { "", direction, remotehost or "?" })}; | 423 session_flags(session, { "", direction, remotehost or "?" })}; |
424 | 424 |
425 if remotehost:match(module_host) or localhost:match(module_host) then | 425 if localhost == module_host then |
426 s2s_list[#s2s_list+1] = sess_lines; | 426 s2s_list[#s2s_list+1] = sess_lines; |
427 end | 427 end |
428 end | 428 end |
429 | 429 |
430 t_sort(s2s_list, function(a, b) | 430 t_sort(s2s_list, function(a, b) |