Compare commits
No commits in common. "3d877ea1848e7f8456076599647cd49a6985d54f" and "d82c633ee5111ba3b7c10e334390882bf91890e8" have entirely different histories.
3d877ea184
...
d82c633ee5
|
@ -21,8 +21,12 @@ ssh welcome@tilde.town
|
|||
|
||||
You'll fill in details like your desired username and SSH public key.
|
||||
|
||||
If you're brand new to SSH or have never heard of it that is okay!
|
||||
|
||||
This page has information on what SSH is and how to use it, including how to create an ssh key pair which you'll need to access your town account: https://tilde.town/wiki/getting-started/ssh.html
|
||||
|
||||
If you run into confusion or problems creating a key pair on your computer, this page can generate one for you: https://tilde.town/keymachine . However you'll still need to save the generated key files to your computer in order to use them.
|
||||
|
||||
If you end up stuck, e-mail root@tilde.town with any questions.
|
||||
|
||||
See you on the server,
|
||||
|
|
|
@ -321,7 +321,6 @@ func _main(l *log.Logger, db *sql.DB) error {
|
|||
}
|
||||
fmt.Fprintln(msgScroll, player.Say(msg))
|
||||
fmt.Fprintln(sm.Current.Input, msg)
|
||||
msgScroll.ScrollToEnd()
|
||||
}
|
||||
|
||||
defer func() {
|
||||
|
|
|
@ -74,7 +74,7 @@ func (m *ExternalMailer) Send(address, subject, body string) error {
|
|||
return fmt.Errorf("auth failed for smtp: %w", err)
|
||||
}
|
||||
|
||||
if err = c.Mail(from); err != nil {
|
||||
if err = c.Mail("root@tilde.town"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ func (m *ExternalMailer) Send(address, subject, body string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
_, err = w.Write([]byte(message))
|
||||
_, err = w.Write([]byte(body))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package invites
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"database/sql"
|
||||
"encoding/base64"
|
||||
"errors"
|
||||
"math/big"
|
||||
"math/rand"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
|
@ -54,6 +53,7 @@ func ConnectDB() (*sql.DB, error) {
|
|||
}
|
||||
|
||||
func generateCode(email string) string {
|
||||
rand.Seed(time.Now().Unix())
|
||||
|
||||
charset := "abcdefghijklmnopqrztuvwxyz"
|
||||
charset += strings.ToUpper(charset)
|
||||
|
@ -62,14 +62,8 @@ func generateCode(email string) string {
|
|||
|
||||
code := []byte{}
|
||||
|
||||
max := big.NewInt(int64(len(charset)))
|
||||
for len(code) < codeLen {
|
||||
ix, err := rand.Int(rand.Reader, max)
|
||||
if err != nil {
|
||||
// TODO this is bad but I'm just kind of hoping it doesn't happen...often
|
||||
panic(err)
|
||||
}
|
||||
code = append(code, charset[ix.Int64()])
|
||||
code = append(code, charset[rand.Intn(len(charset))])
|
||||
}
|
||||
|
||||
code = append(code, ' ')
|
||||
|
|
Loading…
Reference in New Issue