Add comments explaining behavior when echo-message is not available

This commit is contained in:
Val Lorentz 2023-05-30 22:09:23 +02:00
parent eb509f7100
commit 4255c1cdec
3 changed files with 6 additions and 0 deletions

View file

@ -32,6 +32,8 @@ const input: PluginInputHandler = function ({irc}, chan, cmd, args) {
irc.action(chan.name, text);
// If the IRCd does not support echo-message, simulate the message
// being sent back to us.
if (!irc.network.cap.isEnabled("echo-message")) {
irc.emit("action", {
nick: irc.user.nick,

View file

@ -93,6 +93,8 @@ const input: PluginInputHandler = function (network, chan, cmd, args) {
network.irc.say(targetName, msg);
// If the IRCd does not support echo-message, simulate the message
// being sent back to us.
if (!network.irc.network.cap.isEnabled("echo-message")) {
const parsedTarget = network.irc.network.extractTargetGroup(targetName);
let targetGroup;

View file

@ -12,6 +12,8 @@ const input: PluginInputHandler = function (network, chan, cmd, args) {
network.irc.notice(targetName, message);
// If the IRCd does not support echo-message, simulate the message
// being sent back to us.
if (!network.irc.network.cap.isEnabled("echo-message")) {
let targetGroup;
const parsedTarget = network.irc.network.extractTargetGroup(targetName);