Added doctor stuff and user
This commit is contained in:
@@ -39,7 +39,9 @@ namespace ErgometerServer
|
|||||||
break;
|
break;
|
||||||
case NetCommand.CommandType.CHAT:
|
case NetCommand.CommandType.CHAT:
|
||||||
server.SendToClient(input);
|
server.SendToClient(input);
|
||||||
Console.WriteLine(input);
|
break;
|
||||||
|
case NetCommand.CommandType.VALUESET:
|
||||||
|
server.SendToClient(input);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new FormatException("Unknown Command");
|
throw new FormatException("Unknown Command");
|
||||||
|
|||||||
@@ -114,6 +114,16 @@ namespace ErgometerServer
|
|||||||
FileHandler.SaveUsers(users);
|
FileHandler.SaveUsers(users);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void AddUser(Dictionary<string, string> users)
|
||||||
|
{
|
||||||
|
foreach(KeyValuePair<string, string> user in users)
|
||||||
|
{
|
||||||
|
users.Add(user.Key, user.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
FileHandler.SaveUsers(users);
|
||||||
|
}
|
||||||
|
|
||||||
public bool CheckPassword(string name, string password)
|
public bool CheckPassword(string name, string password)
|
||||||
{
|
{
|
||||||
string pass;
|
string pass;
|
||||||
|
|||||||
Reference in New Issue
Block a user