5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-12-24 17:15:40 +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)