equal
deleted
inserted
replaced
4 |
4 |
5 package main |
5 package main |
6 |
6 |
7 import ( |
7 import ( |
8 "cjyar/xmpp" |
8 "cjyar/xmpp" |
|
9 "crypto/tls" |
9 "flag" |
10 "flag" |
10 "fmt" |
11 "fmt" |
11 "log" |
12 "log" |
12 "log/syslog" |
13 "log/syslog" |
13 "os" |
14 "os" |
16 // Demonstrate the API, and allow the user to interact with an XMPP |
17 // Demonstrate the API, and allow the user to interact with an XMPP |
17 // server via the terminal. |
18 // server via the terminal. |
18 func main() { |
19 func main() { |
19 xmpp.Log = log.New(os.Stderr, "", 0) |
20 xmpp.Log = log.New(os.Stderr, "", 0) |
20 xmpp.Loglevel = syslog.LOG_NOTICE |
21 xmpp.Loglevel = syslog.LOG_NOTICE |
|
22 |
|
23 xmpp.TLSConfig = &tls.Config{InsecureSkipVerify: true} |
21 |
24 |
22 var jid xmpp.JID |
25 var jid xmpp.JID |
23 flag.Var(&jid, "jid", "JID to log in as") |
26 flag.Var(&jid, "jid", "JID to log in as") |
24 var pw *string = flag.String("pw", "", "password") |
27 var pw *string = flag.String("pw", "", "password") |
25 flag.Parse() |
28 flag.Parse() |