diff --git a/config.json b/config.json index cae4dc3..6a6290e 100644 --- a/config.json +++ b/config.json @@ -18,6 +18,12 @@ "comment": "Follows is the old bot", + "WelcomeMsgs": [ + "Real men use screen, %s.", + "Joins upset the hivemind's OCD, %s.", + "Joins upset the hivemind's CDO, %s.", + ], + "bot": { "dbname": "deepintir", "inchan": "out", diff --git a/config/config.go b/config/config.go index bfce436..7fe3884 100644 --- a/config/config.go +++ b/config/config.go @@ -21,6 +21,7 @@ type Config struct { Admins []string UntappdToken string UntappdFreq int + WelcomeMsgs []string } // Readconfig loads the config data out of a JSON file located in cfile diff --git a/plugins/talker.go b/plugins/talker.go index 4fc96c7..d3ed9cb 100644 --- a/plugins/talker.go +++ b/plugins/talker.go @@ -55,11 +55,7 @@ func (p *TalkerPlugin) Help(channel string, parts []string) { // Empty event handler because this plugin does not do anything on event recv func (p *TalkerPlugin) Event(kind string, message bot.Message) bool { if kind == "JOIN" && message.User.Name != p.Bot.Config.Nick { - sayings := []string{ - "Real men use screen, %s.", - "Joins upset the hivemind's OCD, %s.", - "Joins upset the hivemind's CDO, %s.", - } + sayings := p.Bot.Config.WelcomeMsgs msg := fmt.Sprintf(sayings[rand.Intn(len(sayings))], message.User.Name) p.Bot.SendMessage(message.Channel, msg) return true