Skip to content

Commit e942bc0

Browse files
Added uniform cache messages
1 parent 06ce028 commit e942bc0

File tree

9 files changed

+11
-10
lines changed

9 files changed

+11
-10
lines changed

UCDaccounts/accountData.slua

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function cacheDatabase(qh)
1717
end
1818
end
1919
end
20-
outputDebugString("Accounts successfully cached!")
20+
outputDebugString("["..tostring(getThisResource().name).."] Accounts successfully cached!")
2121
end
2222

2323
-- The equivalent of setAccountData

UCDadmin/adminTable.lua

+1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ function createAdminTable(qh)
2222
sendPermissions(plr)
2323
end
2424
end
25+
outputDebugString("["..tostring(getThisResource().name).."] Admins successfully cached!")
2526
end

UCDadmin/punishments/ban.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ addEventHandler("onResourceStart", resourceRoot,
99
)
1010

1111
function cacheBans(qh)
12-
local result = qh:poll(-1)
12+
local result = qh:poll(0)
1313
for _, ent in ipairs(result) do
1414
table.insert(bans, {ent.val, ent.reason, ent.banisher, ent.datum, ent.duration})
1515
end
16+
outputDebugString("["..tostring(getThisResource().name).."] Bans successfully cached!")
1617
end
1718

1819
function removePlayer(plr)

UCDadmin/punishments/mutes.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function cacheMutes(qh)
1717
triggerEvent("UCDadmin.onPlayerMute", plr)
1818
end
1919
end
20-
print("Mutes successfully cached!")
20+
outputDebugString("["..tostring(getThisResource().name).."] Mutes successfully cached!")
2121
end
2222

2323
addEventHandler("onPlayerLogin", root,

UCDadmin/punishments/punishments.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function cachePunishments(qh)
1313
for _, data in ipairs(result) do
1414
table.insert(punishments, {data.val, data.datum, data.duration, data.serial, data.who, data.reason, data.log, tonumber(data.active)})
1515
end
16-
print("Punishments successfully cached!")
16+
outputDebugString("["..tostring(getThisResource().name).."] Punishments successfully cached!")
1717
end
1818

1919
addEventHandler("onPlayerLogin", root,

UCDbuilder/zones_s.lua

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ function cacheZones(qh)
2626

2727
authorizedToBuild[i] = fromJSON(data.authorized)
2828
end
29+
outputDebugString("["..tostring(getThisResource().name).."] Zones successfully cached!")
2930
end
3031

3132
function onEnterZone(ele, matchingDim)

UCDhousing/housingData_s.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function createHouses(queryHandle)
7777
-- Cache first, create later
7878
createHouse(v.houseID, v)
7979
end
80-
outputDebugString("[UCDhousing] Created and cached all houses!")
80+
outputDebugString("["..tostring(getThisResource().name).."] Houses successfully cached!")
8181
end
8282

8383
--[[

UCDstocks/server.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ function cacheStocks(qh)
2222
end
2323
end
2424
end
25-
outputDebugString("Stocks successfully cached!")
2625
db:query(cacheShareholders, {}, "SELECT * FROM `stocks__holders`")
2726
end
2827

@@ -44,6 +43,7 @@ function cacheShares(result)
4443
end
4544
shares[row.account][row.acronym] = row.amount
4645
end
46+
outputDebugString("["..tostring(getThisResource().name).."] Stocks successfully cached!")
4747
end
4848

4949
function getStockPrice(stockName)

UCDvehicles/vehicleData.slua

+2-4
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ addEventHandler("onResourceStart", resourceRoot,
1717
)
1818

1919
function cacheVehicles(qh)
20-
local result = qh:poll(-1)
21-
20+
local result = qh:poll(0)
2221
for _, row in pairs(result) do
2322
vehicles[row.vehicleID] = {}
2423
for column, value in pairs(row) do
@@ -27,8 +26,7 @@ function cacheVehicles(qh)
2726
end
2827
end
2928
end
30-
31-
outputDebugString("Vehicles successfully cached!")
29+
outputDebugString("["..tostring(getThisResource().name).."] Vehicles successfully cached!")
3230
end
3331

3432
function setVehicleData(vehicleID, column, data)

0 commit comments

Comments
 (0)