Repository navigation
Say why the login was refused when the client quits on it - #48
Open
Sosotess93 wants to merge 1 commit into
Open
Sosotess93 wants to merge 1 commit into
Sosotess93 wants to merge 1 commit into
Conversation
On some refusals the client gives no message: for a banned account
(failc 7) it hides its window and exits, and the page was left black.
The port now tells the page the code of every failc it receives, whether
or not the packet log is on, and when the game exits after one the page
shows the reason in a box ("This account is banned. (failc 7)"). Refusals
the client handles itself, such as a wrong password, keep its own message.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #28.
Problem
On some refusals, the client shows nothing. For a banned account (
failc 7) it hides its main window and exits: the port log showsShowWindow ... 0,WinHelpA cmd=2(the VCL's normal shutdown), thenguest ExitProcess(0). There is no message box call to catch, and the page is left black.Refusals the client handles itself are fine. A wrong password (
failc 5), for example, shows the client's own "Your account name or password is incorrect" box and keeps running.Change
rt_port.c: the login-packet hook posts{type: 'login-refused', code}for everyfailcthe client receives, whether or not the packet log is on.index.html: when the game exits after such a refusal, the page shows a "Login refused" box with the reason, for example "This account is banned. (failc 7)". The texts followLoginFailType; an unknown code gets a generic line.Testing
On a local NosCore, with a running ban on the account (a
PenaltyLogrow withPenalty1):failc 7and the page shows "Login refused — This account is banned. (failc 7)" instead of a black screen.NsTeST ...).