~taiite/senpai

9bd580fc29a0af1cdcb094605396d6b531be5ed5 — Galen Abell 2 months ago 8123af1
Show error when searching if unsupported

It's confusing to search for something and have no results show if the
server doesn't support the soju.im/search capability.
1 files changed, 3 insertions(+), 0 deletions(-)

M commands.go
M commands.go => commands.go +3 -0
@@ 597,6 597,9 @@ func commandDoSearch(app *App, args []string) (err error) {
	if s == nil {
		return errOffline
	}
	if !s.HasCapability("soju.im/search") {
		return errors.New("server does not support searching")
	}
	s.Search(channel, text)
	return nil
}