Fix messages not sending as NOTICEs
Anirudh Oppiliappan x@icyphox.sh
Tue, 28 Dec 2021 21:02:56 +0530
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
main.go
→
main.go
@@ -27,15 +27,15 @@ if errors.Is(err, plugins.IsNotice) {
err = nil cmd = "NOTICE" } - msg := irc.Message{Command: cmd} + target := m.Params[0] - if serr, ok := err.(*plugins.IsPrivateNotice); ok { target = serr.To cmd = "NOTICE" err = nil } + msg := irc.Message{Command: cmd} split := strings.Split(response, "\n") if errors.Is(err, plugins.IsRaw) {