public override void Execute(string commandArgs) { if (Exists(commandArgs)) { LunaLog.Normal("Removed '" + commandArgs + "' from the admin list."); Remove(commandArgs); AdminSystemSender.NotifyPlayersRemovedAdmin(commandArgs); } else { LunaLog.Normal("'" + commandArgs + "' is not an admin."); } }
public override void HandleMessage(ClientStructure client, IMessageData messageData) { var data = (AdminBaseMsgData)messageData; switch (data.AdminMessageType) { case AdminMessageType.ListRequest: AdminSystemSender.SendAdminList(client); break; default: throw new ArgumentOutOfRangeException(); } }
public override void Execute(string commandArgs) { if (FileHandler.FileExists(Path.Combine(ServerContext.UniverseDirectory, "Players", commandArgs + ".txt"))) { if (!Exists(commandArgs)) { LunaLog.Debug("Added '" + commandArgs + "' to admin list."); Add(commandArgs); AdminSystemSender.NotifyPlayersNewAdmin(commandArgs); } } else { LunaLog.Normal("'" + commandArgs + "' does not exist."); } }
public override void HandleMessage(ClientStructure client, IClientMessageBase message) { var data = (AdminBaseMsgData)message.Data; switch (data.AdminMessageType) { case AdminMessageType.ListRequest: AdminSystemSender.SendAdminList(client); //We don't use this message anymore so we can recycle it message.Recycle(); break; default: throw new ArgumentOutOfRangeException(); } }
public override void Execute(string commandArgs) { if (FileHandler.FileExists(Path.Combine(ServerContext.UniverseDirectory, "Players", $"{commandArgs}.txt"))) { if (Exists(commandArgs)) { return; } LunaLog.Debug($"Added '{commandArgs}' to admin list."); Add(commandArgs); AdminSystemSender.NotifyPlayersNewAdmin(commandArgs); } else { LunaLog.Normal($"'{commandArgs}' does not exist."); } }