diff options
-rw-r--r-- | server.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -275,13 +275,13 @@ func handleSystemMessage(mxid string, msg string) { case "search": account := findAccount(mxid, cmd[1]) if account != nil { - rep, err := account.Conn.SearchForUsers(cmd[2]) + rep, err := account.Conn.SearchForUsers(strings.Join(cmd[2:], " ")) if err != nil { ezbrSystemSendf(mxid, "Search error: %s", err) } else { ezbrSystemSendf(mxid, "%d users found", len(rep)) - for i, user := range rep { - ezbrSystemSendf(mxid, "- %s (%s)", i+1, user.DisplayName, user.ID) + for _, user := range rep { + ezbrSystemSendf(mxid, "- %s (%s)", user.DisplayName, user.ID) } } } else { |