System messages now longer require an empty sender
This commit is contained in:
parent
5f43b3e78e
commit
3f335187c0
@ -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
|
||||
});
|
||||
|
@ -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');
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user