mirror of
https://github.com/WiiLink24/wfc-server.git
synced 2026-03-21 17:44:58 -05:00
Send specific message to clients for invalid versions during log-in
This commit is contained in:
parent
7ea395eec2
commit
4b97228080
|
|
@ -89,7 +89,7 @@ var (
|
|||
ErrLoginBadPackID = MakeGPError(0x010D, "The provided Pack ID was invalid.", true)
|
||||
ErrLoginBadPackVersion = MakeGPError(0x010E, "The provided Pack Version was invalid.", true)
|
||||
ErrLoginBadRegion = MakeGPError(0x0110, "The provided Region was invalid for the provided Pack ID.", true)
|
||||
ErrLoginBadHash = MakeGPError(0x0111, "The hash for the provided Pack ID and Version was invalid.", true)
|
||||
ErrLoginBadHash = GPError{0x0111, "The hash for the provided Pack ID and Version was invalid.", true, WWFCMsgInvalidHash, ""}
|
||||
|
||||
// New user errors
|
||||
ErrNewUser = MakeGPError(0x0200, "There was an error creating a new user.", true)
|
||||
|
|
@ -263,7 +263,7 @@ func (err GPError) GetMessageTranslate(gameName string, region byte, lang byte,
|
|||
|
||||
func (g *GameSpySession) replyError(err GPError) {
|
||||
logging.Error(g.ModuleName, "Reply error:", err.ErrorString)
|
||||
if !g.LoginInfoSet {
|
||||
if !g.LoginInfoSet && err.ErrorCode != ErrLoginBadHash.ErrorCode {
|
||||
msg := err.GetMessage()
|
||||
// logging.Info(g.ModuleName, "Sending error message:", msg)
|
||||
common.SendPacket(ServerName, g.ConnIndex, []byte(msg))
|
||||
|
|
|
|||
14
gpcm/error_messages.go
vendored
14
gpcm/error_messages.go
vendored
|
|
@ -1074,4 +1074,16 @@ var (
|
|||
},
|
||||
}
|
||||
|
||||
)
|
||||
WWFCMsgInvalidHash = WWFCErrorMessage{
|
||||
ErrorCode: 22010,
|
||||
MessageRMC: map[byte]string{
|
||||
LangEnglish: "" +
|
||||
"Invalid pack version!\n" +
|
||||
"Please update or reinstall your pack\n" +
|
||||
"to log in\n" +
|
||||
"\n" +
|
||||
"Error Code: %[1]d",
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ local http_request = require("http.request")
|
|||
local utils = require("./utils")
|
||||
|
||||
local SHEETS_CSV_URL =
|
||||
[[https://docs.google.com/spreadsheets/d/1kas1J6RcIePcaRRxtTluPZm8C8kydpaoQBtRg15M-zM/export?format=tsv&gid=1517055494#gid=1517055494]]
|
||||
[[https://docs.google.com/spreadsheets/d/1kas1J6RcIePcaRRxtTluPZm8C8kydpaoQBtRg15M-zM/export?format=tsv&gid=1517055494#gid=1517055494]]
|
||||
|
||||
local SHEET_LANG_TO_WWFC_LANG = {
|
||||
Japanese = "LangJapanese",
|
||||
|
|
@ -49,6 +49,7 @@ local ORDERED_MESSAGES = {
|
|||
"WWFCMsgProfileIDInUse",
|
||||
"WWFCMsgPayloadInvalid",
|
||||
"WWFCMsgInvalidELO",
|
||||
"WWFCMsgInvalidHash",
|
||||
}
|
||||
|
||||
local ORDERED_LANGUAGES = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user