English fixes, plus wayyy more usernames
Original pull request patch:
From 8b4041199901efc379b5ae1c994dfbd4c8dd1b90 Mon Sep 17 00:00:00 2001
From: cmyui <cmyuiosu@gmail.com>
Date: Fri, 16 Feb 2018 10:26:00 +0100
Subject: [PATCH] English fixes, plus wayyy more usernames
Bored
---
register.go | 242 ++++++++++++++++++++++++++++++++++++++--------------
1 file changed, 179 insertions(+), 63 deletions(-)
diff --git a/register.go b/register.go
index 282f892..c820189 100644
--- a/register.go
+++ b/register.go
@@ -58,7 +58,7 @@ func registerSubmit(c *gin.Context) {
// check email is valid
if !govalidator.IsEmail(c.PostForm("email")) {
- registerResp(c, errorMessage{T(c, "Please pass a valid email address.")})
+ registerResp(c, errorMessage{T(c, "Please enter a valid email address.")})
return
}
@@ -70,21 +70,21 @@ func registerSubmit(c *gin.Context) {
// usernames with both _ and spaces are not allowed
if strings.Contains(username, "_") && strings.Contains(username, " ") {
- registerResp(c, errorMessage{T(c, "An username can't contain both underscores and spaces.")})
+ registerResp(c, errorMessage{T(c, "A username can't contain both underscores and spaces.")})
return
}
// check whether username already exists
if db.QueryRow("SELECT 1 FROM users WHERE username_safe = ?", safeUsername(username)).
Scan(new(int)) != sql.ErrNoRows {
- registerResp(c, errorMessage{T(c, "An user with that username already exists!")})
+ registerResp(c, errorMessage{T(c, "A user with that username already exists!")})
return
}
// check whether an user with that email already exists
if db.QueryRow("SELECT 1 FROM users WHERE email = ?", c.PostForm("email")).
Scan(new(int)) != sql.ErrNoRows {
- registerResp(c, errorMessage{T(c, "An user with that email address already exists!")})
+ registerResp(c, errorMessage{T(c, "A user with that email address already exists!")})
return
}
@@ -129,7 +129,7 @@ func registerSubmit(c *gin.Context) {
rd.Incr("ripple:registered_users")
- addMessage(c, successMessage{T(c, "You have been successfully registered on Ripple! You now need to verify your account.")})
+ addMessage(c, successMessage{T(c, "You have successfully registered on Ripple! You now need to verify your account.")})
getSession(c).Save()
c.Redirect(302, "/register/verify?u="+strconv.Itoa(int(lid)))
}
@@ -266,62 +266,178 @@ func in(s string, ss []string) bool {
var usernameRegex = regexp.MustCompile(`^[A-Za-z0-9 _\[\]-]{2,15}$`)
var forbiddenUsernames = []string{
- "peppy",
- "rrtyui",
- "cookiezi",
- "azer",
- "loctav",
- "banchobot",
- "happystick",
- "doomsday",
- "sharingan33",
- "andrea",
- "cptnxn",
- "reimu-desu",
- "hvick225",
- "_index",
- "my aim sucks",
- "kynan",
- "rafis",
- "sayonara-bye",
- "thelewa",
- "wubwoofwolf",
- "millhioref",
- "tom94",
- "tillerino",
- "clsw",
- "spectator",
- "exgon",
- "axarious",
- "angelsim",
- "recia",
- "nara",
- "emperorpenguin83",
- "bikko",
- "xilver",
- "vettel",
- "kuu01",
- "_yu68",
- "tasuke912",
- "dusk",
- "ttobas",
- "velperk",
- "jakads",
- "jhlee0133",
- "abcdullah",
- "yuko-",
- "entozer",
- "hdhr",
- "ekoro",
- "snowwhite",
- "osuplayer111",
- "musty",
- "nero",
- "elysion",
- "ztrot",
- "koreapenguin",
- "fort",
- "asphyxia",
- "niko",
- "shigetora",
+ "rrtyui",
+ "cookiezi",
+ "azer",
+ "happystick",
+ "doomsday",
+ "sharingan33",
+ "andrea",
+ "cptnxn",
+ "reimu-desu",
+ "hvick225",
+ "_index",
+ "my aim sucks",
+ "kynan",
+ "rafis",
+ "sayonara-bye",
+ "thelewa",
+ "wubwoofwolf",
+ "millhioref",
+ "tom94",
+ "clsw",
+ "spectator",
+ "exgon",
+ "axarious",
+ "angelsim",
+ "recia",
+ "nara",
+ "emperorpenguin83",
+ "bikko",
+ "xilver",
+ "vettel",
+ "kuu01",
+ "_yu68",
+ "tasuke912",
+ "dusk",
+ "ttobas",
+ "velperk",
+ "jakads",
+ "jhlee0133",
+ "abcdullah",
+ "yuko-",
+ "entozer",
+ "hdhr",
+ "ekoro",
+ "snowwhite",
+ "osuplayer111",
+ "musty",
+ "nero",
+ "elysion",
+ "ztrot",
+ "koreapenguin",
+ "fort",
+ "asphyxia",
+ "niko",
+ "shigetora",
+ "kaoru",
+ "Smoothieworld",
+ "toy",
+ "[Toy]",
+ "ozzyozrock",
+ "fieryrage",
+ "gosy777",
+ "zyph",
+ "beasttrollmc",
+ "adamqs",
+ "karthy",
+ "fenrir",
+ "rohulk",
+ "_ryuk",
+ "spajder",
+ "fartownik",
+ "cxu",
+ "dunois",
+ "ner0",
+ "wiltchq",
+ "-gn",
+ "cinia pacifica",
+ "yaong",
+ "zeluaR",
+ "Dsan",
+ "dustice",
+ "rucker",
+ "firebat92",
+ "avenging_goose",
+ "idke",
+ "vaxei",
+ "seouless",
+ "spare",
+ "totoki",
+ "rustbell",
+ "emilia",
+ "reimu-desu",
+ "tiger claw",
+ "boggles",
+ "thepoon",
+ "the poon",
+ "loli_silica",
+ "bahamete",
+ "bikko",
+ "la valse",
+ "thelewa",
+ "firstus",
+ "ritzeh",
+ "kablaze",
+ "peppy",
+ "loctav",
+ "banchobot",
+ "millhioref",
+ "Ephemeral",
+ "flyte",
+ "nanaya",
+ "RBRat3",
+ "smoogipoooo",
+ "Tom94",
+ "yelle",
+ "ztrot",
+ "Zallius",
+ "deadbeat",
+ "shaRPLL",
+ "shaRPII",
+ "shARPIL",
+ "shARPLI",
+ "Blaizer",
+ "Damnae",
+ "Daru",
+ "Echo",
+ "fly a kite",
+ "marcin",
+ "mm201",
+ "nekodex",
+ "rbrat3",
+ "thevileone",
+ "alumentorz",
+ "fort",
+ "11t",
+ "captin1",
+ "kroytz",
+ "cRyo[iceeicee]",
+ "Akali",
+ "ProfessionalBox",
+ "Fantazy",
+ "Sing",
+ "toybot",
+ "Goldenwolf",
+ "handsome",
+ "Raikozen",
+ "Cherry Blossom",
+ "monstrata",
+ "Ascendence",
+ "doorfin",
+ "Barkingmaddog",
+ "Karen",
+ "crystal",
+ "vert",
+ "halfslashed",
+ "kloyd",
+ "djpop",
+ "cyclone",
+ "guy",
+ "sakura",
+ "spectator",
+ "pishifat",
+ "ktgster",
+ "skystar",
+ "o9kami",
+ "09kami",
+ "Nathan",
+ "ely",
+ "hollow wings",
+ "val0108",
+ "blue dragon",
+ "tillerino",
+ "Mikuia",
+ "ameo",
+ "tatsumaki",
}
--
2.20.1