mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-22 10:42:52 +01:00
add a logline and a help description for CRASHSERVER
This commit is contained in:
parent
41813cc15a
commit
490b3722bd
@ -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
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user