made separate binaries; added -top to reddit

This commit is contained in:
sm
2016-05-08 09:52:45 -07:00
parent 473f9212b9
commit 4055810f22
3 changed files with 41 additions and 44 deletions
+16 -1
View File
@@ -1,6 +1,7 @@
package bybot
package main
import (
"flag"
"fmt"
"log"
"math/rand"
@@ -10,6 +11,20 @@ import (
irc "github.com/fluffle/goirc/client"
)
var host *string = flag.String("host", "localhost:6668", "irc server hostname")
var channel *string = flag.String("channel", "#exmormon", "irc channel")
func main() {
rand.Seed(time.Now().UnixNano())
flag.Parse()
log.SetFlags(log.Ldate | log.Ltime | log.Lshortfile)
done := make(chan bool)
Register(*host, *channel, done)
<-done
}
const name = "BYbot"
type BY struct {