2
0
mirror of https://github.com/42wim/matterbridge synced 2024-11-17 03:26:07 +00:00

Fix panic on empty params

This commit is contained in:
Wim 2017-10-26 22:07:57 +02:00
parent 307ff77b42
commit 4fc48b5aa4

View File

@ -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)