Skip to content

Commit

Permalink
dont skip [online] banning
Browse files Browse the repository at this point in the history
  • Loading branch information
Distortions81 committed Dec 16, 2024
1 parent 157d561 commit 1ebbc86
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions banlist/banList.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,21 @@ func CheckBanList(name string, doWarn bool) bool {
defer BanListLock.Unlock()

for _, ban := range BanList {
if doWarn && strings.EqualFold(ban.UserName, pname) {
if strings.EqualFold(ban.UserName, pname) {
warn := "Warning: [FCL] ban found for '" + pname + "': " + ban.Reason

if fact.PlayerLevelGet(ban.UserName, true) < 2 {
if cfg.Global.Options.FCLWarnOnly {
fact.CMS(cfg.Local.Channel.ChatChannel, warn)
if doWarn {
fact.CMS(cfg.Local.Channel.ChatChannel, warn)
}
} else {
fact.WriteBan(pname, "[FCL] "+ban.Reason)
}
} else if cfg.Global.Options.FCLWarnRegulars {
fact.CMS(cfg.Local.Channel.ChatChannel, warn)
if doWarn {
fact.CMS(cfg.Local.Channel.ChatChannel, warn)
}
}

return true
Expand Down

0 comments on commit 1ebbc86

Please sign in to comment.