aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Kavlie <akavlie@gmail.com>2011-11-30 23:07:17 -0700
committerAaron Kavlie <akavlie@gmail.com>2011-11-30 23:07:17 -0700
commit15638273c79d86d7de21ed4eb853462e8436be39 (patch)
tree352a9e5bdbd4baa28c3eaaa6ba618c0e99b2133d
parent6a52a67b9daed43c8e89db0134e14d2d4910ef64 (diff)
downloadreevo-webirc-15638273c79d86d7de21ed4eb853462e8436be39.tar.gz
reevo-webirc-15638273c79d86d7de21ed4eb853462e8436be39.zip
Add shebang for execution of server.js & bin to package.json
-rw-r--r--package.json3
-rw-r--r--public/app.js1
-rwxr-xr-x[-rw-r--r--]server.js6
3 files changed, 8 insertions, 2 deletions
diff --git a/package.json b/package.json
index 51c10d5..06e4447 100644
--- a/package.json
+++ b/package.json
@@ -8,6 +8,9 @@
8 "irc": "0.3.x", 8 "irc": "0.3.x",
9 "socket.io": "0.8.x" 9 "socket.io": "0.8.x"
10 }, 10 },
11 "bin": {
12 "web-irc": "./server.js"
13 },
11 "devDependencies": { 14 "devDependencies": {
12 }, 15 },
13 "engine": "node >= 0.4.x" 16 "engine": "node >= 0.4.x"
diff --git a/public/app.js b/public/app.js
index 701ef90..25322d3 100644
--- a/public/app.js
+++ b/public/app.js
@@ -552,6 +552,7 @@ $(function() {
552 // Nick change event 552 // Nick change event
553 socket.on('nick', function(data) { 553 socket.on('nick', function(data) {
554 // Update my info, if it's me 554 // Update my info, if it's me
555 console.log('Nick change', data);
555 if (data.oldNick == irc.me.get('nick')) { 556 if (data.oldNick == irc.me.get('nick')) {
556 irc.me.set({nick: data.newNick}); 557 irc.me.set({nick: data.newNick});
557 } 558 }
diff --git a/server.js b/server.js
index 21aa2ca..228c244 100644..100755
--- a/server.js
+++ b/server.js
@@ -1,3 +1,5 @@
1#!/usr/bin/env node
2
1var express = require('express'), 3var express = require('express'),
2 app = express.createServer(), 4 app = express.createServer(),
3 io = require('socket.io').listen(app), 5 io = require('socket.io').listen(app),
@@ -20,7 +22,7 @@ app.get('/', function(req, res, next) {
20 next(); 22 next();
21}); 23});
22 24
23console.log('Express server started on port %s', app.address().port); 25console.log('web-irc started on port %s', app.address().port);
24 26
25 27
26// Socket.IO 28// Socket.IO
@@ -73,4 +75,4 @@ io.sockets.on('connection', function(socket) {
73 for (var event in events) { activateListener(event, events[event]); } 75 for (var event in events) { activateListener(event, events[event]); }
74 console.log('Starting IRC client; wiring up socket events.') 76 console.log('Starting IRC client; wiring up socket events.')
75 }); 77 });
76}); \ No newline at end of file 78});