~emersion/soju-dev

Dismiss TAGMSGs directed to BouncerServ v1 APPLIED

Hubert Hirtz: 3
 Dismiss TAGMSGs directed to BouncerServ
 Send back TAGMSGs to self
 Correctly send back PRIVMSGs and NOTICEs to self

 3 files changed, 20 insertions(+), 1 deletions(-)
The whole patch series LGTM. Pushed, thanks!
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~emersion/soju-dev/patches/25608/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH 1/3] Dismiss TAGMSGs directed to BouncerServ Export this patch

---
 downstream.go | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/downstream.go b/downstream.go
index 697b661..c4f779f 100644
--- a/downstream.go
+++ b/downstream.go
@@ -2048,6 +2048,10 @@ func (dc *downstreamConn) handleMessageRegistered(msg *irc.Message) error {
		tags := copyClientTags(msg.Tags)

		for _, name := range strings.Split(targetsStr, ",") {
			if casemapASCII(name) == serviceNickCM {
				continue
			}

			uc, upstreamName, err := dc.unmarshalEntity(name)
			if err != nil {
				return err
-- 
2.33.0

[PATCH 2/3] Send back TAGMSGs to self Export this patch

---
 downstream.go | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/downstream.go b/downstream.go
index c4f779f..11c614a 100644
--- a/downstream.go
+++ b/downstream.go
@@ -2048,6 +2048,16 @@ func (dc *downstreamConn) handleMessageRegistered(msg *irc.Message) error {
		tags := copyClientTags(msg.Tags)

		for _, name := range strings.Split(targetsStr, ",") {
			if dc.network == nil && casemapASCII(name) == dc.nickCM {
				dc.SendMessage(&irc.Message{
					Tags:    msg.Tags.Copy(),
					Prefix:  dc.prefix(),
					Command: "TAGMSG",
					Params:  []string{name},
				})
				continue
			}

			if casemapASCII(name) == serviceNickCM {
				continue
			}
-- 
2.33.0

[PATCH 3/3] Correctly send back PRIVMSGs and NOTICEs to self Export this patch

---
 downstream.go | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/downstream.go b/downstream.go
index 11c614a..2b2fdb2 100644
--- a/downstream.go
+++ b/downstream.go
@@ -1984,7 +1984,12 @@ func (dc *downstreamConn) handleMessageRegistered(msg *irc.Message) error {
			}

			if dc.network == nil && casemapASCII(name) == dc.nickCM {
				dc.SendMessage(msg)
				dc.SendMessage(&irc.Message{
					Tags:    msg.Tags.Copy(),
					Prefix:  dc.prefix(),
					Command: msg.Command,
					Params:  []string{name, text},
				})
				continue
			}

-- 
2.33.0
The whole patch series LGTM. Pushed, thanks!