From 8cfd22c9168584c80fa82ae6fb5873770e0dbadd Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Thu, 10 Feb 2022 00:22:18 +0100 Subject: [PATCH] [core] Fix: Raid viewercount should be numeric, not string Signed-off-by: Knut Ahlers --- irc.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/irc.go b/irc.go index e5fa6fe..2fc0fb9 100644 --- a/irc.go +++ b/irc.go @@ -392,11 +392,12 @@ func (i ircHandler) handleTwitchUsernotice(m *irc.Message) { go handleMessage(i.c, m, eventTypeGiftPaidUpgrade, evtData) case "raid": + vc, _ := strconv.ParseInt(string(m.Tags["msg-param-viewerCount"]), 10, 64) evtData := plugins.FieldCollectionFromData(map[string]interface{}{ "channel": i.getChannel(m), // Compatibility to plugins.DeriveChannel "from": m.Tags["login"], "user": m.Tags["login"], // Compatibility to plugins.DeriveUser - "viewercount": m.Tags["msg-param-viewerCount"], + "viewercount": vc, }) log.WithFields(log.Fields(evtData.Data())).Info("Incoming raid")