From 4255c1cdecdca68b8ffa41b13a9f7d342e5ae73e Mon Sep 17 00:00:00 2001 From: Val Lorentz Date: Tue, 30 May 2023 22:09:23 +0200 Subject: [PATCH] Add comments explaining behavior when echo-message is not available --- server/plugins/inputs/action.ts | 2 ++ server/plugins/inputs/msg.ts | 2 ++ server/plugins/inputs/notice.ts | 2 ++ 3 files changed, 6 insertions(+) diff --git a/server/plugins/inputs/action.ts b/server/plugins/inputs/action.ts index a85bc28d..2b7bf65d 100644 --- a/server/plugins/inputs/action.ts +++ b/server/plugins/inputs/action.ts @@ -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, diff --git a/server/plugins/inputs/msg.ts b/server/plugins/inputs/msg.ts index 8aba0767..aa384009 100644 --- a/server/plugins/inputs/msg.ts +++ b/server/plugins/inputs/msg.ts @@ -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; diff --git a/server/plugins/inputs/notice.ts b/server/plugins/inputs/notice.ts index 5275833f..bec8934f 100644 --- a/server/plugins/inputs/notice.ts +++ b/server/plugins/inputs/notice.ts @@ -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);