forked from CringeStudios/gamja
Fix whitespace issues
This commit is contained in:
parent
bc45fce557
commit
bf30038b41
@ -426,7 +426,7 @@ export default class App extends Component {
|
|||||||
|
|
||||||
this.setReceipt(bufName, ReceiptType.DELIVERED, msg);
|
this.setReceipt(bufName, ReceiptType.DELIVERED, msg);
|
||||||
|
|
||||||
this.setBufferState({ network: netID, name: bufName}, (buf) => {
|
this.setBufferState({ network: netID, name: bufName }, (buf) => {
|
||||||
// TODO: set unread if scrolled up
|
// TODO: set unread if scrolled up
|
||||||
var unread = buf.unread;
|
var unread = buf.unread;
|
||||||
var lastReadReceipt = buf.lastReadReceipt;
|
var lastReadReceipt = buf.lastReadReceipt;
|
||||||
@ -516,7 +516,7 @@ export default class App extends Component {
|
|||||||
name: msg.params[1],
|
name: msg.params[1],
|
||||||
version: msg.params[2],
|
version: msg.params[2],
|
||||||
};
|
};
|
||||||
this.setBufferState({ network: netID, name: SERVER_BUFFER}, { serverInfo });
|
this.setBufferState({ network: netID, name: SERVER_BUFFER }, { serverInfo });
|
||||||
break;
|
break;
|
||||||
case irc.RPL_ISUPPORT:
|
case irc.RPL_ISUPPORT:
|
||||||
var tokens = msg.params.slice(1, -1);
|
var tokens = msg.params.slice(1, -1);
|
||||||
@ -529,13 +529,13 @@ export default class App extends Component {
|
|||||||
case irc.RPL_NOTOPIC:
|
case irc.RPL_NOTOPIC:
|
||||||
var channel = msg.params[1];
|
var channel = msg.params[1];
|
||||||
|
|
||||||
this.setBufferState({ network: netID, name: channel}, { topic: null });
|
this.setBufferState({ network: netID, name: channel }, { topic: null });
|
||||||
break;
|
break;
|
||||||
case irc.RPL_TOPIC:
|
case irc.RPL_TOPIC:
|
||||||
var channel = msg.params[1];
|
var channel = msg.params[1];
|
||||||
var topic = msg.params[2];
|
var topic = msg.params[2];
|
||||||
|
|
||||||
this.setBufferState({ network: netID, name: channel}, { topic });
|
this.setBufferState({ network: netID, name: channel }, { topic });
|
||||||
break;
|
break;
|
||||||
case irc.RPL_TOPICWHOTIME:
|
case irc.RPL_TOPICWHOTIME:
|
||||||
// Ignore
|
// Ignore
|
||||||
@ -544,7 +544,7 @@ export default class App extends Component {
|
|||||||
var channel = msg.params[2];
|
var channel = msg.params[2];
|
||||||
var membersList = msg.params[3].split(" ");
|
var membersList = msg.params[3].split(" ");
|
||||||
|
|
||||||
this.setBufferState({ network: netID, name: channel}, (buf) => {
|
this.setBufferState({ network: netID, name: channel }, (buf) => {
|
||||||
var members = new Map(buf.members);
|
var members = new Map(buf.members);
|
||||||
membersList.forEach((s) => {
|
membersList.forEach((s) => {
|
||||||
var member = irc.parseMembership(s);
|
var member = irc.parseMembership(s);
|
||||||
@ -567,13 +567,13 @@ export default class App extends Component {
|
|||||||
realname: last.slice(last.indexOf(" ") + 1),
|
realname: last.slice(last.indexOf(" ") + 1),
|
||||||
};
|
};
|
||||||
|
|
||||||
this.setBufferState({ network: netID, name: who.nick}, { who, offline: false });
|
this.setBufferState({ network: netID, name: who.nick }, { who, offline: false });
|
||||||
break;
|
break;
|
||||||
case irc.RPL_ENDOFWHO:
|
case irc.RPL_ENDOFWHO:
|
||||||
var target = msg.params[1];
|
var target = msg.params[1];
|
||||||
if (!this.isChannel(target) && target.indexOf("*") < 0) {
|
if (!this.isChannel(target) && target.indexOf("*") < 0) {
|
||||||
// Not a channel nor a mask, likely a nick
|
// Not a channel nor a mask, likely a nick
|
||||||
this.setBufferState({ network: netID, name: target}, (buf) => {
|
this.setBufferState({ network: netID, name: target }, (buf) => {
|
||||||
// TODO: mark user offline if we have old WHO info but this
|
// TODO: mark user offline if we have old WHO info but this
|
||||||
// WHO reply is empty
|
// WHO reply is empty
|
||||||
if (buf.who) {
|
if (buf.who) {
|
||||||
@ -599,7 +599,7 @@ export default class App extends Component {
|
|||||||
var channel = msg.params[0];
|
var channel = msg.params[0];
|
||||||
|
|
||||||
this.createBuffer(netID, channel);
|
this.createBuffer(netID, channel);
|
||||||
this.setBufferState({ network: netID, name: channel}, (buf) => {
|
this.setBufferState({ network: netID, name: channel }, (buf) => {
|
||||||
var members = new Map(buf.members);
|
var members = new Map(buf.members);
|
||||||
members.set(msg.prefix.name, null);
|
members.set(msg.prefix.name, null);
|
||||||
return { members };
|
return { members };
|
||||||
@ -626,7 +626,7 @@ export default class App extends Component {
|
|||||||
case "PART":
|
case "PART":
|
||||||
var channel = msg.params[0];
|
var channel = msg.params[0];
|
||||||
|
|
||||||
this.setBufferState({ network: netID, name: channel}, (buf) => {
|
this.setBufferState({ network: netID, name: channel }, (buf) => {
|
||||||
var members = new Map(buf.members);
|
var members = new Map(buf.members);
|
||||||
members.delete(msg.prefix.name);
|
members.delete(msg.prefix.name);
|
||||||
return { members };
|
return { members };
|
||||||
@ -680,13 +680,13 @@ export default class App extends Component {
|
|||||||
var channel = msg.params[0];
|
var channel = msg.params[0];
|
||||||
var topic = msg.params[1];
|
var topic = msg.params[1];
|
||||||
|
|
||||||
this.setBufferState({ network: netID, name: channel}, { topic });
|
this.setBufferState({ network: netID, name: channel }, { topic });
|
||||||
this.addMessage(netID, channel, msg);
|
this.addMessage(netID, channel, msg);
|
||||||
break;
|
break;
|
||||||
case "AWAY":
|
case "AWAY":
|
||||||
var awayMessage = msg.params[0];
|
var awayMessage = msg.params[0];
|
||||||
|
|
||||||
this.setBufferState({ network: netID, name: msg.prefix.name}, (buf) => {
|
this.setBufferState({ network: netID, name: msg.prefix.name }, (buf) => {
|
||||||
var who = { ...buf.who, away: !!awayMessage };
|
var who = { ...buf.who, away: !!awayMessage };
|
||||||
return { who };
|
return { who };
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user