From 8664125760bfdfad995ccb905221d60dd05b09be Mon Sep 17 00:00:00 2001 From: Sean Hinchee Date: Tue, 30 Jan 2018 07:34:42 +0000 Subject: [PATCH] improved g!man functionality and search formatting. (thanks lewellyn?) --- x/mux/man.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/x/mux/man.go b/x/mux/man.go index 587b7c19add3147748e43ea231443c05f5b7501c..e3d760ec7057a84b88baa9bc7b036baec8ff425a 100644 --- a/x/mux/man.go +++ b/x/mux/man.go @@ -15,6 +15,15 @@ import ( func (m *Mux) Man(ds *discordgo.Session, dm *discordgo.Message, ctx *Context) { resp := "\n" var err error + var desc []string = []string{ + "Section (1) for general publicly accessible commands.", + "Section (2) for library functions, including system calls.", + "Section (3) for kernel devices (accessed via bind (1)).", + "Section (4) for file services (accessed via mount ).", + "Section (5) for the Plan 9 file protocol.", + "Section (6) for file formats.", + "Section (7) for databases and database access programs.", + "Section (8) for things related to administering Plan 9."} page := "" section := "" @@ -56,7 +65,7 @@ func (m *Mux) Man(ds *discordgo.Session, dm *discordgo.Message, ctx *Context) { } else { if !any { any = true - resp += ".\n" + resp += desc[i-1] + "\n" } resp += string(url) + "\n" }