Skip to content

Commit

Permalink
fixed crash if message is not set, also changed name to hadar_levelRe…
Browse files Browse the repository at this point in the history
…port
  • Loading branch information
zzyzzyzzx committed Jun 15, 2020
1 parent 1c06f50 commit 6322d10
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions LevelReport/Hadars_LevelReport.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<muclient>
<plugin
name="LevelReport"
name="Hadar_LevelReport"
author="Hadar"
id="1a36da4e764254b16bd1e33f"
language="Lua"
Expand Down Expand Up @@ -356,7 +356,11 @@ require "serialize"
leveltable = {}
function interp(s, tab)
return (s:gsub('($%b{})', function(w) return tab[w:sub(3, -2)] or w end))
if s == nil then
hadarerror("@RYou forgot to fill in a message please use @Clevel help@R and run the message commands to see which one.")
else
return (s:gsub('($%b{})', function(w) return tab[w:sub(3, -2)] or w end))
end
end
function gmcp(what) --pulled from gmcp helper, lets see if fixes older version
Expand Down Expand Up @@ -952,6 +956,11 @@ mylevelreport.Data = interp(LevelReportVariables.levelmessage, {level = level, h
end
function hadarerror(str)
AnsiNote(stylesToANSI(ColoursToStyles(str)))
end
----------------------------------------------------------------------------------------------------
-- End hadarlua stuff --
-- --
Expand Down
Binary file modified LevelReport/Hadars_LevelReport.zip
Binary file not shown.

0 comments on commit 6322d10

Please sign in to comment.