Cuberite Forum
tAuthentication - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Plugins (https://forum.cuberite.org/forum-1.html)
+--- Forum: Plugin Releases (https://forum.cuberite.org/forum-2.html)
+---- Forum: Archived Plugins (https://forum.cuberite.org/forum-18.html)
+---- Thread: tAuthentication (/thread-668.html)

Pages: 1 2 3 4 5


tAuthentication - NiLSPACE - 12-28-2012

Thugie made this plugin for me but he is not developing it anymore becouse he doesn't has the time. There are some bugs in it however. I asked him if i may upload it so other people can have a look at it. So a big thanks to Thugie first for creating it Smile

Features:
  • /login
  • /register
  • Username changes to Guest(number) if that player isn't logged in
  • Disable all block placement/digging.
  • Kick everyone when the server reloads
  • Kick a player when there is already someone with the same username
  • MD5 encryption

Bugs:
  • User char stays Guest(number)
  • in the Minecraft player list (tab key) there is a Guest(number) + real char
  • server saves the Guest(number) coordinates, so you can randomly spawn elsewhere when the server reloads. (the Guest(numbers) get reset if you reload)

Installation
  • unzip tAuthentication.zip.
  • copy the folder to the Plugins folder.
  • add a Guest rank in the groups.ini with at least auth.register and auth.login as permissions.
  • Add NewPlugin=tAuthentication to the settings.ini
  • PROFIT!!

Download R1163+[attachment=200]


RE: tAuthentication - NiLSPACE - 12-29-2012

Quote:server saves the Guest(number) coordinates, so you can randomly spawn elsewhere when the server reloads. (the Guest(numbers) get reset if you reload)
it should be pretty easy to fix because the server creates a .json file, so if you don't let it create that OR just delete it afterwards it should be fixed


RE: tAuthentication - NiLSPACE - 01-08-2013

this plugin would propably break too with the API change


RE: tAuthentication - bearbin - 01-08-2013

I can fix up the code if you want.


RE: tAuthentication - NiLSPACE - 01-08-2013

yes thank youBig Grin


RE: tAuthentication - bearbin - 01-08-2013

Fixed it up so it should work with the new API, but I have school so I couldn't test.


RE: tAuthentication - NiLSPACE - 01-09-2013

thanks ;D would you mind if i post this version at the main post?


RE: tAuthentication - bearbin - 01-09-2013

Nope. Use if for whatever you want Smile


RE: tAuthentication - NiLSPACE - 01-27-2013

i'm now trying to make it so you can't get hurt if you didn't login and it turns out realy good exept that i don't know how to disable fall damage and hunger damage. the mob and player damage is already done.
i added this for the mob and player damage:
function OnTakeDamage(Receiver, TDI)
	-- log the damage to server log:
	LOG("Damage: Raw ".. TDI.RawDamage .. ", Final:" .. TDI.FinalDamage)
 
	if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cSpider")) then 
		TDI.FinalDamage = 0 	
	end
	if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cZombie")) then
		TDI.FinalDamage = 0
	end
	if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cCreeper")) then
		TDI.FinalDamage = 0
	end
	if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cSkeleton")) then
		TDI.FinalDamage = 0
	end
	if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cCavespider")) then
		TDI.FinalDamage = 0
	end
	if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cBlaze")) then
		TDI.FinalDamage = 0
	end
	if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cEnderman")) then
		TDI.FinalDamage = 0
	end
	if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cGhast")) then
		TDI.FinalDamage = 0
	end
	if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cMagmacube")) then
		TDI.FinalDamage = 0
	end
	if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cSilverfish")) then
		TDI.FinalDamage = 0
	end
	if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cSlime")) then
		TDI.FinalDamage = 0
	end
	if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cWitch")) then
		TDI.FinalDamage = 0
	end
	if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cZombiepigman")) then
		TDI.FinalDamage = 0
	end
	if ((TDI.Attacker ~= nil) and TDI.Attacker:IsA("cPlayer")) then
		TDI.FinalDamage = 0
	end
end



RE: tAuthentication - bearbin - 01-27-2013

I recommend adding a return after each TDI.FinalDamage so it doesn't have to check every one if it is one.

Also, this does no checking if the player is authenticated.

Why dont you just do :
ontakedamage()
if isplayerauthenticated(reciever.name) then
TDI.FinalDamage = 0
end
return