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AYGMPCVKB7573IB5ZBKNXVBTB6ICCPF55WNQC
fn do(cmd []string, mut conn net.TcpConn) {
match cmd[0] {
'irc' {
ihost := if cmd.len > 1 { cmd[1] } else { 'none' }
println('match irc $ihost')
irc_add(ihost, mut conn)
fn parse(words []string) map[string]string {
mut params := map[string]string{}
for word in words {
parts := word.split(':')
if parts.len > 1 {
params[parts[0]] = parts[1]
} else {
println('use key:value instead of $word')
'status' {
println('match status')
status(mut conn)
}
else {
println('match else: ${cmd[0]}')
do_verb(cmd[0], mut conn)
}
}
fn status(mut conn net.TcpConn) {
addr := conn.peer_addr() or { panic(err) }
do_verb('status', mut conn)
println('--- $addr')
fn do_verb(verb string, mut conn net.TcpConn) {
mut params := map[string]string{}
cmd := build_cmd(verb, params)
fn do(cmd rpc.Command, mut conn net.TcpConn) string {