Split out the Flashii interaction code into a separate library.

This commit is contained in:
flash 2025-04-26 19:42:23 +00:00
commit 2eba089a21
Signed by: flash
GPG key ID: 2C9C2C574D47FE3E
55 changed files with 769 additions and 552 deletions
SharpChat/ClientCommands

View file

@ -1,4 +1,4 @@
using SharpChat.S2CPackets;
using SharpChat.S2CPackets;
namespace SharpChat.ClientCommands {
public class ShutdownRestartClientCommand(ManualResetEvent waitHandle, Func<bool> shutdownCheck) : ClientCommand {
@ -11,7 +11,7 @@ namespace SharpChat.ClientCommands {
}
public void Dispatch(ClientCommandContext ctx) {
if(ctx.User.UserId != 1) {
if(!ctx.User.UserId.Equals("1")) {
long msgId = ctx.Chat.RandomSnowflake.Next();
ctx.Chat.SendTo(ctx.User, new CommandResponseS2CPacket(msgId, LCR.COMMAND_NOT_ALLOWED, true, $"/{ctx.Name}"));
return;