예제 #1
0
        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());
        }
예제 #2
0
 protected virtual void ConsoleShutdown(ConsoleCommandResult result, int clientId, ref object data)
 {
     IsRunning = false;
 }
예제 #3
0
 protected virtual void ConsoleRecord(ConsoleCommandResult result, int clientId, ref object data)
 {
     throw new NotImplementedException();
 }
예제 #4
0
 protected virtual void ConsoleRconPasswordUpdated(ConsoleCommandResult result, int clientId, ref object data)
 {
 }
예제 #5
0
 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)); })));
     }
 }
예제 #6
0
 protected virtual void ConsoleForceTeamBalance(ConsoleCommandResult result, int clientId, ref object data)
 {
     throw new NotImplementedException();
 }
예제 #7
0
 protected override async Task InternalExecute(IConsoleContext context, ConsoleCommandResult result, string commandname, string commandstring, IScope scope)
 {
     var request = ResolveService <IReportRequest>("", context);
     await Reports.Execute(request);
 }