Fix ctcp request message (#4603)

The message was ordered the wrong way in the TS rewrite.

Old:
    +bookworm sent a CTCP request: "chadler" to version
New:
    +bookworm sent a CTCP request: "version" to chadler
This commit is contained in:
Reto 2022-07-07 07:28:18 +02:00 committed by GitHub
parent d72d8694bb
commit c8cd4057bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,18 +16,17 @@ const input: PluginInputHandler = function ({irc}, chan, cmd, args) {
} }
const target = args.shift()!; const target = args.shift()!;
const type = args.shift()!;
chan.pushMessage( chan.pushMessage(
this, this,
new Msg({ new Msg({
type: MessageType.CTCP_REQUEST, type: MessageType.CTCP_REQUEST,
ctcpMessage: `"${target}" to ${args[0]}`, ctcpMessage: `"${type}" to ${target}`,
from: chan.getUser(irc.user.nick), from: chan.getUser(irc.user.nick),
}) })
); );
const type = args.shift()!;
irc.ctcpRequest(target, type, ...args); irc.ctcpRequest(target, type, ...args);
}; };