forgottenserver
forgottenserver copied to clipboard
fix io.write not writing to console after logging a command
Pull Request Prelude
- [x] I have followed proper The Forgotten Server code styling.
- [x] I have read and understood the contribution guidelines before making this PR.
- [x] I am aware that this PR may be closed if the above-mentioned criteria are not fulfilled.
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.
reproduction:
example where it breaks: /reload
add some io.write before and after executing logCommand and it will break
@Zbizu
it should be file:close() not file:close(file)
@Zbizu
it should be file:close() not file:close(file)
Oversight, quite late
I don't think that extra argument changes anything, but yeah correctly it should not be there.