From 79ce309b9ec09a76506db28e8f1eb9a942bd2429 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 6 Nov 2013 19:03:30 +0100 Subject: webchat: renamed name to origin --- webchat/hello_web.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'webchat') diff --git a/webchat/hello_web.js b/webchat/hello_web.js index 6f658901..45f6fc56 100644 --- a/webchat/hello_web.js +++ b/webchat/hello_web.js @@ -49,8 +49,8 @@ var echo = sockjs.createServer(); echo.on('connection', function(conn) { var origin = '['+conn.remoteAddress+':'+conn.remotePort+']'; Clients.push(conn); - irc_client.say("#krebs", name + ' has joined'); Clients.broadcast({from: 'system', message: origin + ' has joined'}) + irc_client.say("#krebs", origin + ' has joined'); conn.write(JSON.stringify({from: 'system', message: 'hello'})) conn.on('data', function(data) { console.log('data:',data); @@ -73,8 +73,8 @@ echo.on('connection', function(conn) { }); conn.on('close', function() { Clients.splice(Clients.indexOf(conn)); - irc_client.say("#krebs", name + ' has quit'); Clients.broadcast({from: 'system', message: origin + ' has quit'}) + irc_client.say("#krebs", origin + ' has quit'); }); }); -- cgit v1.2.3