diff --git a/Makefile b/Makefile index 4924d7c..bb65274 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ export GOPATH default: build -build: test genversion genbuilddate +build: genversion genbuilddate test go build -v flokatirc build-win: test genversion diff --git a/README.md b/README.md index eda34fb..9c880f1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ ## flokatirc + *an incredibly friendly, silver-tongued, and elegantly proportioned IRC community bot* #### LICENSE @@ -7,5 +8,5 @@ See `LICENSE` file. #### QUICK INSTALL -`# go build flokatirc` +`# make build` diff --git a/main.go b/main.go index 8a299fe..0d56717 100644 --- a/main.go +++ b/main.go @@ -24,6 +24,7 @@ import ( modsc "flokatirc/modules/sc" modstoll "flokatirc/modules/stoll" modtwitch "flokatirc/modules/twitch" + modweather "flokatirc/modules/weather" ) var ( @@ -77,6 +78,9 @@ func main() { if strings.Contains(*modules, "twitch") { go modtwitch.Init(sayCh) } + if strings.Contains(*modules, "weather") { + go modweather.Init(sayCh) + } go func() { for { @@ -130,7 +134,8 @@ func ConnectHandler(s ircx.Sender, m *irc.Message) { }) } time.Sleep(5 * time.Second) - sayCh <- fmt.Sprintf("%s\n\x01ACTION running on %s", "*", SoftwareInfo()) + //sayCh <- fmt.Sprintf("%s\n\001ACTION running on %s", "*", SoftwareInfo()) + sayCh <- fmt.Sprintf("%s\n%s", "*", SoftwareInfo()) } func PingHandler(s ircx.Sender, m *irc.Message) { @@ -150,6 +155,7 @@ func PrivmsgHandler(s ircx.Sender, m *irc.Message) { modstoll.HandleMessage(m) modsaytime.HandleMessage(m) modtwitch.HandleMessage(m) + modweather.HandleMessage(m) } func HandleMessage(m *irc.Message) { @@ -159,7 +165,8 @@ func HandleMessage(m *irc.Message) { } switch tok[0] { case "!version": - sayCh <- fmt.Sprintf("%s\n\x01ACTION running on %s", "*", SoftwareInfo()) + //sayCh <- fmt.Sprintf("%s\n\001ACTION running on %s", "*", SoftwareInfo()) + sayCh <- fmt.Sprintf("%s\n%s", "*", SoftwareInfo()) default: } } diff --git a/modules/weather/weather.go b/modules/weather/weather.go index a53bd41..ebf5366 100644 --- a/modules/weather/weather.go +++ b/modules/weather/weather.go @@ -80,7 +80,7 @@ func HandleMessage(m *irc.Message) { return } switch tok[0] { - case "!w": + case "!weather", "!wetter": switch len(tok) { case 1: sayCh <- fmt.Sprintf("*\n%s", weatherPrefix+"Usage: !w ")