mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-01-19 18:14:44 +00:00
by default, the server only expect udp on 51000 and 51001; let's keep to that by default (#1209)
This commit is contained in:
parent
6d1530c311
commit
5990f247c9
|
|
@ -20,7 +20,7 @@ login {
|
|||
world {
|
||||
# UDP listening port
|
||||
port = 51001
|
||||
ports = [51003, 51004, 51005, 51006, 51007, 51008, 51009, 51010]
|
||||
ports = []
|
||||
|
||||
# The name of the server as displayed in the server browser.
|
||||
server-name = PSForever
|
||||
|
|
|
|||
|
|
@ -27,11 +27,11 @@ import scala.concurrent.duration._
|
|||
import scala.util.matching.Regex
|
||||
import scala.util.{Failure, Success}
|
||||
|
||||
|
||||
|
||||
object LoginActor {
|
||||
sealed trait Command
|
||||
|
||||
private case object UpdateServerList extends Command
|
||||
|
||||
final case class ReceptionistListing(listing: Receptionist.Listing) extends Command
|
||||
}
|
||||
|
||||
|
|
@ -41,8 +41,6 @@ class LoginActor(middlewareActor: typed.ActorRef[MiddlewareActor.Command], conne
|
|||
|
||||
import scala.concurrent.ExecutionContext.Implicits.global
|
||||
|
||||
private case class UpdateServerList()
|
||||
|
||||
val usernameRegex: Regex = """[A-Za-z0-9]{3,}""".r
|
||||
|
||||
var leftRef: ActorRef = Default.Actor
|
||||
|
|
@ -83,7 +81,7 @@ class LoginActor(middlewareActor: typed.ActorRef[MiddlewareActor.Command], conne
|
|||
canonicalHostName = address.CanonicalHostName
|
||||
port = address.Port
|
||||
|
||||
case UpdateServerList() =>
|
||||
case LoginActor.UpdateServerList =>
|
||||
updateServerList()
|
||||
|
||||
case packet: PlanetSideGamePacket =>
|
||||
|
|
@ -213,7 +211,7 @@ class LoginActor(middlewareActor: typed.ActorRef[MiddlewareActor.Command], conne
|
|||
}
|
||||
loginSuccessfulResponse(username, newToken)
|
||||
updateServerListTask =
|
||||
context.system.scheduler.scheduleWithFixedDelay(0 seconds, 5 seconds, self, UpdateServerList())
|
||||
context.system.scheduler.scheduleWithFixedDelay(0 seconds, 5 seconds, self, LoginActor.UpdateServerList)
|
||||
future
|
||||
|
||||
case (_, false) =>
|
||||
|
|
@ -271,7 +269,7 @@ class LoginActor(middlewareActor: typed.ActorRef[MiddlewareActor.Command], conne
|
|||
)
|
||||
loginSuccessfulResponseToken(account.username, token, newToken)
|
||||
updateServerListTask =
|
||||
context.system.scheduler.scheduleWithFixedDelay(0 seconds, 5 seconds, self, UpdateServerList())
|
||||
context.system.scheduler.scheduleWithFixedDelay(0 seconds, 5 seconds, self, LoginActor.UpdateServerList)
|
||||
future
|
||||
|
||||
case (_, false) =>
|
||||
|
|
|
|||
Loading…
Reference in a new issue