- Added cfg.js, .save & npm-debug.* to .gitignore
- Updated .help from clients -> players
- Fixed MySQL related bug, when new player join
(https://vgy.me/bh2ooq.png)
This commit is contained in:
Cronick 2016-09-11 14:25:09 +02:00
parent f9832072ce
commit 6fd74314c2
4 changed files with 6 additions and 3 deletions

3
.gitignore vendored
View File

@ -2,3 +2,6 @@ node_modules/
scripts/
data/
logs/
cfg.js
.save
npm-debug.*

2
.help
View File

@ -1,4 +1,4 @@
clients : How many players are connected
players : How many players are connected
exit : Exit the server
update : Update the server
kick [Username] : Kick player by username

View File

@ -1,5 +1,5 @@
id int(11) NOT NULL AUTO_INCREMENT,
username varchar(16) NOT NULL,
username varchar(16) NOT NULL DEFAULT '',
email varchar(32) NOT NULL,
exp int(11) NOT NULL,
level smallint(11) NOT NULL,

View File

@ -91,7 +91,7 @@ export function playerIsRegistered(email) {
export function registerPlayer(player) {
return new Promise((resolve) => {
this.db.query(`INSERT INTO ${CFG.MYSQL_USERS_TABLE} SET email=? `, [player.email], (e, res) => {
if (e) return this.print(e, 31);
if (e) return print(e, 31);
resolve();
});
});