rebranding changes
This commit is contained in:
@@ -52,7 +52,7 @@ public abstract class AuthControllerBase : Controller
|
|||||||
if (!authResult.Success && !authResult.TempBan)
|
if (!authResult.Success && !authResult.TempBan)
|
||||||
{
|
{
|
||||||
Logger.LogWarning("Authenticate:INVALID:{id}:{ident}", authResult?.Uid ?? "NOUID", charaIdent);
|
Logger.LogWarning("Authenticate:INVALID:{id}:{ident}", authResult?.Uid ?? "NOUID", charaIdent);
|
||||||
return Unauthorized("The provided secret key is invalid. Verify your Mare accounts existence and/or recover the secret key.");
|
return Unauthorized("The provided secret key is invalid. Verify your Namazu accounts existence and/or recover the secret key.");
|
||||||
}
|
}
|
||||||
if (!authResult.Success && authResult.TempBan)
|
if (!authResult.Success && authResult.TempBan)
|
||||||
{
|
{
|
||||||
@@ -69,14 +69,14 @@ public abstract class AuthControllerBase : Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
Logger.LogWarning("Authenticate:UIDBAN:{id}:{ident}", authResult.Uid, charaIdent);
|
Logger.LogWarning("Authenticate:UIDBAN:{id}:{ident}", authResult.Uid, charaIdent);
|
||||||
return Unauthorized("Your Mare account is banned from using the service.");
|
return Unauthorized("Your Namazu account is banned from using the service.");
|
||||||
}
|
}
|
||||||
|
|
||||||
var existingIdent = await _redis.StringGetAsync("UID:" + authResult.Uid);
|
var existingIdent = await _redis.StringGetAsync("UID:" + authResult.Uid);
|
||||||
if (!string.IsNullOrEmpty(existingIdent))
|
if (!string.IsNullOrEmpty(existingIdent))
|
||||||
{
|
{
|
||||||
Logger.LogWarning("Authenticate:DUPLICATE:{id}:{ident}", authResult.Uid, charaIdent);
|
Logger.LogWarning("Authenticate:DUPLICATE:{id}:{ident}", authResult.Uid, charaIdent);
|
||||||
return Unauthorized("Already logged in to this Mare account. Reconnect in 60 seconds. If you keep seeing this issue, restart your game.");
|
return Unauthorized("Already logged in to this Namazu account. Reconnect in 60 seconds. If you keep seeing this issue, restart your game.");
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger.LogInformation("Authenticate:SUCCESS:{id}:{ident}", authResult.Uid, charaIdent);
|
Logger.LogInformation("Authenticate:SUCCESS:{id}:{ident}", authResult.Uid, charaIdent);
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public class JwtController : AuthControllerBase
|
|||||||
var userAuth = await dbContext.Auth.SingleAsync(u => u.UserUID == uid);
|
var userAuth = await dbContext.Auth.SingleAsync(u => u.UserUID == uid);
|
||||||
await EnsureBan(uid, userAuth.PrimaryUserUID, ident);
|
await EnsureBan(uid, userAuth.PrimaryUserUID, ident);
|
||||||
|
|
||||||
return Unauthorized("Your Mare account is banned.");
|
return Unauthorized("Your Namazu account is banned.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (await IsIdentBanned(dbContext, ident))
|
if (await IsIdentBanned(dbContext, ident))
|
||||||
|
|||||||
@@ -147,9 +147,9 @@ public class OAuthController : AuthControllerBase
|
|||||||
var mareUser = await dbContext.LodeStoneAuth.Include(u => u.User).SingleOrDefaultAsync(u => u.DiscordId == discordUserId);
|
var mareUser = await dbContext.LodeStoneAuth.Include(u => u.User).SingleOrDefaultAsync(u => u.DiscordId == discordUserId);
|
||||||
if (mareUser == default)
|
if (mareUser == default)
|
||||||
{
|
{
|
||||||
Logger.LogDebug("Failed to get Mare user for {session}, DiscordId: {id}", reqId, discordUserId);
|
Logger.LogDebug("Failed to get Namazu user for {session}, DiscordId: {id}", reqId, discordUserId);
|
||||||
|
|
||||||
return BadRequest("Could not find a Mare user associated to this Discord account.");
|
return BadRequest("Could not find a Namazu user associated to this Discord account.");
|
||||||
}
|
}
|
||||||
|
|
||||||
JwtSecurityToken? jwt = null;
|
JwtSecurityToken? jwt = null;
|
||||||
|
|||||||
@@ -159,11 +159,11 @@ public partial class MareHub
|
|||||||
}
|
}
|
||||||
|
|
||||||
var gid = StringUtils.GenerateRandomString(12);
|
var gid = StringUtils.GenerateRandomString(12);
|
||||||
while (await DbContext.Groups.AnyAsync(g => g.GID == "MSS-" + gid).ConfigureAwait(false))
|
while (await DbContext.Groups.AnyAsync(g => g.GID == "NSS-" + gid).ConfigureAwait(false))
|
||||||
{
|
{
|
||||||
gid = StringUtils.GenerateRandomString(12);
|
gid = StringUtils.GenerateRandomString(12);
|
||||||
}
|
}
|
||||||
gid = "MSS-" + gid;
|
gid = "NSS-" + gid;
|
||||||
|
|
||||||
var passwd = StringUtils.GenerateRandomString(16);
|
var passwd = StringUtils.GenerateRandomString(16);
|
||||||
using var sha = SHA256.Create();
|
using var sha = SHA256.Create();
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ public partial class MareHub : Hub<IMareHub>, IMareHub
|
|||||||
var dbUser = await DbContext.Users.SingleAsync(f => f.UID == UserUID).ConfigureAwait(false);
|
var dbUser = await DbContext.Users.SingleAsync(f => f.UID == UserUID).ConfigureAwait(false);
|
||||||
dbUser.LastLoggedIn = DateTime.UtcNow;
|
dbUser.LastLoggedIn = DateTime.UtcNow;
|
||||||
|
|
||||||
await Clients.Caller.Client_ReceiveServerMessage(MessageSeverity.Information, "Welcome to Mare Synchronos \"" + _shardName + "\", Current Online Users: " + _systemInfoService.SystemInfoDto.OnlineUsers).ConfigureAwait(false);
|
await Clients.Caller.Client_ReceiveServerMessage(MessageSeverity.Information, "Welcome to Namazu Sync \"" + _shardName + "\", Current Online Users: " + _systemInfoService.SystemInfoDto.OnlineUsers).ConfigureAwait(false);
|
||||||
|
|
||||||
var defaultPermissions = await DbContext.UserDefaultPreferredPermissions.SingleOrDefaultAsync(u => u.UserUID == UserUID).ConfigureAwait(false);
|
var defaultPermissions = await DbContext.UserDefaultPreferredPermissions.SingleOrDefaultAsync(u => u.UserUID == UserUID).ConfigureAwait(false);
|
||||||
if (defaultPermissions == null)
|
if (defaultPermissions == null)
|
||||||
|
|||||||
@@ -184,9 +184,9 @@ internal class DiscordBot : IHostedService
|
|||||||
private async Task GenerateOrUpdateWizardMessage(SocketTextChannel channel, IUserMessage? prevMessage)
|
private async Task GenerateOrUpdateWizardMessage(SocketTextChannel channel, IUserMessage? prevMessage)
|
||||||
{
|
{
|
||||||
EmbedBuilder eb = new EmbedBuilder();
|
EmbedBuilder eb = new EmbedBuilder();
|
||||||
eb.WithTitle("Mare Services Bot Interaction Service");
|
eb.WithTitle("Namazu Services Bot Interaction Service");
|
||||||
eb.WithDescription("Press \"Start\" to interact with this bot!" + Environment.NewLine + Environment.NewLine
|
eb.WithDescription("Press \"Start\" to interact with this bot!" + Environment.NewLine + Environment.NewLine
|
||||||
+ "You can handle all of your Mare account needs in this server through the easy to use interactive bot prompt. Just follow the instructions!");
|
+ "You can handle all of your Namazu account needs in this server through the easy to use interactive bot prompt. Just follow the instructions!");
|
||||||
eb.WithThumbnailUrl("https://raw.githubusercontent.com/Penumbra-Sync/repo/main/MareSynchronos/images/icon.png");
|
eb.WithThumbnailUrl("https://raw.githubusercontent.com/Penumbra-Sync/repo/main/MareSynchronos/images/icon.png");
|
||||||
var cb = new ComponentBuilder();
|
var cb = new ComponentBuilder();
|
||||||
cb.WithButton("Start", style: ButtonStyle.Primary, customId: "wizard-captcha:true", emote: Emoji.Parse("➡️"));
|
cb.WithButton("Start", style: ButtonStyle.Primary, customId: "wizard-captcha:true", emote: Emoji.Parse("➡️"));
|
||||||
@@ -427,7 +427,7 @@ internal class DiscordBot : IHostedService
|
|||||||
var onlineUsers = await _connectionMultiplexer.GetServer(endPoint).KeysAsync(pattern: "UID:*").CountAsync().ConfigureAwait(false);
|
var onlineUsers = await _connectionMultiplexer.GetServer(endPoint).KeysAsync(pattern: "UID:*").CountAsync().ConfigureAwait(false);
|
||||||
|
|
||||||
_logger.LogInformation("Users online: " + onlineUsers);
|
_logger.LogInformation("Users online: " + onlineUsers);
|
||||||
await _discordClient.SetActivityAsync(new Game("Mare for " + onlineUsers + " Users")).ConfigureAwait(false);
|
await _discordClient.SetActivityAsync(new Game("Namazu for " + onlineUsers + " Users")).ConfigureAwait(false);
|
||||||
await Task.Delay(TimeSpan.FromSeconds(10)).ConfigureAwait(false);
|
await Task.Delay(TimeSpan.FromSeconds(10)).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ public class MareModule : InteractionModuleBase
|
|||||||
if (primaryUser == null)
|
if (primaryUser == null)
|
||||||
{
|
{
|
||||||
eb.WithTitle("No account");
|
eb.WithTitle("No account");
|
||||||
eb.WithDescription("No Mare account was found associated to your Discord user");
|
eb.WithDescription("No Namazu account was found associated to your Discord user");
|
||||||
return eb;
|
return eb;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -223,7 +223,7 @@ public class MareModule : InteractionModuleBase
|
|||||||
if (userInDb == null)
|
if (userInDb == null)
|
||||||
{
|
{
|
||||||
eb.WithTitle("No account");
|
eb.WithTitle("No account");
|
||||||
eb.WithDescription("The Discord user has no valid Mare account");
|
eb.WithDescription("The Discord user has no valid Namazu account");
|
||||||
return eb;
|
return eb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public partial class MareWizardModule
|
|||||||
eb.WithColor(Color.Blue);
|
eb.WithColor(Color.Blue);
|
||||||
eb.WithTitle("Recover");
|
eb.WithTitle("Recover");
|
||||||
eb.WithDescription("In case you have lost your secret key you can recover it here." + Environment.NewLine + Environment.NewLine
|
eb.WithDescription("In case you have lost your secret key you can recover it here." + Environment.NewLine + Environment.NewLine
|
||||||
+ "## ⚠️ **Once you recover your key, the previously used key will be invalidated. If you use Mare on multiple devices you will have to update the key everywhere you use it.** ⚠️" + Environment.NewLine + Environment.NewLine
|
+ "## ⚠️ **Once you recover your key, the previously used key will be invalidated. If you use Namazu on multiple devices you will have to update the key everywhere you use it.** ⚠️" + Environment.NewLine + Environment.NewLine
|
||||||
+ "Use the selection below to select the user account you want to recover." + Environment.NewLine + Environment.NewLine
|
+ "Use the selection below to select the user account you want to recover." + Environment.NewLine + Environment.NewLine
|
||||||
+ "- 1️⃣ is your primary account/UID" + Environment.NewLine
|
+ "- 1️⃣ is your primary account/UID" + Environment.NewLine
|
||||||
+ "- 2️⃣ are all your secondary accounts/UIDs" + Environment.NewLine
|
+ "- 2️⃣ are all your secondary accounts/UIDs" + Environment.NewLine
|
||||||
@@ -79,7 +79,7 @@ public partial class MareWizardModule
|
|||||||
+ Environment.NewLine
|
+ Environment.NewLine
|
||||||
+ "__NOTE: The Secret Key only contains the letters ABCDEF and numbers 0 - 9.__"
|
+ "__NOTE: The Secret Key only contains the letters ABCDEF and numbers 0 - 9.__"
|
||||||
+ Environment.NewLine + Environment.NewLine
|
+ Environment.NewLine + Environment.NewLine
|
||||||
+ "Enter this key in the Mare Synchronos Service Settings and reconnect to the service.");
|
+ "Enter this key in the Namazu Sync Service Settings and reconnect to the service.");
|
||||||
|
|
||||||
await db.Auth.AddAsync(auth).ConfigureAwait(false);
|
await db.Auth.AddAsync(auth).ConfigureAwait(false);
|
||||||
await db.SaveChangesAsync().ConfigureAwait(false);
|
await db.SaveChangesAsync().ConfigureAwait(false);
|
||||||
|
|||||||
@@ -23,9 +23,9 @@ public partial class MareWizardModule
|
|||||||
eb.WithColor(Color.Blue);
|
eb.WithColor(Color.Blue);
|
||||||
eb.WithTitle("Secondary UID");
|
eb.WithTitle("Secondary UID");
|
||||||
eb.WithDescription("You can create secondary UIDs here. " + Environment.NewLine + Environment.NewLine
|
eb.WithDescription("You can create secondary UIDs here. " + Environment.NewLine + Environment.NewLine
|
||||||
+ "Secondary UIDs act as completely separate Mare accounts with their own pair list, joined syncshells, UID and so on." + Environment.NewLine
|
+ "Secondary UIDs act as completely separate Namazu accounts with their own pair list, joined syncshells, UID and so on." + Environment.NewLine
|
||||||
+ "Use this to create UIDs if you want to use Mare on two separate game instances at once or keep your alts private." + Environment.NewLine + Environment.NewLine
|
+ "Use this to create UIDs if you want to use Namazu on two separate game instances at once or keep your alts private." + Environment.NewLine + Environment.NewLine
|
||||||
+ "__Note:__ Creating a Secondary UID is _not_ necessary to use Mare for alts." + Environment.NewLine + Environment.NewLine
|
+ "__Note:__ Creating a Secondary UID is _not_ necessary to use Namazu for alts." + Environment.NewLine + Environment.NewLine
|
||||||
+ $"You currently have {secondaryUids} Secondary UIDs out of a maximum of 20.");
|
+ $"You currently have {secondaryUids} Secondary UIDs out of a maximum of 20.");
|
||||||
ComponentBuilder cb = new();
|
ComponentBuilder cb = new();
|
||||||
AddHome(cb);
|
AddHome(cb);
|
||||||
@@ -81,7 +81,7 @@ public partial class MareWizardModule
|
|||||||
|
|
||||||
await db.SaveChangesAsync().ConfigureAwait(false);
|
await db.SaveChangesAsync().ConfigureAwait(false);
|
||||||
|
|
||||||
embed.WithDescription("A secondary UID for you was created, use the information below and add the secret key to the Mare setings in the Service Settings tab.");
|
embed.WithDescription("A secondary UID for you was created, use the information below and add the secret key to the Namazu setings in the Service Settings tab.");
|
||||||
embed.AddField("UID", newUser.UID);
|
embed.AddField("UID", newUser.UID);
|
||||||
embed.AddField("Secret Key", computedHash);
|
embed.AddField("Secret Key", computedHash);
|
||||||
|
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ public partial class MareWizardModule
|
|||||||
eb.WithColor(Color.Green);
|
eb.WithColor(Color.Green);
|
||||||
eb.WithTitle("Vanity UID successfully set");
|
eb.WithTitle("Vanity UID successfully set");
|
||||||
eb.WithDescription($"Your Vanity UID for \"{uid}\" was successfully changed to \"{desiredVanityUid}\"." + Environment.NewLine + Environment.NewLine
|
eb.WithDescription($"Your Vanity UID for \"{uid}\" was successfully changed to \"{desiredVanityUid}\"." + Environment.NewLine + Environment.NewLine
|
||||||
+ "For changes to take effect you need to reconnect to the Mare service.");
|
+ "For changes to take effect you need to reconnect to the Namazu service.");
|
||||||
await _botServices.LogToChannel($"{Context.User.Mention} VANITY UID SET: UID: {user.UID}, Vanity: {desiredVanityUid}").ConfigureAwait(false);
|
await _botServices.LogToChannel($"{Context.User.Mention} VANITY UID SET: UID: {user.UID}, Vanity: {desiredVanityUid}").ConfigureAwait(false);
|
||||||
AddHome(cb);
|
AddHome(cb);
|
||||||
}
|
}
|
||||||
@@ -195,7 +195,7 @@ public partial class MareWizardModule
|
|||||||
eb.WithColor(Color.Green);
|
eb.WithColor(Color.Green);
|
||||||
eb.WithTitle("Vanity Syncshell ID successfully set");
|
eb.WithTitle("Vanity Syncshell ID successfully set");
|
||||||
eb.WithDescription($"Your Vanity Syncshell ID for {gid} was successfully changed to \"{desiredVanityGid}\"." + Environment.NewLine + Environment.NewLine
|
eb.WithDescription($"Your Vanity Syncshell ID for {gid} was successfully changed to \"{desiredVanityGid}\"." + Environment.NewLine + Environment.NewLine
|
||||||
+ "For changes to take effect you need to reconnect to the Mare service.");
|
+ "For changes to take effect you need to reconnect to the Namazu service.");
|
||||||
AddHome(cb);
|
AddHome(cb);
|
||||||
await _botServices.LogToChannel($"{Context.User.Mention} VANITY GID SET: GID: {group.GID}, Vanity: {desiredVanityGid}").ConfigureAwait(false);
|
await _botServices.LogToChannel($"{Context.User.Mention} VANITY GID SET: GID: {group.GID}, Vanity: {desiredVanityGid}").ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,10 +155,10 @@ public partial class MareWizardModule : InteractionModuleBase
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
EmbedBuilder eb = new();
|
EmbedBuilder eb = new();
|
||||||
eb.WithTitle("Welcome to the Mare Synchronos Service Bot for this server");
|
eb.WithTitle("Welcome to the Namazu Sync Service Bot for this server");
|
||||||
eb.WithDescription("Here is what you can do:" + Environment.NewLine + Environment.NewLine
|
eb.WithDescription("Here is what you can do:" + Environment.NewLine + Environment.NewLine
|
||||||
+ (!hasAccount ? string.Empty : ("- Check your account status press \"ℹ️ User Info\"" + Environment.NewLine))
|
+ (!hasAccount ? string.Empty : ("- Check your account status press \"ℹ️ User Info\"" + Environment.NewLine))
|
||||||
+ (hasAccount ? string.Empty : ("- Register a new Mare Account press \"🌒 Register\"" + Environment.NewLine))
|
+ (hasAccount ? string.Empty : ("- Register a new Namazu Account press \"🌒 Register\"" + Environment.NewLine))
|
||||||
+ (!hasAccount ? string.Empty : ("- You lost your secret key press \"🏥 Recover\"" + Environment.NewLine))
|
+ (!hasAccount ? string.Empty : ("- You lost your secret key press \"🏥 Recover\"" + Environment.NewLine))
|
||||||
+ (hasAccount ? string.Empty : ("- If you have changed your Discord account press \"🔗 Relink\"" + Environment.NewLine))
|
+ (hasAccount ? string.Empty : ("- If you have changed your Discord account press \"🔗 Relink\"" + Environment.NewLine))
|
||||||
+ (!hasAccount ? string.Empty : ("- Create a secondary UIDs press \"2️⃣ Secondary UID\"" + Environment.NewLine))
|
+ (!hasAccount ? string.Empty : ("- Create a secondary UIDs press \"2️⃣ Secondary UID\"" + Environment.NewLine))
|
||||||
|
|||||||
Reference in New Issue
Block a user