mirror of
https://github.com/danbulant/flying-squid
synced 2026-06-18 14:01:13 +00:00
generate an uuidv3 in offline mode, fix #68
This commit is contained in:
parent
fd6e2f97ab
commit
3f0c099c42
2 changed files with 8 additions and 1 deletions
|
|
@ -39,7 +39,8 @@
|
|||
"requireindex": "~1.0.0",
|
||||
"vec3": "0.1.3",
|
||||
"spiralloop": "1.0.2",
|
||||
"node-dir": "~0.1.9"
|
||||
"node-dir": "~0.1.9",
|
||||
"uuid-1345": "~0.99.6"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
|||
|
|
@ -2,12 +2,18 @@ var path = require('path');
|
|||
var requireIndex = require('requireindex');
|
||||
var playerPlugins = requireIndex(path.join(__dirname,'..', 'playerPlugins'));
|
||||
var Player=require("../player");
|
||||
var UUID = require('uuid-1345');
|
||||
|
||||
module.exports = inject;
|
||||
|
||||
function inject(serv,options)
|
||||
{
|
||||
serv._server.on('login', function (client) {
|
||||
if(!options["online-mode"])
|
||||
client.uuid=UUID.v3({
|
||||
namespace: UUID.namespace.dns,
|
||||
name: client.username
|
||||
});
|
||||
var player=new Player();
|
||||
player._client=client;
|
||||
for(var pluginName in playerPlugins) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue