From 4fc48b5aa46d3f89a5f57c4ccea75c74aca6f97a Mon Sep 17 00:00:00 2001 From: Wim Date: Thu, 26 Oct 2017 22:07:57 +0200 Subject: Fix panic on empty params --- bridge/irc/irc.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bridge/irc') diff --git a/bridge/irc/irc.go b/bridge/irc/irc.go index 205e4ce4..e3191a93 100644 --- a/bridge/irc/irc.go +++ b/bridge/irc/irc.go @@ -234,6 +234,10 @@ func (b *Birc) handleNewConnection(client *girc.Client, event girc.Event) { } func (b *Birc) handleJoinPart(client *girc.Client, event girc.Event) { + if len(event.Params) == 0 { + flog.Debugf("handleJoinPart: empty Params? %#v", event) + return + } channel := event.Params[0] if event.Command == "KICK" { flog.Infof("Got kicked from %s by %s", channel, event.Source.Name) -- cgit v1.2.3