Trying to work out why dummy won't connect

This commit is contained in:
MichaelOultram 2015-08-12 20:31:12 +01:00
parent d9527a4093
commit c6c58c4d11
2 changed files with 14 additions and 10 deletions

View file

@ -249,7 +249,7 @@ func main() {
if testcode {
Verbose("Testing is enabled")
Test(password, address, port)
Test(password, address, port, accesstokens)
}
web = NewWebServer(9563)

View file

@ -10,15 +10,17 @@ type TestSettings struct {
password string
ip string
port string
accesstokens []string
}
var test TestSettings
func Test(password, ip, port string) {
func Test(password, ip, port, accesstokens string) {
test = TestSettings{
password: password,
ip: ip,
port: port,
accesstokens: strings.Split(accesstokens, " "),
}
test.testYoutubeSong()
}
@ -27,7 +29,9 @@ func (t TestSettings) createClient(uname string) *gumble.Client {
return gumble.NewClient(&gumble.Config{
Username: uname,
Password: t.password,
Address: t.ip + ":" + t.port})
Address: t.ip + ":" + t.port,
Tokens: t.accesstokens,
})
}
func (t TestSettings) testYoutubeSong() {