summaryrefslogtreecommitdiff
path: root/static/js
diff options
context:
space:
mode:
authordumpfmprod <dumpfmprod@ubuntu.(none)>2010-01-31 19:24:15 -0500
committerdumpfmprod <dumpfmprod@ubuntu.(none)>2010-01-31 19:24:15 -0500
commit02a283dd0071d090fd712c92ca88c5f3af2908a3 (patch)
treead1fc154be0814cc5c501e518deea127f6216fc8 /static/js
parent25ae76ebea27c341830060d9dd4ba14fc6e069ce (diff)
Added registration codes
Diffstat (limited to 'static/js')
-rwxr-xr-xstatic/js/register.js12
1 files changed, 10 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 = "/";
};