System messages now longer require an empty sender

This commit is contained in:
khlieng 2015-01-31 23:59:53 +01:00
parent 5f43b3e78e
commit 3f335187c0
3 changed files with 3 additions and 7 deletions

View File

@ -28,7 +28,6 @@ socket.on('pm', function(data) {
socket.on('join', function(data) { socket.on('join', function(data) {
messageActions.add({ messageActions.add({
server: data.server, server: data.server,
from: '',
to: data.channels[0], to: data.channels[0],
message: data.user + ' joined the channel', message: data.user + ' joined the channel',
type: 'info' type: 'info'
@ -38,7 +37,6 @@ socket.on('join', function(data) {
socket.on('part', function(data) { socket.on('part', function(data) {
messageActions.add({ messageActions.add({
server: data.server, server: data.server,
from: '',
to: data.channels[0], to: data.channels[0],
message: data.user + ' left the channel', message: data.user + ' left the channel',
type: 'info' type: 'info'
@ -46,7 +44,7 @@ socket.on('part', function(data) {
}); });
socket.on('quit', 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) { socket.on('nick', function(data) {
@ -57,7 +55,6 @@ socket.on('motd', function(data) {
_.each(data.content.split('\n'), function(line) { _.each(data.content.split('\n'), function(line) {
messageActions.add({ messageActions.add({
server: data.server, server: data.server,
from: '',
to: data.server, to: data.server,
message: line message: line
}); });

View File

@ -13,7 +13,7 @@ var nick = 'test' + Math.floor(Math.random() * 99999);
socket.on('connect', function() { socket.on('connect', function() {
socket.send('uuid', uuid); 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'); serverActions.connect('irc.quakenet.org', nick, 'username');
channelActions.join(['#stuff'], 'irc.freenode.net'); channelActions.join(['#stuff'], 'irc.freenode.net');

View File

@ -37,7 +37,7 @@ var messageStore = Reflux.createStore({
add: function(message) { add: function(message) {
var dest = message.to || message.from; var dest = message.to || message.from;
if (message.from.indexOf('.') !== -1) { if (message.from && message.from.indexOf('.') !== -1) {
dest = message.server; dest = message.server;
} }
@ -51,7 +51,6 @@ var messageStore = Reflux.createStore({
_.each(channelStore.getChannels(server), function(channel, channelName) { _.each(channelStore.getChannels(server), function(channel, channelName) {
addMessage({ addMessage({
server: server, server: server,
from: '',
to: channelName, to: channelName,
message: message, message: message,
type: 'info', type: 'info',