mirror of
https://github.com/jeremyd/ergo.git
synced 2026-06-11 07:13:31 -07:00
add a logline and a help description for CRASHSERVER
This commit is contained in:
@@ -815,6 +815,7 @@ func debugHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Res
|
||||
rb.Notice(fmt.Sprintf(client.t("To crash the server, issue the following command: /DEBUG CRASHSERVER %s"), code))
|
||||
return false
|
||||
}
|
||||
server.logger.Error("server", fmt.Sprintf("DEBUG CRASHSERVER executed by operator %s", client.Oper().Name))
|
||||
go func() {
|
||||
// intentional nil dereference on a new goroutine, bypassing recover-from-errors
|
||||
var i, j *int
|
||||
|
||||
+3
-2
@@ -153,13 +153,14 @@ https://gist.github.com/DanielOaks/c104ad6e8759c01eb5c826d627caf80d`,
|
||||
oper: true,
|
||||
text: `DEBUG <option>
|
||||
|
||||
Prints debug information about the IRCd. <option> can be one of:
|
||||
Provides various debugging commands for the IRCd. <option> can be one of:
|
||||
|
||||
* GCSTATS: Garbage control statistics.
|
||||
* NUMGOROUTINE: Number of goroutines in use.
|
||||
* STARTCPUPROFILE: Starts the CPU profiler.
|
||||
* STOPCPUPROFILE: Stops the CPU profiler.
|
||||
* PROFILEHEAP: Writes out the CPU profiler info.`,
|
||||
* PROFILEHEAP: Writes a memory profile.
|
||||
* CRASHSERVER: Crashes the server (for use in failover testing)`,
|
||||
},
|
||||
"dline": {
|
||||
oper: true,
|
||||
|
||||
Reference in New Issue
Block a user