Don't apply message prefixes to messages with empty name

This commit is contained in:
Kamil Chojnowski 2019-01-05 18:14:38 +01:00
parent 07b4b785fc
commit b8228ac6eb
1 changed files with 4 additions and 4 deletions

View File

@ -684,7 +684,7 @@ function addTabText(text, speaktype, tab, creatureName)
child:setSelection(string.len(child:getText()), textPos)
end
end
return true
end
@ -857,14 +857,14 @@ function sendMessage(message, tab)
message = chatCommandMessage
channel = 0
end
-- player red talk on channel
chatCommandMessage = message:match("^%#[c|C] (.*)")
if chatCommandMessage ~= nil then
chatCommandSayMode = 'channelRed'
message = chatCommandMessage
end
-- player broadcast
chatCommandMessage = message:match("^%#[b|B] (.*)")
if chatCommandMessage ~= nil then
@ -978,7 +978,7 @@ function navigateMessageHistory(step)
end
function applyMessagePrefixies(name, level, message)
if name then
if name and #name > 0 then
if modules.client_options.getOption('showLevelsInConsole') and level > 0 then
message = name .. ' [' .. level .. ']: ' .. message
else