Special user in squad information
This commit is contained in:
parent
63051eb9b9
commit
8d186b1dba
@ -76,9 +76,13 @@ func (s *Squader) SquadInfo(update *tgbotapi.Update, playerRaw *dbmapping.Player
|
||||
if squadMembers[i].UserRole == "commander" {
|
||||
message += " \\[К]"
|
||||
}
|
||||
message += " " + squadMembers[i].Profile.Nickname + " "
|
||||
if squadMembers[i].Profile.TelegramNickname != "" {
|
||||
message += "(@" + c.Users.FormatUsername(squadMembers[i].Profile.TelegramNickname) + ")"
|
||||
if squadMembers[i].Player.Status == "special" {
|
||||
message += " _суперюзер_"
|
||||
} else {
|
||||
message += " " + squadMembers[i].Profile.Nickname + " "
|
||||
if squadMembers[i].Profile.TelegramNickname != "" {
|
||||
message += "(@" + c.Users.FormatUsername(squadMembers[i].Profile.TelegramNickname) + ")"
|
||||
}
|
||||
}
|
||||
message += " ⚔" + strconv.Itoa(squadMembers[i].Profile.Power)
|
||||
message += "\n"
|
||||
|
@ -347,7 +347,7 @@ func (s *Squader) AddUserToSquad(update *tgbotapi.Update, adderRaw *dbmapping.Pl
|
||||
return s.squadUserAdditionFailure(update)
|
||||
}
|
||||
|
||||
if playerRaw.Status != "special" {
|
||||
if c.Users.PlayerBetterThan(&playerRaw, "admin") {
|
||||
_, ok = c.Users.GetProfile(playerRaw.ID)
|
||||
if !ok {
|
||||
return s.squadUserAdditionFailure(update)
|
||||
|
Reference in New Issue
Block a user