ping command

This commit is contained in:
MeexReay 2025-02-10 18:23:51 +03:00
parent fac7c10e53
commit ea396bab51
2 changed files with 4 additions and 1 deletions

View File

@ -56,6 +56,7 @@ max_messages: 100 # chat messages limit
-f, --disable-formatting Disable message formatting and sanitizing
-c, --disable-commands Disable slash commands
-i, --disable-ip-hiding Disable ip hiding
-v, --enable-users-ip-viewing Enable users IP viewing
-h, --help Print help
-V, --version Print version
```
@ -65,6 +66,7 @@ max_messages: 100 # chat messages limit
`/help` - show help message \
`/clear` - clear chat \
`/spam *args` - spam with text
`/ping` - get server ping (send + read)
## see also

View File

@ -57,9 +57,10 @@ fn on_command(ctx: Arc<Context>, command: &str) -> Result<(), Box<dyn Error>> {
send_message(ctx.clone(), &format!("\r\x1B[1A{}{}", args.join(" "), " ".repeat(10)).repeat(ctx.max_messages))?;
} else if command == "help" {
write!(stdout(), "Help message:\r
/help - show help message\r
/clear - clear console\r
/spam *args - spam console with text\r
/help - show help message\r
/ping - check server ping\r
\r
Press enter to close")?;
stdout().flush()?;