Add uptime command
parent
a6142d48ef
commit
4883552ecc
|
@ -2,6 +2,7 @@ package main
|
|||
|
||||
import (
|
||||
"log"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
@ -497,6 +498,14 @@ func init() {
|
|||
SendChatMsg(c, "Unbanned "+param)
|
||||
})
|
||||
|
||||
RegisterChatCommand("uptime",
|
||||
"Prints the uptime of the proxy. Usage: uptime",
|
||||
nil,
|
||||
true,
|
||||
func(c *Conn, param string) {
|
||||
SendChatMsg(c, "Uptime: "+strconv.FormatFloat(Uptime(), 'f', -1, 64)+"s")
|
||||
})
|
||||
|
||||
RegisterOnRedirectDone(func(c *Conn, newsrv string, success bool) {
|
||||
if success {
|
||||
err := SetStorageKey("server:"+c.Username(), newsrv)
|
||||
|
|
Loading…
Reference in New Issue