Cuberite Forum
Authentification plugin - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Plugins (https://forum.cuberite.org/forum-1.html)
+--- Forum: Plugin Requests (https://forum.cuberite.org/forum-3.html)
+--- Thread: Authentification plugin (/thread-16.html)

Pages: 1 2


Authentification plugin - Mastermind - 02-25-2011

Hi everybody , is it possible to make a plugin who player can use a password to stay connected with his Nickname ? ( possibly not in mysql :p plz )


RE: Authentification plugin - Jockie - 02-25-2011

Nope, because it's not possible to kick a player.. yet. oO


RE: Authentification plugin - Mastermind - 02-25-2011

(02-25-2011, 06:05 AM)Jockie Wrote: Nope, because it's not possible to kick a player.. yet. oO

/kick command dosen't work ? ok but you can make an authentification system Smile.


RE: Authentification plugin - Jockie - 02-26-2011

Well, I can, but it's not possible to disallow a player that connects.. yet.. (I hope)

Player:BanPlayer/Player:KickPlayer should be installed. :p

EDIT: Btw.. If you want it non-MySQL, it would be usefull to install a word compiler, like MD5, else you could see everyone's pass.
LUA doesn't normally have MD5 installed.
But you should also need then a XML parser... For saving on a save way. :/


RE: Authentification plugin - FakeTruth - 02-26-2011

(02-26-2011, 12:17 AM)Jockie Wrote: Well, I can, but it's not possible to disallow a player that connects.. yet.. (I hope)
Yes it is Smile
Use the E_PLUGIN_LOGIN hook and the OnLogin( cPacket_Login ) function. Return true to kick the player.

(02-26-2011, 12:17 AM)Jockie Wrote: Player:BanPlayer/Player:KickPlayer should be installed. :p
Yes it should, lol. Better make this my top priority then.

(02-26-2011, 12:17 AM)Jockie Wrote: EDIT: Btw.. If you want it non-MySQL, it would be usefull to install a word compiler, like MD5, else you could see everyone's pass.
LUA doesn't normally have MD5 installed.
But you should also need then a XML parser... For saving on a save way. :/
I already have a md5 hasher for MCServer, just not exposed to Lua yet. I don't see why you'd need an XML parser though, you could use the ini files.


RE: Authentification plugin - Jockie - 02-26-2011

Hm.. So it would look like this by then? oO

Code:
[1]
name=Jockie
pass=thisisnotarealpassword

[2]
name=AnotherRegisteredPlayer
pass=IDontKnow

Also possible. :p


RE: Authentification plugin - Tybor - 02-27-2011

(02-26-2011, 09:27 PM)Jockie Wrote: Hm.. So it would look like this by then? oO

Code:
[1]
name=Jockie
pass=thisisnotarealpassword

[2]
name=AnotherRegisteredPlayer
pass=IDontKnow

Also possible. :p
You even can access the user.ini from MCServer and add a password by plugin.
This way all user information will be stored at same place, which makes administration easier.

greets,
Tybor



RE: Authentification plugin - FakeTruth - 02-27-2011

What Tybor suggests sounds like the smartest thing to do Smile

If you want to use a seperate file, I'd suggest something like this:
Code:
[AuthenticationPlugin]
Username=Password
User1=mypassword
Jockie=12345
etc=etc



RE: Authentification plugin - Tim - 03-01-2011

(02-26-2011, 09:59 AM)FakeTruth Wrote:
(02-26-2011, 12:17 AM)Jockie Wrote: Well, I can, but it's not possible to disallow a player that connects.. yet.. (I hope)
Yes it is Smile
Use the E_PLUGIN_LOGIN hook and the OnLogin( cPacket_Login ) function. Return true to kick the player.

Is that sort of like 'cancelling' the event? If so, does that cancel other events too?Tongue


RE: Authentification plugin - FakeTruth - 03-02-2011

On most (if not all, I think it's all) plugin callbacks you return false to let MCServer do its normal business like nothing ever happened. When you return true you will override default behavior or modify it. When you return true in the OnLogin function MCServer will simply close the connection with the player.