Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

Commit

Permalink
import
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay committed Jun 26, 2020
0 parents commit 1a5ced8
Show file tree
Hide file tree
Showing 6 changed files with 117 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/luacheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: luacheck

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: apt
run: sudo apt-get install -y luarocks
- name: luacheck install
run: luarocks install --local luacheck
- name: luacheck run
run: $HOME/.luarocks/bin/luacheck ./
17 changes: 17 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
allow_defined_top = true

globals = {
"monitoring",
"minetest"
}

read_globals = {
-- Stdlib
string = {fields = {"split"}},
table = {fields = {"copy", "getn"}},

-- Minetest
"vector", "ItemStack",
"dump"

}
10 changes: 10 additions & 0 deletions init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

print("[monitoring] protection extension loaded")


monitoring.wrap_global({"minetest", "is_protected"}, "is_protected")





56 changes: 56 additions & 0 deletions license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
License of source code
----------------------

The MIT License (MIT)
Copyright (C) 2018-2019 Thomas Rudin

Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

For more details:
https://opensource.org/licenses/MIT


Licenses of media (textures)
----------------------------

Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
Copyright (C) 2019 Thomas Rudin

You are free to:
Share — copy and redistribute the material in any medium or format.
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.

Under the following terms:

Attribution — You must give appropriate credit, provide a link to the license, and
indicate if changes were made. You may do so in any reasonable manner, but not in any way
that suggests the licensor endorses you or your use.

ShareAlike — If you remix, transform, or build upon the material, you must distribute
your contributions under the same license as the original.

No additional restrictions — You may not apply legal terms or technological measures that
legally restrict others from doing anything the license permits.

Notices:

You do not have to comply with the license for elements of the material in the public
domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary
for your intended use. For example, other rights such as publicity, privacy, or moral
rights may limit how you use the material.
3 changes: 3 additions & 0 deletions mod.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name = monitoring_protection
depends = monitoring
optional_depends = protector_redo, protector, priv_protector, areas, xp_redo
14 changes: 14 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

# Monitoring extension for protectors

Base-mod: https://github.com/thomasrudin-mt/monitoring

# Metrics

* **is_protected_count** number of is_protected calls
* **is_protected_time** time usage of is_protected calls


# License

MIT

0 comments on commit 1a5ced8

Please sign in to comment.