diff --git a/lib/squader/responders.go b/lib/squader/responders.go index 5f6a702..05f8c0f 100644 --- a/lib/squader/responders.go +++ b/lib/squader/responders.go @@ -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" diff --git a/lib/squader/squader.go b/lib/squader/squader.go index 5025a79..aa13b39 100644 --- a/lib/squader/squader.go +++ b/lib/squader/squader.go @@ -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)