From 38f06a8df0a8accefedbd1b10e5a22f9ae2b13a2 Mon Sep 17 00:00:00 2001 From: Brandon Date: Sat, 22 Feb 2014 14:30:33 -0600 Subject: add time options for who to ban and damage --- functions.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'functions.lua') diff --git a/functions.lua b/functions.lua index 92cad80..839c814 100644 --- a/functions.lua +++ b/functions.lua @@ -44,11 +44,18 @@ function landrush.get_owner(pos) end function landrush.get_distance(pos1,pos2) - if ( pos1 ~= nil and pos2 ~= nil ) then return math.abs(math.floor(math.sqrt( (pos1.x - pos2.x)^2 + (pos1.z - pos2.z)^2 ))) else return 0 end +end +function landrush.get_timeonline(name) + -- a wrapper for whoison.getTimeOnline since whoison is an optional dependancy + if ( landrush.whoison == true ) then + return (whoison.getTimeOnline(name) / 60) + else + return -1 + end end -- cgit v1.2.3