mirror of https://github.com/fluffle/goirc
Merge branch 'yt' of https://github.com/iopred/goirc into yt
Conflicts: client/dispatch.go
This commit is contained in:
commit
b01ec2cc08
|
@ -224,6 +224,9 @@ func (conn *Conn) dispatch(line *Line) {
|
||||||
conn.handlers.dispatch(conn, line)
|
conn.handlers.dispatch(conn, line)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (conn *Conn) command(line *Line) Handler {
|
func (conn *Conn) command(line *Line) {
|
||||||
return conn.commands.match(line.Message())
|
command := conn.commands.match(line.Message())
|
||||||
|
if command != nil {
|
||||||
|
go command.Handle(conn, line)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,9 +111,5 @@ func (conn *Conn) h_PRIVMSG(line *Line) {
|
||||||
line = line.Copy()
|
line = line.Copy()
|
||||||
line.Args[1] = text
|
line.Args[1] = text
|
||||||
}
|
}
|
||||||
cmd := conn.command(line)
|
conn.command(line)
|
||||||
if cmd == nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
cmd.Handle(conn, line)
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue