-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed banning for death in hardcore mode.
Fixes #159.
- Loading branch information
Showing
4 changed files
with
28 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
-- onkilling.lua | ||
|
||
-- Implements the OnKilling hook handler that effectively implements the hardcore mode of the server | ||
|
||
|
||
|
||
|
||
|
||
--- Handler for the HOOK_KILLING hook | ||
-- If the server is in hardcore mode, bans the killed player | ||
function OnKilling(a_Victim, a_Killer) | ||
if (a_Victim:IsPlayer()) then | ||
if (cRoot:Get():GetServer():IsHardcore()) then | ||
AddPlayerToBanlist(a_Victim:GetName(), "Killed in hardcore mode", "Server-Core") | ||
end | ||
end | ||
|
||
return false | ||
end | ||
|
||
|
||
|
||
|