Authentification plugin
#1
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 )
Reply
Thanks given by:
#2
Nope, because it's not possible to kick a player.. yet. oO
Reply
Thanks given by:
#3
(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.
Reply
Thanks given by:
#4
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. :/
Reply
Thanks given by:
#5
(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.
Reply
Thanks given by:
#6
Hm.. So it would look like this by then? oO

Code:
[1]
name=Jockie
pass=thisisnotarealpassword

[2]
name=AnotherRegisteredPlayer
pass=IDontKnow

Also possible. :p
Reply
Thanks given by:
#7
(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
Reply
Thanks given by:
#8
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
Reply
Thanks given by:
#9
(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
Reply
Thanks given by:
#10
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.
Reply
Thanks given by:




Users browsing this thread: 7 Guest(s)