tAuthentication
#1
Star 
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]


Attached Files
.zip   tAuthentication.zip (Size: 1.67 KB / Downloads: 399)
Reply
Thanks given by:
#2
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
Reply
Thanks given by:
#3
this plugin would propably break too with the API change
Reply
Thanks given by:
#4
I can fix up the code if you want.
Reply
Thanks given by:
#5
yes thank youBig Grin
Reply
Thanks given by:
#6
Fixed it up so it should work with the new API, but I have school so I couldn't test.


Attached Files
.zip   tAuthentication.zip (Size: 3.16 KB / Downloads: 299)
Reply
Thanks given by: NiLSPACE
#7
thanks ;D would you mind if i post this version at the main post?
Reply
Thanks given by:
#8
Nope. Use if for whatever you want Smile
Reply
Thanks given by:
#9
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
Reply
Thanks given by:
#10
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
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)