hdkv
/
i2_bot
Archived
1
Fork 0

Add debug on ProtectChat sequence

master
Vladimir Hodakov 2018-04-07 17:22:00 +04:00
parent 24e619a446
commit f306c259b1
1 changed files with 14 additions and 0 deletions

View File

@ -33,7 +33,19 @@ func (ct *Chatter) userPrivilegesCheck(update *tgbotapi.Update, user *tgbotapi.U
}
}
switch update.Message.Chat.ID {
case academyChatID:
c.Log.Debug("Checking user rights in academy chat...")
case bastionChatID:
c.Log.Debug("Checking user rights in bastion chat...")
case gamesChatID:
c.Log.Debug("Checking user rights in games chat...")
case hqChatID:
c.Log.Debug("Checking user rights in headquarters chat...")
}
if update.Message.Chat.ID == gamesChatID && strings.Contains(user.UserName, "bot") {
c.Log.Debug("Game bot with username @" + update.Message.From.UserName + " passed filtration")
return true
}
@ -62,6 +74,8 @@ func (ct *Chatter) userPrivilegesCheck(update *tgbotapi.Update, user *tgbotapi.U
}
}
c.Log.Debug("User failed to prove identity. Ban sequence arrived.")
return false
}