mirror of
https://git.sr.ht/~emersion/gamja
synced 2025-04-23 12:33:45 -04:00
Display server messages in server buffer
References: https://todo.sr.ht/~emersion/gamja/21
This commit is contained in:
parent
718929f0d2
commit
194168c062
2 changed files with 9 additions and 1 deletions
|
@ -583,7 +583,11 @@ export default class App extends Component {
|
|||
case "PRIVMSG":
|
||||
var target = msg.params[0];
|
||||
if (target == client.nick) {
|
||||
target = msg.prefix.name;
|
||||
if (msg.prefix.name == client.serverPrefix.name) {
|
||||
target = SERVER_BUFFER;
|
||||
} else {
|
||||
target = msg.prefix.name;
|
||||
}
|
||||
}
|
||||
this.addMessage(netID, target, msg);
|
||||
break;
|
||||
|
|
|
@ -24,6 +24,7 @@ export default class Client extends EventTarget {
|
|||
};
|
||||
|
||||
status = Client.Status.DISCONNECTED;
|
||||
serverPrefix = null;
|
||||
nick = null;
|
||||
availableCaps = {};
|
||||
enabledCaps = {};
|
||||
|
@ -75,6 +76,8 @@ export default class Client extends EventTarget {
|
|||
|
||||
this.ws = null;
|
||||
this.setStatus(Client.Status.DISCONNECTED);
|
||||
this.nick = null;
|
||||
this.serverPrefix = null;
|
||||
this.availableCaps = {};
|
||||
this.enabledCaps = {};
|
||||
this.batches = new Map();
|
||||
|
@ -153,6 +156,7 @@ export default class Client extends EventTarget {
|
|||
|
||||
console.log("Registration complete");
|
||||
this.setStatus(Client.Status.REGISTERED);
|
||||
this.serverPrefix = msg.prefix;
|
||||
break;
|
||||
case "CAP":
|
||||
this.handleCap(msg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue