[Under construction] Auth plugin - Printable Version +- Cuberite Forum (https://forum.cuberite.org) +-- Forum: Plugins (https://forum.cuberite.org/forum-1.html) +--- Forum: Plugin Discussion (https://forum.cuberite.org/forum-8.html) +--- Thread: [Under construction] Auth plugin (/thread-152.html) Pages:
1
2
|
[Under construction] Auth plugin - Zehir - 06-01-2011 Hello, I work on auth plugin (looklike xAuth plugin for bukkit) Works: /register /changepass Block player move To do: /login RE: Auth plugin - FakeTruth - 06-01-2011 Read this page (just created it) http://mc-server.org/wiki/doku.php?id=api:plugin:onlogin And check out the Core plugin for an example. RE: Auth plugin - Zehir - 06-02-2011 Could you install the md5 Library for crypt the password? http://www.keplerproject.org/md5/index.html RE: Auth plugin - FakeTruth - 06-02-2011 I already have a MD5 encryption script in MCServer, but it's not open to Lua yet... I'll try to include it in next release. In the meanwhile I think you can test your plugin without encryption RE: Auth plugin - Zehir - 06-02-2011 Yes, for moment I have my crypt function PHP Code: function AuthPluginCrypt(Password) Found my first bug but I dont now how to solve it PHP Code: self:AddCommand("/changepass", " - [Old Password] [New Password] - Change pass", "auth.changepass") -- Commande pour changer de mot de pass (commun) Product this with /help 3 Auth /changepass - [Old Password] [New Password] - Change pass Auth /test /register - [Password] - Login with the password An idea to fhix that? RE: [Under construction] Auth plugin - FakeTruth - 06-02-2011 Hmm.. so you get 'Auth' twice in /help ? Sounds like a bug in the /help command of Core. Nothing you have to worry about. RE: [Under construction] Auth plugin - Zehir - 06-02-2011 Could you make the doc for OnDisconnect please? And I have send the screenshot for /help Another problem... PHP Code: local PlayerName = Player:GetName() Transfrome my Ini file: Code: [Zehir_] Code: [Zehir_] RE: [Under construction] Auth plugin - FakeTruth - 06-02-2011 Thanks for the screenshot. About your ini problem, make sure you only ReadFile() ONCE: Code: UsersIni = cIniFile("myIni.ini") Code: UsersIni = cIniFile("myIni.ini") Here's the page for OnDisconnect: http://www.mc-server.org/wiki/doku.php?id=api:plugin:ondisconnect RE: [Under construction] Auth plugin - Zehir - 06-02-2011 What is this fuction for ini files? Erase(); Clear(); Reset(); Edit: Solve problem with change local values function AuthPlugin:OnPlayerMove( Player ) Can you change your function to detect the displacement of a block and not 0.00000001 bloc? Because this spam my channel of PHP Code: Player:SendMessage( cChatColor.Red .. "You must login" ) Because I want block movement if player not login PHP Code: function AuthPlugin:OnPlayerMove( Player ) RE: [Under construction] Auth plugin - Zehir - 06-04-2011 Oh to use this fuction? AddKeyName I have try this but not work: PHP Code: local UsersIni = cIniFile("users.ini") I just want add the key if not exist Code: [Playername] |