2012-10-12 09:41:45 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/cxindex/xmpp"
|
|
|
|
"io/ioutil"
|
|
|
|
"os"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2013-01-29 19:55:12 +00:00
|
|
|
Conn, err := xmpp.Dial("xmpp.ru:5222", "hypnotoad", "xmpp.ru", "password", "gsend", nil)
|
2012-10-12 09:41:45 +00:00
|
|
|
if err != nil {
|
|
|
|
println(err)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
if s, err := ioutil.ReadAll(os.Stdin); err == nil {
|
|
|
|
Conn.Send("hypnotoad@xmpp.ru", "chat", string(s[:len(s)-1]))
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|