summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-10-26 22:07:57 +0200
committerWim <wim@42.be>2017-11-08 22:55:48 +0100
commit4fc48b5aa46d3f89a5f57c4ccea75c74aca6f97a (patch)
treec005993208c6be0fc448a0f3d58f7dbef4c46259
parent307ff77b4266949d4f0794b16b48a30110b25239 (diff)
downloadmatterbridge-msglm-4fc48b5aa46d3f89a5f57c4ccea75c74aca6f97a.tar.gz
matterbridge-msglm-4fc48b5aa46d3f89a5f57c4ccea75c74aca6f97a.tar.bz2
matterbridge-msglm-4fc48b5aa46d3f89a5f57c4ccea75c74aca6f97a.zip
Fix panic on empty params
-rw-r--r--bridge/irc/irc.go4
1 files changed, 4 insertions, 0 deletions
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)