projects
/
KiwiIRC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de57896
)
Auto nick generation
author
Darren
<darren@darrenwhitlen.com>
Thu, 13 Oct 2011 22:37:27 +0000
(23:37 +0100)
committer
Darren
<darren@darrenwhitlen.com>
Thu, 13 Oct 2011 22:37:27 +0000
(23:37 +0100)
server/app.js
patch
|
blob
|
blame
|
history
diff --git
a/server/app.js
b/server/app.js
index cbaff4da2c8fcebb508974018bb97c011f27ecc1..a0bc999f0065888c2a32727749882a1fa3d3e667 100644
(file)
--- a/
server/app.js
+++ b/
server/app.js
@@
-645,6
+645,14
@@
this.httpHandler = function (request, response) {
nick = uri.query.nick || '';
}
+ // Set the default nick if one isn't provided
+ if (nick == '') {
+ nick = 'kiwi_?';
+ }
+
+ // Set any random numbers if needed
+ nick = nick.replace('?', Math.floor(Math.random()*100000).toString());
+
response.setHeader('X-Generated-By', 'KiwiIRC');
hash = crypto.createHash('md5').update(touchscreen ? 't' : 'f')
.update(debug ? 't' : 'f')