mirror of
https://github.com/42wim/matterbridge.git
synced 2024-12-19 17:42:35 +01:00
Check nickname on kick (irc). Closes #488
This commit is contained in:
parent
ab4d51b40b
commit
d7c3570ba3
@ -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}
|
||||||
|
Loading…
Reference in New Issue
Block a user