summaryrefslogtreecommitdiff
path: root/static/js
diff options
context:
space:
mode:
authorScott Ostler <sostler@deathmachine.local>2010-03-18 08:10:24 -0400
committerScott Ostler <sostler@deathmachine.local>2010-03-18 08:10:24 -0400
commit4d8f5ca132753e5401fd839c8bc32a828557923c (patch)
tree8ab26136d19662a3329d54ed470660ecba229106 /static/js
parent859df13e5ba9dcc693952ece60eb1d16b5388201 (diff)
parentd4fbf9c656495167afeffee49e5f3fe58b41564f (diff)
Merge branch 'master' of ssh://dump.fm/home/dumpfmprod/prod
Diffstat (limited to 'static/js')
-rwxr-xr-xstatic/js/pichat.js10
-rwxr-xr-xstatic/js/register.js2
2 files changed, 10 insertions, 2 deletions
diff --git a/static/js/pichat.js b/static/js/pichat.js
index 5784dcf..4c91a35 100755
--- a/static/js/pichat.js
+++ b/static/js/pichat.js
@@ -196,12 +196,20 @@ function updateUI(msgs, users) {
if (users !== null) {
var flattened = flattenUserJson(users);
if (!('userlist' in cache) || flattened != cache.userlist) {
- $("#userList").html($.map(users, buildUserDiv).join(''));
+ $("#userList").html($.map(users.sort(sortUsersByAlpha), buildUserDiv).join(''));
}
cache.userlist = flattened
}
}
+function sortUsersByAlpha(a, b){
+ var nickA = a.nick.toLowerCase()
+ var nickB = b.nick.toLowerCase()
+ if (nickA > nickB) return 1
+ else if (nickA < nickB) return -1
+ return 0
+}
+
function isDuplicateMessage(m) {
if (m.nick == Nick && m.content in PendingMessages) {
delete PendingMessages[m.content];
diff --git a/static/js/register.js b/static/js/register.js
index af7529b..d479aab 100755
--- a/static/js/register.js
+++ b/static/js/register.js
@@ -6,7 +6,7 @@ function validateNick(n) {
// HOPE NO HACKERS ARE READING THIS :o
var ValidCodes = ['WAXWANYE23',
- 'HOTDUMPING5000','RHIZOME',];
+ 'HOTDUMPING5000','RHIZOME','VIP666','HEATNAP',];
function submitRegistration() {
var nick = $('#nickInput').val();