did a debug session, fixed bugs
This commit is contained in:
parent
cfd3cbf5a3
commit
24f7756370
3 changed files with 8 additions and 4 deletions
|
|
@ -10,7 +10,7 @@ namespace TShockAPI
|
|||
public class Commands
|
||||
{
|
||||
public delegate void CommandDelegate(CommandArgs args);
|
||||
public static List<Command> commands;
|
||||
public static List<Command> commands = new List<Command>();
|
||||
|
||||
public struct CommandArgs
|
||||
{
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ namespace TShockAPI
|
|||
{
|
||||
}
|
||||
|
||||
new public virtual bool HasPermission(string permission)
|
||||
public override bool HasPermission(string permission)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ namespace TShockAPI
|
|||
{
|
||||
class Tools
|
||||
{
|
||||
private static List<Group> groups;
|
||||
private static List<Group> groups = new List<Group>();
|
||||
|
||||
/// <summary>
|
||||
/// Provides the real IP address from a RemoteEndPoint string that contains a port and an IP
|
||||
|
|
@ -418,7 +418,7 @@ namespace TShockAPI
|
|||
{
|
||||
ip = GetRealIP(ip);
|
||||
|
||||
StreamReader sr = new StreamReader("users.txt");
|
||||
StreamReader sr = new StreamReader(FileTools.SaveDir + "users.txt");
|
||||
string data = sr.ReadToEnd();
|
||||
data = data.Replace("\r", "");
|
||||
string[] lines = data.Split('\n');
|
||||
|
|
@ -430,6 +430,10 @@ namespace TShockAPI
|
|||
{
|
||||
continue;
|
||||
}
|
||||
if (lines[i].StartsWith("#"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (args[0].Equals(ip))
|
||||
{
|
||||
return GetGroup(args[1]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue