3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-15 00:19:29 +01:00

Merge pull request #1736 from slingamn/uban_kill

fix UBAN ADD of masks (k-lines) not killing clients
This commit is contained in:
Shivaram Lingamneni 2021-07-04 19:37:53 -04:00 committed by GitHub
commit 5e5c86ad86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -255,9 +255,10 @@ func ubanAddNickmask(client *Client, target ubanTarget, duration time.Duration,
var killed []string
var alwaysOn []string
for _, mcl := range client.server.clients.AllClients() {
if mcl != client && target.matcher.MatchString(client.NickMaskCasefolded()) {
if mcl != client && target.matcher.MatchString(mcl.NickMaskCasefolded()) {
if !mcl.AlwaysOn() {
killed = append(killed, mcl.Nick())
mcl.Quit("You have been banned from this server", nil)
mcl.destroy(nil)
} else {
alwaysOn = append(alwaysOn, mcl.Nick())