Conflicts:
	client/dispatch.go
This commit is contained in:
Chris Rhodes 2013-02-17 18:47:26 -08:00
commit b01ec2cc08
2 changed files with 6 additions and 7 deletions

View File

@ -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)
}
} }

View File

@ -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)
} }