Ticket #3396: clearChat.patch
File clearChat.patch, 1.8 KB (added by , 8 years ago) |
---|
-
binaries/data/mods/public/gui/common/network.js
84 84 if (!Engine.KickPlayer(argument, true)) 85 85 addChatMessage({ "type": "system", "text": sprintf(translate("Could not ban %(name)s."), { "name": argument }) }); 86 86 return true; 87 case "/clear": 88 clearChatMessages(); 89 return true; 87 90 } 88 91 return false; 89 92 } -
binaries/data/mods/public/gui/gamesetup/gamesetup.js
1751 1751 Engine.SendNetworkChat(text); 1752 1752 } 1753 1753 1754 function clearChatMessages(){ 1755 g_ChatMessages.length = 0; 1756 Engine.GetGUIObjectByName("chatText").caption = g_ChatMessages.join("\n"); 1757 } 1758 1754 1759 function addChatMessage(msg) 1755 1760 { 1756 1761 var username = ""; -
binaries/data/mods/public/gui/lobby/lobby.js
688 688 case "quit": 689 689 returnToMainMenu(); 690 690 break; 691 case "clear": 692 clearChatMessages(); 693 break; 691 694 case "say": 692 695 case "me": 693 696 return false; … … 701 704 } 702 705 703 706 /** 707 * Blank the chat history 708 */ 709 function clearChatMessages(){ 710 g_ChatMessages.length = 0; 711 Engine.GetGUIObjectByName("chatText").caption = g_ChatMessages.join("\n"); 712 } 713 714 /** 704 715 * Process and if appropriate, display a formatted message. 705 716 * 706 717 * @param msg {Object} - The message to be processed.