GSDBVUTOZWOIOFUVNH7V6IAKTOGPMZVKP42NP3VD73MPFJQR3Q7AC
4DHN3FJ7YPSEPXXU2LCTLKGCAKH6RLGLTYFN2P6XTZJDPR5SFJMAC
H7PPEYC35JOQ2NSSEYVPTFWZBNO5WXRWG5X3XR3JGX5R2BBU5WWAC
import os
cmd := if os.args.len > 1 { os.args[1] } else { "status" }
a := conn.peer_addr() or { panic(err) } println(a) irc_add(conn)
a := conn.peer_addr() or { panic(err) }
println(a)
irc_add(conn)
do(cmd, conn)
println('after')
}}fn do(cmd string, conn &net.TcpConn) { match cmd { 'irc' { println("match irc") irc_add(conn) } 'status' { println("match status") status(conn) } else { println("match else: $cmd") status(conn) }
}
fn do(cmd string, conn &net.TcpConn) {
match cmd {
'irc' { println("match irc") irc_add(conn) }
'status' { println("match status") status(conn) }
else { println("match else: $cmd") status(conn) }
return net.dial_tcp(host)
conn := net.dial_tcp(host) ? conn.peer_addr() return conn}fn status(conn net.TcpConn) { addr := conn.peer_addr() or {panic(err) } println("--- $addr")
conn := net.dial_tcp(host) ?
conn.peer_addr()
return conn
fn status(conn net.TcpConn) {
addr := conn.peer_addr() or {panic(err) }
println("--- $addr")
params['host'] = "irc.freenode.net:6667"
params['host'] = 'irc.freenode.net:6667'
conn.write(json.encode(cmd).bytes())
jstr := json.encode(cmd) println(jstr) conn.write(jstr.bytes())
jstr := json.encode(cmd)
println(jstr)
conn.write(jstr.bytes())