diff --git a/client/src/js/actions/message.js b/client/src/js/actions/message.js index 802eb4d7..27293a02 100644 --- a/client/src/js/actions/message.js +++ b/client/src/js/actions/message.js @@ -28,7 +28,6 @@ socket.on('pm', function(data) { socket.on('join', function(data) { messageActions.add({ server: data.server, - from: '', to: data.channels[0], message: data.user + ' joined the channel', type: 'info' @@ -38,7 +37,6 @@ socket.on('join', function(data) { socket.on('part', function(data) { messageActions.add({ server: data.server, - from: '', to: data.channels[0], message: data.user + ' left the channel', type: 'info' @@ -46,7 +44,7 @@ socket.on('part', function(data) { }); socket.on('quit', function(data) { - messageActions.broadcast(data.user + ' has quit', data.server); + messageActions.broadcast(data.user + ' quit', data.server); }); socket.on('nick', function(data) { @@ -57,7 +55,6 @@ socket.on('motd', function(data) { _.each(data.content.split('\n'), function(line) { messageActions.add({ server: data.server, - from: '', to: data.server, message: line }); diff --git a/client/src/js/app.js b/client/src/js/app.js index c380b6ca..d7fe7fe4 100644 --- a/client/src/js/app.js +++ b/client/src/js/app.js @@ -13,7 +13,7 @@ var nick = 'test' + Math.floor(Math.random() * 99999); socket.on('connect', function() { socket.send('uuid', uuid); - serverActions.connect('irc.freenode.net', nick, 'username'); + serverActions.connect('irc.freenode.net', nick, 'username', true); serverActions.connect('irc.quakenet.org', nick, 'username'); channelActions.join(['#stuff'], 'irc.freenode.net'); diff --git a/client/src/js/stores/message.js b/client/src/js/stores/message.js index 8bb0bcd4..f0aa65f9 100644 --- a/client/src/js/stores/message.js +++ b/client/src/js/stores/message.js @@ -37,7 +37,7 @@ var messageStore = Reflux.createStore({ add: function(message) { var dest = message.to || message.from; - if (message.from.indexOf('.') !== -1) { + if (message.from && message.from.indexOf('.') !== -1) { dest = message.server; } @@ -51,7 +51,6 @@ var messageStore = Reflux.createStore({ _.each(channelStore.getChannels(server), function(channel, channelName) { addMessage({ server: server, - from: '', to: channelName, message: message, type: 'info',