Merge pull request #163 from Cronick/bugfixes

This commit is contained in:
Felix Maier 2016-09-11 15:23:10 +02:00 committed by GitHub
commit 95c64aab1e
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();
});
});