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)
|
||||
}
|
||||
|
||||
func (conn *Conn) command(line *Line) Handler {
|
||||
return conn.commands.match(line.Message())
|
||||
func (conn *Conn) command(line *Line) {
|
||||
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.Args[1] = text
|
||||
}
|
||||
cmd := conn.command(line)
|
||||
if cmd == nil {
|
||||
return
|
||||
}
|
||||
cmd.Handle(conn, line)
|
||||
conn.command(line)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue