3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 18:52:41 +01:00

add a logline and a help description for CRASHSERVER

This commit is contained in:
Shivaram Lingamneni 2020-02-21 13:07:22 -05:00
parent 41813cc15a
commit 490b3722bd
2 changed files with 4 additions and 2 deletions

View File

@ -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)) rb.Notice(fmt.Sprintf(client.t("To crash the server, issue the following command: /DEBUG CRASHSERVER %s"), code))
return false return false
} }
server.logger.Error("server", fmt.Sprintf("DEBUG CRASHSERVER executed by operator %s", client.Oper().Name))
go func() { go func() {
// intentional nil dereference on a new goroutine, bypassing recover-from-errors // intentional nil dereference on a new goroutine, bypassing recover-from-errors
var i, j *int var i, j *int

View File

@ -153,13 +153,14 @@ https://gist.github.com/DanielOaks/c104ad6e8759c01eb5c826d627caf80d`,
oper: true, oper: true,
text: `DEBUG <option> 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. * GCSTATS: Garbage control statistics.
* NUMGOROUTINE: Number of goroutines in use. * NUMGOROUTINE: Number of goroutines in use.
* STARTCPUPROFILE: Starts the CPU profiler. * STARTCPUPROFILE: Starts the CPU profiler.
* STOPCPUPROFILE: Stops 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": { "dline": {
oper: true, oper: true,