mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 03:54:54 +02:00
New module and changes
* Implementing rule violation interface * New popup menu on console text messages * Terminal and Console will no longer history double command/messages
This commit is contained in:
@@ -211,9 +211,11 @@ function Terminal.executeCommand(command)
|
||||
currentHistoryIndex = 0
|
||||
|
||||
-- add new command to history
|
||||
table.insert(commandHistory, command)
|
||||
if #commandHistory > MaxHistory then
|
||||
table.remove(commandHistory, 1)
|
||||
if #commandHistory == 0 or commandHistory[#commandHistory] ~= command then
|
||||
table.insert(commandHistory, command)
|
||||
if #commandHistory > MaxHistory then
|
||||
table.remove(commandHistory, 1)
|
||||
end
|
||||
end
|
||||
|
||||
-- add command line
|
||||
|
Reference in New Issue
Block a user