mirror of
https://github.com/etlegacy/wolfadmin.git
synced 2024-11-29 07:21:54 +00:00
Fixed possible floating point error in command logging
This commit is contained in:
parent
2275d4830f
commit
74b9490433
1 changed files with 2 additions and 2 deletions
|
@ -144,9 +144,9 @@ function commands.log(clientId, command, cmdArguments)
|
|||
|
||||
if victimId then
|
||||
local victimName = players.getName(victimId)
|
||||
logLine = string.format("%3i:%02i: %i: %s: %s: %s: %s: %s: %s: \"%s\"\n", math.floor(levelTime / 60), (levelTime % 60), clientId, clientGUID, clientName, clientFlags, command, victimId, victimName, table.concat(cmdArguments, " ", 2))
|
||||
logLine = string.format("%3i:%02f: %i: %s: %s: %s: %s: %s: %s: \"%s\"\n", math.floor(levelTime / 60), (levelTime % 60), clientId, clientGUID, clientName, clientFlags, command, victimId, victimName, table.concat(cmdArguments, " ", 2))
|
||||
else
|
||||
logLine = string.format("%3i:%02i: %i: %s: %s: %s: %s: \"%s\"\n", math.floor(levelTime / 60), (levelTime % 60), clientId, clientGUID, clientName, clientFlags, command, table.concat(cmdArguments, " "))
|
||||
logLine = string.format("%3i:%02f: %i: %s: %s: %s: %s: \"%s\"\n", math.floor(levelTime / 60), (levelTime % 60), clientId, clientGUID, clientName, clientFlags, command, table.concat(cmdArguments, " "))
|
||||
end
|
||||
|
||||
et.trap_FS_Write(logLine, string.len(logLine), fileDescriptor)
|
||||
|
|
Loading…
Reference in a new issue