about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBenny Morrison <benmorrison@ttm.sh>2019-03-16 01:21:21 -0400
committerBenny Morrison <benmorrison@ttm.sh>2019-03-16 01:21:21 -0400
commit08824a2040e1c9728e9d5e2c598745894e9884f7 (patch)
tree95e9d0f38fd33b5ee9d692c2cb73d6899cb5eb82
parent5ce5470199300e14549177fc90b9f48bb184b312 (diff)
downloadgoofbot-08824a2040e1c9728e9d5e2c598745894e9884f7.tar.gz
moved initial channel to a variable
-rw-r--r--main.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.go b/main.go
index 2668b85..4510c68 100644
--- a/main.go
+++ b/main.go
@@ -14,6 +14,8 @@ import (
 func main() {
 	// OWNER NICK
 	owner := "ahriman"
+	// INITIAL CHANNEL
+	nchannel := "#goofbot"
 	// CLIENT CONFIG
 	client := girc.New(girc.Config{
 		Server: "irc.tilde.chat",
@@ -28,7 +30,7 @@ func main() {
 	// specify the channel to join on startup
 	// for multiple channels: ("#goofbot", "#goofbot2", "#goofbot3")
 	client.Handlers.Add(girc.CONNECTED, func(c *girc.Client, e girc.Event) {
-		c.Cmd.Join("#goofbot")
+		c.Cmd.Join(nchannel)
 	})
 
 	// basic command-response handler