From 3736ed42adf67dfa6fd28eb19901aad15ba0b5c8 Mon Sep 17 00:00:00 2001 From: Ben Morrison Date: Fri, 3 Apr 2020 03:19:03 -0400 Subject: go back to 0x200b and splitting the username for !users output --- main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 15374f1..5b0e241 100644 --- a/main.go +++ b/main.go @@ -17,7 +17,7 @@ import ( ) // ZW is a zero-width character -const ZW = string(0x2060) +const ZW = string(0x200b) // Conf holds all the config info type Conf struct { @@ -165,11 +165,11 @@ func main() { var out bytes.Buffer for i := 1; i < len(split); i++ { - if split[i] == "" { + if split[i] == "" || len(split[i]) < 2 { continue } - c := fmt.Sprintf("%s%s", ZW, split[i]) + c := fmt.Sprintf("%s%s%s", split[i][:1], ZW, split[i][1:]) out.WriteString(c + " ") } -- cgit 1.4.1-2-gfad0