mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-02-13 03:33:37 +00:00
Merge pull request #425 from pschord/remote-admin
Create PsAdmin framework
This commit is contained in:
commit
fbca774a37
16 changed files with 419 additions and 7 deletions
|
|
@ -190,6 +190,10 @@ trait ConfigParser {
|
|||
config_map = map
|
||||
}
|
||||
|
||||
def GetRawConfig : Map[String, Any] = {
|
||||
config_map
|
||||
}
|
||||
|
||||
def FormatErrors(invalidResult : Invalid) : Seq[String] = {
|
||||
var count = 0;
|
||||
|
||||
|
|
@ -209,7 +213,7 @@ trait ConfigParser {
|
|||
}
|
||||
|
||||
protected def parseSection(sectionIni : org.ini4j.Profile.Section, entry : ConfigEntry, map : Map[String, Any]) : ValidationResult = {
|
||||
var rawValue = sectionIni.get(entry.key)
|
||||
var rawValue = sectionIni.get(entry.key, 0)
|
||||
val full_key : String = sectionIni.getName + "." + entry.key
|
||||
|
||||
val value = if (rawValue == null) {
|
||||
|
|
|
|||
|
|
@ -64,6 +64,16 @@ class InterstellarCluster(zones : List[Zone]) extends Actor {
|
|||
case None => //zone_number does not exist
|
||||
sender ! Zone.Lattice.NoValidSpawnPoint(zone_number, None)
|
||||
}
|
||||
case InterstellarCluster.ListPlayers() =>
|
||||
var players : List[String] = List()
|
||||
|
||||
for(zone <- zones) {
|
||||
val zonePlayers = zone.Players
|
||||
for (player <- zonePlayers) {
|
||||
players ::= player.name
|
||||
}
|
||||
}
|
||||
sender ! InterstellarCluster.PlayerList(players)
|
||||
|
||||
case msg @ Zone.Lattice.RequestSpecificSpawnPoint(zone_number, _, _, _) =>
|
||||
recursiveFindWorldInCluster(zones.iterator, _.Number == zone_number) match {
|
||||
|
|
@ -188,6 +198,9 @@ object InterstellarCluster {
|
|||
*/
|
||||
final case class GiveWorld(zoneId : String, zone : Zone)
|
||||
|
||||
final case class ListPlayers()
|
||||
final case class PlayerList(players : List[String])
|
||||
|
||||
/**
|
||||
* Signal to the cluster that a new client needs to be initialized for all listed `Zone` destinations.
|
||||
* @see `Zone`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue