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