mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-02-04 09:15:08 +01:00
add support for multiple login notices
This commit is contained in:
@@ -4,7 +4,9 @@
|
||||
"Language": "en",
|
||||
"DisableSoftCrash": false,
|
||||
"HideLoginNotice": true,
|
||||
"LoginNotice": "<BODY><CENTER><SIZE_3><C_4>Welcome to Erupe SU9.1!<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.",
|
||||
"LoginNotices": [
|
||||
"<BODY><CENTER><SIZE_3><C_4>Welcome to Erupe SU9.2!<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."
|
||||
],
|
||||
"PatchServerManifest": "",
|
||||
"PatchServerFile": "",
|
||||
"ScreenshotAPIURL": "",
|
||||
|
||||
@@ -17,7 +17,7 @@ type Config struct {
|
||||
Language string
|
||||
DisableSoftCrash bool // Disables the 'Press Return to exit' dialog allowing scripts to reboot the server automatically
|
||||
HideLoginNotice bool // Hide the Erupe notice on login
|
||||
LoginNotice string // MHFML string of the login notice displayed
|
||||
LoginNotices []string // MHFML string of the login notices displayed
|
||||
PatchServerManifest string // Manifest patch server override
|
||||
PatchServerFile string // File patch server override
|
||||
ScreenshotAPIURL string // Destination for screenshots uploaded to BBS
|
||||
|
||||
@@ -111,9 +111,10 @@ func (s *Session) makeSignInResp(uid int) []byte {
|
||||
if s.server.erupeConfig.HideLoginNotice {
|
||||
bf.WriteUint8(0)
|
||||
} else {
|
||||
bf.WriteUint8(1) // Notice count
|
||||
noticeText := s.server.erupeConfig.LoginNotice
|
||||
ps.Uint32(bf, noticeText, true)
|
||||
bf.WriteUint8(uint8(len(s.server.erupeConfig.LoginNotices)))
|
||||
for _, notice := range s.server.erupeConfig.LoginNotices {
|
||||
ps.Uint32(bf, notice, true)
|
||||
}
|
||||
}
|
||||
|
||||
bf.WriteUint32(s.server.getLastCID(uid))
|
||||
|
||||
Reference in New Issue
Block a user