forgottenserver icon indicating copy to clipboard operation
forgottenserver copied to clipboard

fix io.write not writing to console after logging a command

Open Zbizu opened this issue 3 years ago • 1 comments

Pull Request Prelude

Changes Proposed

io.output is the function that changes default Lua output. Redirecting it to log file breaks io.write globally. This PR changes logCommand to work intended way without breaking anything.

Zbizu avatar Sep 17 '22 21:09 Zbizu

reproduction: example where it breaks: /reload add some io.write before and after executing logCommand and it will break

Zbizu avatar Sep 17 '22 21:09 Zbizu

@Zbizu

it should be file:close() not file:close(file)

conde2 avatar Sep 24 '22 18:09 conde2

@Zbizu

it should be file:close() not file:close(file)

Oversight, quite late

Zbizu avatar Sep 25 '22 10:09 Zbizu

I don't think that extra argument changes anything, but yeah correctly it should not be there.

nekiro avatar Sep 26 '22 15:09 nekiro