about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBenny Morrison <benmorrison@ttm.sh>2019-03-17 02:46:46 -0400
committerBenny Morrison <benmorrison@ttm.sh>2019-03-17 02:46:46 -0400
commitc5e451b2c0ac58d80aab1dd073bd2c66c6a25bcb (patch)
tree5dd95ba1e9f213d90eb0481ec665a515010906ad
parentd0c2d7582f6c6e4a1c0f8688de6585b765f932b9 (diff)
downloadgoofbot-c5e451b2c0ac58d80aab1dd073bd2c66c6a25bcb.tar.gz
eliminated unnecessary string manipulation
-rw-r--r--main.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/main.go b/main.go
index 3381dc4..d0ce58f 100644
--- a/main.go
+++ b/main.go
@@ -59,10 +59,7 @@ func main() {
 	client.Handlers.Add(girc.CONNECTED, func(c *girc.Client, e girc.Event) {
 		//authenticate with nickserv if pass is set in config file
 		if conf.Pass != "" {
-			var payload bytes.Buffer
-			payload.WriteString("identify ")
-			payload.WriteString(conf.Pass)
-			c.Cmd.Message("nickserv", payload.String())
+			c.Cmd.Message("nickserv", "identify "+conf.Pass)
 			time.Sleep(500 * time.Millisecond)
 		}
 		//join initial channel specified in config.json