Core/Misc: Misc cleanups and changing of fields
This commit is contained in:
@@ -71,7 +71,7 @@ namespace Game.Chat
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool ExecuteCommandInTable(List<ChatCommand> table, string text, string fullcmd)
|
||||
public bool ExecuteCommandInTable(ICollection<ChatCommand> table, string text, string fullcmd)
|
||||
{
|
||||
StringArguments args = new StringArguments(text);
|
||||
string cmd = args.NextString();
|
||||
@@ -168,7 +168,7 @@ namespace Game.Chat
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool ShowHelpForCommand(List<ChatCommand> table, string text)
|
||||
public bool ShowHelpForCommand(ICollection<ChatCommand> table, string text)
|
||||
{
|
||||
StringArguments args = new StringArguments(text);
|
||||
if (!args.Empty())
|
||||
@@ -226,7 +226,7 @@ namespace Game.Chat
|
||||
return ShowHelpForSubCommands(table, "", text);
|
||||
}
|
||||
|
||||
public bool ShowHelpForSubCommands(List<ChatCommand> table, string cmd, string subcmd)
|
||||
public bool ShowHelpForSubCommands(ICollection<ChatCommand> table, string cmd, string subcmd)
|
||||
{
|
||||
string list = "";
|
||||
foreach (var command in table)
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace Game.Chat
|
||||
}
|
||||
}
|
||||
|
||||
static bool SetDataForCommandInTable(List<ChatCommand> table, string text, uint permission, string help, string fullcommand)
|
||||
static bool SetDataForCommandInTable(ICollection<ChatCommand> table, string text, uint permission, string help, string fullcommand)
|
||||
{
|
||||
StringArguments args = new StringArguments(text);
|
||||
string cmd = args.NextString().ToLower();
|
||||
@@ -135,9 +135,9 @@ namespace Game.Chat
|
||||
}
|
||||
}
|
||||
|
||||
public static List<ChatCommand> GetCommands()
|
||||
public static ICollection<ChatCommand> GetCommands()
|
||||
{
|
||||
return _commands.Values.ToList();
|
||||
return _commands.Values;
|
||||
}
|
||||
|
||||
static SortedDictionary<string, ChatCommand> _commands = new SortedDictionary<string, ChatCommand>();
|
||||
|
||||
Reference in New Issue
Block a user