public void OnAuthorize(byte id, string name, string ip, int port, Core.GameConstants.ServerTypes type) { this.ID = (uint)id; this.Name = string.Concat("GameServer", id); // TODO: Is this really used ANYWHERE???? this.serverName = name; this.ip = ip; this.port = port; this.serverType = type; this.isAuthorized = true; }
public byte Add(Authentication.Entities.Server s, string name, string ip, int port, Core.GameConstants.ServerTypes type) { byte serverId = 0; for (byte i = 1; i <= MAX_SERVERS; i++) { if (!servers.ContainsKey(i)) { serverId = i; break; } } if (serverId > 0) { // Add server to the hashtable :p s.OnAuthorize(serverId, name, ip, port, type); servers.Add(serverId, s); } return(serverId); }