mirror of
https://codeberg.org/emersion/gamja
synced 2025-03-12 23:43:42 +01:00
Switch to server buffer on server name click
Closes: https://todo.sr.ht/~emersion/gamja/68
This commit is contained in:
parent
d2e41666ad
commit
dd8eca1cfe
@ -757,8 +757,9 @@ export default class App extends Component {
|
||||
}
|
||||
|
||||
var client = this.clients.get(serverID);
|
||||
|
||||
if (client.isChannel(target)) {
|
||||
if (client.isServer(target)) {
|
||||
this.switchBuffer({ server: serverID });
|
||||
} else if (client.isChannel(target)) {
|
||||
this.switchToChannel = target;
|
||||
client.send({ command: "JOIN", params: [target] });
|
||||
} else {
|
||||
|
@ -471,6 +471,10 @@ export default class Client extends EventTarget {
|
||||
this.whoisDB = new irc.CaseMapMap(this.whoisDB, this.cm);
|
||||
}
|
||||
|
||||
isServer(name) {
|
||||
return name === "*" || this.cm(name) === this.cm(this.serverPrefix.name);
|
||||
}
|
||||
|
||||
isMyNick(nick) {
|
||||
return this.cm(nick) == this.cm(this.nick);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user