about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2020-04-03 03:19:03 -0400
committerBen Morrison <ben@gbmor.dev>2020-04-03 03:19:03 -0400
commit3736ed42adf67dfa6fd28eb19901aad15ba0b5c8 (patch)
treeb894635c4bc190c25267fe94cc8d9ba4d753fbef
parenta24fb84d519e77111e3bffe4b0128d9d21faa3c3 (diff)
downloadgoofbot-3736ed42adf67dfa6fd28eb19901aad15ba0b5c8.tar.gz
go back to 0x200b and splitting the username for !users output
-rw-r--r--main.go6
1 files 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 + " ")
 			}