1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
file_location = "sys/lua/usgn.cfg"
function fileExists(name)
local f=io.open(name,"r")
if f~=nil then
io.close(f)
end
return f~=nil
end
addhook("join","_join")
function _join(id)
if fileExists(file_location.."/"..player(id,"usgn")..".txt") then
print(string.char(169).."255000000"..file_location.." does not exist. Please create it.")
_join2(id)
return 0
end
local num=1
for line in io.lines(file_location) do
if tonumber(line)~=nil then
if player(id,"usgn")==tonumber(line) then
msg(string.char(169).."000255000You were found in the databse! Welcome to the server!")
return 0
end
else
print(string.char(169).."255000000sys/lua/usgn.cfg:"..num.." had a malformed USID, please correct it.")
end
num=num+1
end
end
addhook("second","_second")
function _second(id)
for _,id in pairs(player(0,"table")) do
if not fileExists(file_location.."/"..player(id,"usgn")..".txt") then
timer(5000,"near",id)
end
end
end
function near(id)
parse("kick "..id)
end