diff --git a/src/NadekoBot/Modules/Xp/Club.cs b/src/NadekoBot/Modules/Xp/Club.cs index e62b458a..d6b5df5c 100644 --- a/src/NadekoBot/Modules/Xp/Club.cs +++ b/src/NadekoBot/Modules/Xp/Club.cs @@ -117,12 +117,12 @@ namespace NadekoBot.Modules.Xp .AddField("Owner", club.Owner.ToString(), true) .AddField("Level Req.", club.MinimumLevelReq.ToString(), true) .AddField("Members", string.Join("\n", club.Users + .OrderByDescending(x => x.IsClubAdmin || club.OwnerId == x.Id) .Skip(page * 10) .Take(10) - .OrderByDescending(x => x.IsClubAdmin) .Select(x => { - if (x.IsClubAdmin) + if (x.IsClubAdmin || club.OwnerId == x.Id) return x.ToString() + "⭐"; return x.ToString(); })), false); diff --git a/src/NadekoBot/Modules/Xp/Services/ClubService.cs b/src/NadekoBot/Modules/Xp/Services/ClubService.cs index 362067eb..4c61d7ab 100644 --- a/src/NadekoBot/Modules/Xp/Services/ClubService.cs +++ b/src/NadekoBot/Modules/Xp/Services/ClubService.cs @@ -113,7 +113,7 @@ namespace NadekoBot.Modules.Xp.Services using (var uow = _db.UnitOfWork) { - club = uow.Clubs.GetByName(name.Trim().ToLowerInvariant(), discrim); + club = uow.Clubs.GetByName(name, discrim); if (club == null) return false; else diff --git a/src/NadekoBot/Services/Database/Repositories/Impl/ClubRepository.cs b/src/NadekoBot/Services/Database/Repositories/Impl/ClubRepository.cs index 7eabbb1c..0977e3bf 100644 --- a/src/NadekoBot/Services/Database/Repositories/Impl/ClubRepository.cs +++ b/src/NadekoBot/Services/Database/Repositories/Impl/ClubRepository.cs @@ -52,10 +52,11 @@ namespace NadekoBot.Services.Database.Repositories.Impl { if (func == null) return _set + .Where(x => x.Name == name && x.Discrim == discrim) + .Include(x => x.Users) .Include(x => x.Bans) .Include(x => x.Applicants) - .Include(x => x.Users) - .FirstOrDefault(x => x.Name.ToLowerInvariant() == name && x.Discrim == discrim); + .FirstOrDefault(); return func(_set).FirstOrDefault(x => x.Name == name && x.Discrim == discrim); } @@ -72,7 +73,8 @@ namespace NadekoBot.Services.Database.Repositories.Impl public ClubInfo GetByMember(ulong userId, Func, IQueryable> func = null) { if (func == null) - return _set.Include(x => x.Users) + return _set + .Include(x => x.Users) .Include(x => x.Bans) .Include(x => x.Applicants) .FirstOrDefault(x => x.Users.Any(y => y.UserId == userId));