protected virtual void ConsoleModStatus(ConsoleCommandResult result, int clientId, ref object data) { var stringBuilder = new StringBuilder(256); foreach (var pair in Console.GetCommands(BaseServerClient.AuthedModerator, ConfigFlags.Server)) { if (stringBuilder.Length + pair.Key.Length < stringBuilder.Capacity) { if (stringBuilder.Length > 0) { stringBuilder.Append(", "); } stringBuilder.Append(pair.Key); } else { Console.Print(OutputLevel.Standard, "console", stringBuilder.ToString()); stringBuilder.Clear(); stringBuilder.Append(pair.Key); } } Console.Print(OutputLevel.Standard, "console", stringBuilder.ToString()); }
protected virtual void ConsoleShutdown(ConsoleCommandResult result, int clientId, ref object data) { IsRunning = false; }
protected virtual void ConsoleRecord(ConsoleCommandResult result, int clientId, ref object data) { throw new NotImplementedException(); }
protected virtual void ConsoleRconPasswordUpdated(ConsoleCommandResult result, int clientId, ref object data) { }
static void Postfix(string command, string description, SimpleConsoleCommandCallback callback, Dictionary <string, ConsoleCommand> ___Database) { if (!___Database.ContainsKey(command)) { ___Database.Add(command, new ConsoleCommand(command, description, "", new ConsoleCommandCallback((args) => { callback(); return(ConsoleCommandResult.Succeeded(null)); }))); } }
protected virtual void ConsoleForceTeamBalance(ConsoleCommandResult result, int clientId, ref object data) { throw new NotImplementedException(); }
protected override async Task InternalExecute(IConsoleContext context, ConsoleCommandResult result, string commandname, string commandstring, IScope scope) { var request = ResolveService <IReportRequest>("", context); await Reports.Execute(request); }