-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.go
42 lines (32 loc) · 785 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package main
import (
"fmt"
"github.com/Leimy/icy-metago/bot"
"github.com/Leimy/icy-metago/shout"
"log"
"os"
"flag"
)
var irc = flag.String("server", "irc.radioxenu.com:6667", "<server>:<port>")
var room = flag.String("channel", "#radioxenu", "<#channelname>")
var streamurl = flag.String("stream", "http://radioxenu.com:8000/relay", "<http://url-to-get-metadata>")
func usage(pname string) {
fmt.Printf("%s irc.radioxenu.com:6667 http://radioxenu.com:8000/relay metabot #radioxenu\n", pname)
os.Exit(0)
}
// maybe use flags
func main() {
flag.Parse()
botChan := make(chan string)
for {
theBot, err := bot.NewBot(
*room,
"metabot",
*irc,
botChan)
if err != nil {
log.Panic(err)
}
shout.GetMeta(*streamurl, theBot, botChan)
}
}