2using System.Threading.Tasks;
23 public override string Name =>
"Servers";
34 StringBuilder Markdown =
new StringBuilder();
36 Markdown.AppendLine(
"| To | Connected | Local | Remote | Trust | Valid | State | Last Connected | Last Disconnected | Active | Total | Time | Avg Time |");
37 Markdown.AppendLine(
"|:---|:---------:|:------|:-------|:-----:|:-----:|:------|:---------------|:------------------|:------:|------:|-----:|---------:|");
41 Markdown.Append(
"| ");
43 Markdown.Append(
" | ");
44 Markdown.Append(Connection.
Connected.ToString());
45 Markdown.Append(
" | ");
47 Markdown.Append(
" | ");
49 Markdown.Append(
" | ");
51 Markdown.Append(
" | ");
53 Markdown.Append(
" | ");
54 Markdown.Append(Connection.
State.ToString());
55 Markdown.Append(
" | ");
57 Markdown.Append(
" | ");
59 Markdown.Append(
" | ");
61 Markdown.Append(
" | ");
63 Markdown.Append(
" | ");
65 Markdown.Append(
" | ");
67 Markdown.AppendLine(
" |");
70 await ResponseCallback(Markdown.ToString(),
string.Empty);
76 public override string[]
HelpParagraphs =>
new string[] {
"Returns a list of currently connected servers." };
Contains a markdown document. This markdown document class supports original markdown,...
static string Encode(string s)
Encodes all special characters in a string so that it can be included in a markdown document without ...
DateTime LastConnect
When endpoint last connected.
string CurrentConnectionTime
Average connection time, as a string.
DateTime LastDisconnect
When endpoint last disconnected.
bool Connected
If the endpoint is connected
long TotalConnectionCount
Total number of connections made by endpoint.
string Name
Name of Endpoint
int ActiveConnectionCount
Current number of active connections
string AvgConnectionTime
Average connection time, as a string.
Mainstains information about connectivity from a specific s2s endpoint.
bool? ServerCertificateValid
If remote server certificate is valid.
bool? TrustServer
If remote domain should be trusted (even if certificate is not valid).
string LocalDomain
Local domain
XmppS2sState? State
Connection state
string RemoteDomain
Remote domain
An administrative command with no parameters.
Returns a list of currently connected servers.
Servers()
Returns a list of currently connected servers.
override string Name
Command name
override string[] HelpParagraphs
Markdown description of syntax.
override async Task Execute(ChatState State, string[] Arguments, string OrgMessage, ResponseCallbackHandler ResponseCallback)
Executes the command.
Service Module hosting the XMPP broker and its components.
delegate Task< string > ResponseCallbackHandler(string Markdown, string MessageId)
Delegate for response callback handler methods.