mirror of https://github.com/fluffle/goirc
Clean up SimpleCommand, less casting.
This commit is contained in:
parent
6fc99107e6
commit
ab3ac231da
|
@ -197,7 +197,7 @@ func (conn *Conn) SimpleCommand(prefix string, handler Handler) Remover {
|
||||||
}
|
}
|
||||||
handler.Handle(conn, line)
|
handler.Handle(conn, line)
|
||||||
}
|
}
|
||||||
return conn.Command(fmt.Sprintf(SimpleCommandRegex, strings.ToLower(prefix)), HandlerFunc(stripHandler), math.MaxInt32)
|
return conn.CommandFunc(fmt.Sprintf(SimpleCommandRegex, strings.ToLower(prefix)), stripHandler, math.MaxInt32)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (conn *Conn) SimpleCommandFunc(prefix string, handlerFunc HandlerFunc) Remover {
|
func (conn *Conn) SimpleCommandFunc(prefix string, handlerFunc HandlerFunc) Remover {
|
||||||
|
|
Loading…
Reference in New Issue