Skip to content

Commit

Permalink
Merge pull request #1736 from slingamn/uban_kill
Browse files Browse the repository at this point in the history
fix UBAN ADD of masks (k-lines) not killing clients
  • Loading branch information
slingamn authored Jul 4, 2021
2 parents c53df2d + dbfa704 commit 5e5c86a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion irc/uban.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 5e5c86a

Please sign in to comment.