mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-12 23:14:36 +01:00
normalise config
This commit is contained in:
126
config.json
126
config.json
@@ -3,13 +3,13 @@
|
||||
"BinPath": "bin",
|
||||
"DisableSoftCrash": false,
|
||||
"FeaturedWeapons": 2,
|
||||
"devmode": true,
|
||||
"devmodeoptions": {
|
||||
"DevMode": true,
|
||||
"DevModeOptions": {
|
||||
"EnableLauncherServer": false,
|
||||
"hideLoginNotice": false,
|
||||
"loginNotice": "<BODY><CENTER><SIZE_3><C_4>Welcome to Erupe SU9.1 Beta!<BR><BODY><LEFT><SIZE_2><C_5>Erupe is experimental software<C_7>, we are not liable for any<BR><BODY>issues caused by installing the software!<BR><BODY><BR><BODY><C_4>■Report bugs on Discord!<C_7><BR><BODY><BR><BODY><C_4>■Test everything!<C_7><BR><BODY><BR><BODY><C_4>■Don't talk to softlocking NPCs!<C_7><BR><BODY><BR><BODY><C_4>■Fork the code on GitHub!<C_7><BR><BODY><BR><BODY>Thank you to all of the contributors,<BR><BODY><BR><BODY>this wouldn't exist without you.",
|
||||
"cleandb": false,
|
||||
"maxlauncherhr": false,
|
||||
"HideLoginNotice": false,
|
||||
"LoginNotice": "<BODY><CENTER><SIZE_3><C_4>Welcome to Erupe SU9.1 Beta!<BR><BODY><LEFT><SIZE_2><C_5>Erupe is experimental software<C_7>, we are not liable for any<BR><BODY>issues caused by installing the software!<BR><BODY><BR><BODY><C_4>■Report bugs on Discord!<C_7><BR><BODY><BR><BODY><C_4>■Test everything!<C_7><BR><BODY><BR><BODY><C_4>■Don't talk to softlocking NPCs!<C_7><BR><BODY><BR><BODY><C_4>■Fork the code on GitHub!<C_7><BR><BODY><BR><BODY>Thank you to all of the contributors,<BR><BODY><BR><BODY>this wouldn't exist without you.",
|
||||
"CleanDB": false,
|
||||
"MaxLauncherHR": false,
|
||||
"LogInboundMessages": false,
|
||||
"LogOutboundMessages": false,
|
||||
"MaxHexdumpLength": 256,
|
||||
@@ -26,88 +26,88 @@
|
||||
"OutputDir": "savedata"
|
||||
}
|
||||
},
|
||||
"discord": {
|
||||
"enabled": false,
|
||||
"bottoken": "",
|
||||
"realtimeChannelID": ""
|
||||
"Discord": {
|
||||
"Enabled": false,
|
||||
"BotToken": "",
|
||||
"RealtimeChannelID": ""
|
||||
},
|
||||
"Commands": [
|
||||
{
|
||||
"name": "Rights",
|
||||
"enabled": true,
|
||||
"prefix": "!rights"
|
||||
"Name": "Rights",
|
||||
"Enabled": true,
|
||||
"Prefix": "!rights"
|
||||
}, {
|
||||
"name": "Raviente",
|
||||
"enabled": true,
|
||||
"prefix": "!ravi"
|
||||
"Name": "Raviente",
|
||||
"Enabled": true,
|
||||
"Prefix": "!ravi"
|
||||
}, {
|
||||
"name": "Teleport",
|
||||
"enabled": false,
|
||||
"prefix": "!tele"
|
||||
"Name": "Teleport",
|
||||
"Enabled": false,
|
||||
"Prefix": "!tele"
|
||||
}, {
|
||||
"name": "Reload",
|
||||
"enabled": true,
|
||||
"prefix": "!reload"
|
||||
"Name": "Reload",
|
||||
"Enabled": true,
|
||||
"Prefix": "!reload"
|
||||
}, {
|
||||
"name": "KeyQuest",
|
||||
"enabled": false,
|
||||
"prefix": "!kqf"
|
||||
"Name": "KeyQuest",
|
||||
"Enabled": false,
|
||||
"Prefix": "!kqf"
|
||||
}
|
||||
],
|
||||
"database": {
|
||||
"host": "localhost",
|
||||
"port": 5432,
|
||||
"user": "postgres",
|
||||
"password": "",
|
||||
"database": "erupe"
|
||||
"Database": {
|
||||
"Host": "localhost",
|
||||
"Port": 5432,
|
||||
"User": "postgres",
|
||||
"Password": "a",
|
||||
"Database": "erupe"
|
||||
},
|
||||
"launcher": {
|
||||
"enabled": true,
|
||||
"port": 80,
|
||||
"Launcher": {
|
||||
"Enabled": false,
|
||||
"Port": 80,
|
||||
"UseOriginalLauncherFiles": false
|
||||
},
|
||||
"sign": {
|
||||
"enabled": true,
|
||||
"port": 53312
|
||||
"Sign": {
|
||||
"Enabled": true,
|
||||
"Port": 53312
|
||||
},
|
||||
"channel": {
|
||||
"enabled": true
|
||||
"Channel": {
|
||||
"Enabled": true
|
||||
},
|
||||
"entrance": {
|
||||
"enabled": true,
|
||||
"port": 53310,
|
||||
"entries": [
|
||||
"Entrance": {
|
||||
"Enabled": true,
|
||||
"Port": 53310,
|
||||
"Entries": [
|
||||
{
|
||||
"name": "Newbie", "description": "", "ip": "", "type": 3, "recommended": 2, "allowedclientflags": 0,
|
||||
"channels": [
|
||||
{ "port": 54001, "MaxPlayers": 100 },
|
||||
{ "port": 54002, "MaxPlayers": 100 }
|
||||
"Name": "Newbie", "Description": "", "IP": "", "Type": 3, "Recommended": 2, "AllowedClientFlags": 0,
|
||||
"Channels": [
|
||||
{ "Port": 54001, "MaxPlayers": 100 },
|
||||
{ "Port": 54002, "MaxPlayers": 100 }
|
||||
]
|
||||
}, {
|
||||
"name": "Normal", "description": "", "ip": "", "type": 1, "recommended": 0, "allowedclientflags": 0,
|
||||
"channels": [
|
||||
{ "port": 54003, "MaxPlayers": 100 },
|
||||
{ "port": 54004, "MaxPlayers": 100 }
|
||||
"Name": "Normal", "Description": "", "IP": "", "Type": 1, "Recommended": 0, "AllowedClientFlags": 0,
|
||||
"Channels": [
|
||||
{ "Port": 54003, "MaxPlayers": 100 },
|
||||
{ "Port": 54004, "MaxPlayers": 100 }
|
||||
]
|
||||
}, {
|
||||
"name": "Cities", "description": "", "ip": "", "type": 2, "recommended": 0, "allowedclientflags": 0,
|
||||
"channels": [
|
||||
{ "port": 54005, "MaxPlayers": 100 }
|
||||
"Name": "Cities", "Description": "", "IP": "", "Type": 2, "Recommended": 0, "AllowedClientFlags": 0,
|
||||
"Channels": [
|
||||
{ "Port": 54005, "MaxPlayers": 100 }
|
||||
]
|
||||
}, {
|
||||
"name": "Tavern", "description": "", "ip": "", "type": 4, "recommended": 0, "allowedclientflags": 0,
|
||||
"channels": [
|
||||
{ "port": 54006, "MaxPlayers": 100 }
|
||||
"Name": "Tavern", "Description": "", "IP": "", "Type": 4, "Recommended": 0, "AllowedClientFlags": 0,
|
||||
"Channels": [
|
||||
{ "Port": 54006, "MaxPlayers": 100 }
|
||||
]
|
||||
}, {
|
||||
"name": "Return", "description": "", "ip": "", "type": 5, "recommended": 0, "allowedclientflags": 0,
|
||||
"channels": [
|
||||
{ "port": 54007, "MaxPlayers": 100 }
|
||||
"Name": "Return", "Description": "", "IP": "", "Type": 5, "Recommended": 0, "AllowedClientFlags": 0,
|
||||
"Channels": [
|
||||
{ "Port": 54007, "MaxPlayers": 100 }
|
||||
]
|
||||
}, {
|
||||
"name": "MezFes", "description": "", "ip": "", "type": 6, "recommended": 6, "allowedclientflags": 0,
|
||||
"channels": [
|
||||
{ "port": 54008, "MaxPlayers": 100 }
|
||||
"Name": "MezFes", "Description": "", "IP": "", "Type": 6, "Recommended": 6, "AllowedClientFlags": 0,
|
||||
"Channels": [
|
||||
{ "Port": 54008, "MaxPlayers": 100 }
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -30,23 +30,22 @@ type Config struct {
|
||||
|
||||
// DevModeOptions holds various debug/temporary options for use while developing Erupe.
|
||||
type DevModeOptions struct {
|
||||
EnableLauncherServer bool // Enables the launcher server to be served on port 80
|
||||
HideLoginNotice bool // Hide the Erupe notice on login
|
||||
LoginNotice string // MHFML string of the login notice displayed
|
||||
CleanDB bool // Automatically wipes the DB on server reset.
|
||||
MaxLauncherHR bool // Sets the HR returned in the launcher to HR7 so that you can join non-beginner worlds.
|
||||
LogInboundMessages bool // Log all messages sent to the server
|
||||
LogOutboundMessages bool // Log all messages sent to the clients
|
||||
MaxHexdumpLength int // Maximum number of bytes printed when logs are enabled
|
||||
DivaEvent int // Diva Defense event status
|
||||
FestaEvent int // Hunter's Festa event status
|
||||
TournamentEvent int // VS Tournament event status
|
||||
MezFesEvent bool // MezFes status
|
||||
MezFesAlt bool // Swaps out Volpakkun for Tokotoko
|
||||
DisableTokenCheck bool // Disables checking login token exists in the DB (security risk!)
|
||||
DisableMailItems bool // Hack to prevent english versions of MHF from crashing
|
||||
QuestDebugTools bool // Enable various quest debug logs
|
||||
SaveDumps SaveDumpOptions
|
||||
HideLoginNotice bool // Hide the Erupe notice on login
|
||||
LoginNotice string // MHFML string of the login notice displayed
|
||||
CleanDB bool // Automatically wipes the DB on server reset.
|
||||
MaxLauncherHR bool // Sets the HR returned in the launcher to HR7 so that you can join non-beginner worlds.
|
||||
LogInboundMessages bool // Log all messages sent to the server
|
||||
LogOutboundMessages bool // Log all messages sent to the clients
|
||||
MaxHexdumpLength int // Maximum number of bytes printed when logs are enabled
|
||||
DivaEvent int // Diva Defense event status
|
||||
FestaEvent int // Hunter's Festa event status
|
||||
TournamentEvent int // VS Tournament event status
|
||||
MezFesEvent bool // MezFes status
|
||||
MezFesAlt bool // Swaps out Volpakkun for Tokotoko
|
||||
DisableTokenCheck bool // Disables checking login token exists in the DB (security risk!)
|
||||
DisableMailItems bool // Hack to prevent english versions of MHF from crashing
|
||||
QuestDebugTools bool // Enable various quest debug logs
|
||||
SaveDumps SaveDumpOptions
|
||||
}
|
||||
|
||||
type SaveDumpOptions struct {
|
||||
|
||||
4
main.go
4
main.go
@@ -119,7 +119,7 @@ func main() {
|
||||
|
||||
// Launcher HTTP server.
|
||||
var launcherServer *launcherserver.Server
|
||||
if config.ErupeConfig.DevMode && config.ErupeConfig.DevModeOptions.EnableLauncherServer {
|
||||
if config.ErupeConfig.Launcher.Enabled {
|
||||
launcherServer = launcherserver.NewServer(
|
||||
&launcherserver.Config{
|
||||
Logger: logger.Named("launcher"),
|
||||
@@ -235,7 +235,7 @@ func main() {
|
||||
entranceServer.Shutdown()
|
||||
}
|
||||
|
||||
if config.ErupeConfig.DevModeOptions.EnableLauncherServer {
|
||||
if config.ErupeConfig.Launcher.Enabled {
|
||||
launcherServer.Shutdown()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user