Software / code / prosody
Comparison
plugins/mod_admin_adhoc.lua @ 10398:fa50789d6ec7
mod_admin_adhoc: Add some flags to s2s listing command
These are present in mod_admin_telnet and relevant to s2s
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 07 Nov 2019 17:07:02 +0100 |
| parent | 9402:b530b5daae91 |
| child | 10543:46b456ed12bd |
comparison
equal
deleted
inserted
replaced
| 10397:921e8b00778e | 10398:fa50789d6ec7 |
|---|---|
| 390 | 390 |
| 391 local flags = {}; | 391 local flags = {}; |
| 392 if session.cert_identity_status == "valid" then | 392 if session.cert_identity_status == "valid" then |
| 393 flags[#flags+1] = "authenticated"; | 393 flags[#flags+1] = "authenticated"; |
| 394 end | 394 end |
| 395 if session.dialback_key then | |
| 396 flags[#flags+1] = "dialback"; | |
| 397 end | |
| 398 if session.external_auth then | |
| 399 flags[#flags+1] = "SASL"; | |
| 400 end | |
| 395 if session.secure then | 401 if session.secure then |
| 396 flags[#flags+1] = "encrypted"; | 402 flags[#flags+1] = "encrypted"; |
| 397 end | 403 end |
| 398 if session.compressed then | 404 if session.compressed then |
| 399 flags[#flags+1] = "compressed"; | 405 flags[#flags+1] = "compressed"; |
| 402 flags[#flags+1] = "sm"; | 408 flags[#flags+1] = "sm"; |
| 403 end | 409 end |
| 404 if session.ip and session.ip:match(":") then | 410 if session.ip and session.ip:match(":") then |
| 405 flags[#flags+1] = "IPv6"; | 411 flags[#flags+1] = "IPv6"; |
| 406 end | 412 end |
| 413 if session.incoming and session.outgoing then | |
| 414 flags[#flags+1] = "bidi"; | |
| 415 elseif session.is_bidi or session.bidi_session then | |
| 416 flags[#flags+1] = "bidi"; | |
| 417 end | |
| 418 | |
| 407 line[#line+1] = "("..t_concat(flags, ", ")..")"; | 419 line[#line+1] = "("..t_concat(flags, ", ")..")"; |
| 408 | 420 |
| 409 return t_concat(line, " "); | 421 return t_concat(line, " "); |
| 410 end | 422 end |
| 411 | 423 |