Browse Source

Don't apply message prefixes to messages with empty name

Kamil Chojnowski 1 year ago
parent
commit
b8228ac6eb
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      modules/game_console/console.lua

+ 4
- 4
modules/game_console/console.lua View File

@@ -684,7 +684,7 @@ function addTabText(text, speaktype, tab, creatureName)
684 684
         child:setSelection(string.len(child:getText()), textPos)
685 685
       end
686 686
     end
687
-    
687
+
688 688
     return true
689 689
   end
690 690
 
@@ -857,14 +857,14 @@ function sendMessage(message, tab)
857 857
     message = chatCommandMessage
858 858
     channel = 0
859 859
   end
860
-  
860
+
861 861
   -- player red talk on channel
862 862
   chatCommandMessage = message:match("^%#[c|C] (.*)")
863 863
   if chatCommandMessage ~= nil then
864 864
     chatCommandSayMode = 'channelRed'
865 865
     message = chatCommandMessage
866 866
   end
867
-  
867
+
868 868
   -- player broadcast
869 869
   chatCommandMessage = message:match("^%#[b|B] (.*)")
870 870
   if chatCommandMessage ~= nil then
@@ -978,7 +978,7 @@ function navigateMessageHistory(step)
978 978
 end
979 979
 
980 980
 function applyMessagePrefixies(name, level, message)
981
-  if name then
981
+  if name and #name > 0 then
982 982
     if modules.client_options.getOption('showLevelsInConsole') and level > 0 then
983 983
       message = name .. ' [' .. level .. ']: ' .. message
984 984
     else

Loading…
Cancel
Save