Skip to content

Commit c485b0f

Browse files
committed
Tiny tweak
1 parent f56b941 commit c485b0f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

resources/irc/scripts/echo.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ addEventHandler("onGamemodeMapStart",root,
113113
function (res)
114114
outputIRC("12* Map started: "..(getResourceInfo(res, "name") or getResourceName(res)))
115115
local resource = getResourceFromName("mapratings")
116-
if resource and getResourceState(resource) == "running" then
117-
outputIRC("07* Rating: "..exports.mapratings:getMapRating(getResourceName(res)).average or "none")
116+
if resource and getResourceState(resource) == "running" and exports.mapratings:getMapRating(getResourceName(res)) and exports.mapratings:getMapRating(getResourceName(res)).average then
117+
outputIRC("07* Rating: "..exports.mapratings:getMapRating(getResourceName(res)).average)
118118
end
119119
end
120120
)

0 commit comments

Comments
 (0)