5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-22 16:20:26 +00:00

Check nickname on kick (irc). Closes #488

This commit is contained in:
Wim 2018-08-27 21:20:41 +02:00
parent ab4d51b40b
commit d7c3570ba3

View File

@ -306,7 +306,7 @@ func (b *Birc) handleJoinPart(client *girc.Client, event girc.Event) {
return return
} }
channel := strings.ToLower(event.Params[0]) channel := strings.ToLower(event.Params[0])
if event.Command == "KICK" { if event.Command == "KICK" && event.Params[1] == b.Nick {
b.Log.Infof("Got kicked from %s by %s", channel, event.Source.Name) b.Log.Infof("Got kicked from %s by %s", channel, event.Source.Name)
time.Sleep(time.Duration(b.GetInt("RejoinDelay")) * time.Second) time.Sleep(time.Duration(b.GetInt("RejoinDelay")) * time.Second)
b.Remote <- config.Message{Username: "system", Text: "rejoin", Channel: channel, Account: b.Account, Event: config.EVENT_REJOIN_CHANNELS} b.Remote <- config.Message{Username: "system", Text: "rejoin", Channel: channel, Account: b.Account, Event: config.EVENT_REJOIN_CHANNELS}