mirror of
https://codeberg.org/emersion/gamja
synced 2025-03-12 23:43:42 +01:00
components/app: don't open buffer for CTCP messages
These are usually completely uninteresting messages, e.g. CTCP VERSION or whatever.
This commit is contained in:
parent
e2dc32c0d3
commit
89647472ae
@ -750,8 +750,19 @@ export default class App extends Component {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (msg.command === "NOTICE" && !State.getBuffer(this.state, { server: serverID, name: target })) {
|
||||
// Don't open a new buffer if this is just a NOTICE
|
||||
|
||||
// Don't open a new buffer if this is just a NOTICE or a garbage
|
||||
// CTCP message
|
||||
let openNewBuffer = true;
|
||||
if (msg.command !== "PRIVMSG") {
|
||||
openNewBuffer = false;
|
||||
} else {
|
||||
let ctcp = irc.parseCTCP(msg);
|
||||
if (ctcp && ctcp.command !== "ACTION") {
|
||||
openNewBuffer = false;
|
||||
}
|
||||
}
|
||||
if (!openNewBuffer && !State.getBuffer(this.state, { server: serverID, name: target })) {
|
||||
target = SERVER_BUFFER;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user