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); 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);