optimize ban checks

This commit is contained in:
Aine
2022-11-18 09:22:18 +02:00
parent 0f2683bcd0
commit 3ef6d2698e
5 changed files with 24 additions and 6 deletions

View File

@@ -21,6 +21,7 @@ type Bot struct {
allowedUsers []*regexp.Regexp
allowedAdmins []*regexp.Regexp
commands commandList
banlist bglist
rooms sync.Map
sendmail func(string, string, string) error
log *logger.Logger
@@ -102,6 +103,7 @@ func (b *Bot) Start(statusMsg string) error {
if err := b.syncRooms(); err != nil {
return err
}
b.syncBanlist()
b.initSync()
b.log.Info("Postmoogle has been started")