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