Add comments explaining behavior when echo-message is not available

This commit is contained in:
Reto Brunner 2023-06-24 14:32:33 +02:00
commit 43a2b397a2
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); 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")) { if (!irc.network.cap.isEnabled("echo-message")) {
irc.emit("action", { irc.emit("action", {
nick: irc.user.nick, nick: irc.user.nick,

View file

@ -93,6 +93,8 @@ const input: PluginInputHandler = function (network, chan, cmd, args) {
network.irc.say(targetName, msg); 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")) { if (!network.irc.network.cap.isEnabled("echo-message")) {
const parsedTarget = network.irc.network.extractTargetGroup(targetName); const parsedTarget = network.irc.network.extractTargetGroup(targetName);
let targetGroup; let targetGroup;

View file

@ -12,6 +12,8 @@ const input: PluginInputHandler = function (network, chan, cmd, args) {
network.irc.notice(targetName, message); 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")) { if (!network.irc.network.cap.isEnabled("echo-message")) {
let targetGroup; let targetGroup;
const parsedTarget = network.irc.network.extractTargetGroup(targetName); const parsedTarget = network.irc.network.extractTargetGroup(targetName);