forked from jshiffer/go-xmpp
commit
73e63850ab
@ -1,8 +1,8 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/mattn/go-xmpp"
|
|
||||||
"github.com/mattn/go-gtk/gtk"
|
"github.com/mattn/go-gtk/gtk"
|
||||||
|
"github.com/mattn/go-xmpp"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
@ -67,7 +67,7 @@ func main() {
|
|||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
talk, err := xmpp.NewClient("talk.google.com:443", username_, password_)
|
talk, err := xmpp.NewClient("talk.google.com:443", username_, password_, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
@ -2,8 +2,8 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"fmt"
|
|
||||||
"flag"
|
"flag"
|
||||||
|
"fmt"
|
||||||
"github.com/mattn/go-xmpp"
|
"github.com/mattn/go-xmpp"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
@ -14,6 +14,7 @@ var server = flag.String("server", "talk.google.com:443", "server")
|
|||||||
var username = flag.String("username", "", "username")
|
var username = flag.String("username", "", "username")
|
||||||
var password = flag.String("password", "", "password")
|
var password = flag.String("password", "", "password")
|
||||||
var notls = flag.Bool("notls", false, "No TLS")
|
var notls = flag.Bool("notls", false, "No TLS")
|
||||||
|
var debug = flag.Bool("debug", false, "debug output")
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
flag.Usage = func() {
|
flag.Usage = func() {
|
||||||
@ -29,9 +30,9 @@ func main() {
|
|||||||
var talk *xmpp.Client
|
var talk *xmpp.Client
|
||||||
var err error
|
var err error
|
||||||
if *notls {
|
if *notls {
|
||||||
talk, err = xmpp.NewClientNoTLS(*server, *username, *password)
|
talk, err = xmpp.NewClientNoTLS(*server, *username, *password, *debug)
|
||||||
} else {
|
} else {
|
||||||
talk, err = xmpp.NewClient(*server, *username, *password)
|
talk, err = xmpp.NewClient(*server, *username, *password, *debug)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user