mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-11-14 19:04:59 -05:00
fix case hole in onlineModeExceptions
This commit is contained in:
parent
5cc7a8fbee
commit
acccaeefeb
2 changed files with 4 additions and 2 deletions
|
@ -119,6 +119,8 @@ Returns a `Server` instance and starts listening.
|
|||
This is a plain old JavaScript object. Add a key with the username you want to
|
||||
be exempt from online mode or offline mode (whatever mode the server is in).
|
||||
|
||||
Make sure the entries in this object are all lower case.
|
||||
|
||||
#### server.maxPlayers
|
||||
|
||||
### Not Immediately Obvious Data Type Formats
|
||||
|
|
4
index.js
4
index.js
|
@ -103,7 +103,7 @@ function createServer(options) {
|
|||
|
||||
function onHandshake(packet) {
|
||||
client.username = packet.username;
|
||||
var isException = !!server.onlineModeExceptions[client.username];
|
||||
var isException = !!server.onlineModeExceptions[client.username.toLowerCase()];
|
||||
var needToVerify = (onlineMode && ! isException) || (! onlineMode && isException);
|
||||
var serverId;
|
||||
if (needToVerify) {
|
||||
|
@ -148,7 +148,7 @@ function createServer(options) {
|
|||
});
|
||||
client.encryptionEnabled = true;
|
||||
|
||||
var isException = !!server.onlineModeExceptions[client.username];
|
||||
var isException = !!server.onlineModeExceptions[client.username.toLowerCase()];
|
||||
var needToVerify = (onlineMode && ! isException) || (! onlineMode && isException);
|
||||
var nextStep = needToVerify ? verifyUsername : loginClient;
|
||||
nextStep();
|
||||
|
|
Loading…
Reference in a new issue