diff options
| -rwxr-xr-x | static/js/register.js | 12 | ||||
| -rwxr-xr-x | static/register.html | 5 |
2 files changed, 15 insertions, 2 deletions
diff --git a/static/js/register.js b/static/js/register.js index d8f9b6a..a2954e5 100755 --- a/static/js/register.js +++ b/static/js/register.js @@ -4,12 +4,19 @@ function validateNick(n) { } } +// HOPE NO HACKERS ARE READING THIS :o +var ValidCodes = ['WAXWANYE23', + 'HOTDUMPING5000']; + function submitRegistration() { var nick = $('#nickInput').val(); var email = $('#emailInput').val(); var password = $('#passwordInput').val() || ""; - var hash = hex_sha1(nick + '$' + password + '$dumpfm'); - + var code = $('#codeInput').val(); + if ($.inArray(code.toUpperCase(), ValidCodes) == -1) { + alert("Bad registration code! Better ask someone cool for one." ); + return; + } if (nick.length < 3) { alert("Nicks must be at least 3 characters long."); return; @@ -18,6 +25,7 @@ function submitRegistration() { return; } + var hash = hex_sha1(nick + '$' + password + '$dumpfm'); var onSuccess = function() { location.href = "/"; }; diff --git a/static/register.html b/static/register.html index 3cddffa..b398b6f 100755 --- a/static/register.html +++ b/static/register.html @@ -224,6 +224,11 @@ body { <h1><span>email</span> <input type="text" class="feild"id="emailInput" /> </h1> + + <h1><span>registration code</span> + <input type="text" class="feild" id="codeInput" /> + </h1> + <h1> </h1> <h1> <br /> |
