timed actions -1 second
EvilOlaf opened this issue · 16 comments
Sometimes when I do a temporary action like tempmute
or tempban
and the time is - lets say - two hours (2h
) the message shows 1 hour 59 minutes 59 seconds
which is pretty annoying if you try to format those messages in a complete different way than usual.
Why does BM not take the time given directly from the command for the message?
This issue existing since BM4 when I remember correctly.
BM 5.7.1
This probably has to do with the fact that the time you enter is parsed and then transformed, after the async worker is done, instead of directly taking your input. I personally find this annoying too, and would like to have it changed.
This also caused bans that ocurred before the summer clock time change to add 1 hour to the ban, making it look even weirder.
As @Kakifrucht said, it's to do with the asynchronous nature of BM. By the time the ban is entered into the database etc, time has progressed since the time the command was ran. This makes it a little difficult to fix, as it's currently performing as intended.
Couldn't you just format the input string and display it to the sender rather? So when you enter /tempmute johndoe 2h #reason
it will actually mute him for 1 hour 59 minutes 59 seconds
but tell the sender 2 hours
.
I am not really deep into Java, honestly not really at all but as far as my technical understanding should not it should be possible to get the time diff argument from the command and put it to a variable and when the async worker finished use this variable to build the message string that will be shown ingame from it?
Please correct me if I am totally wrong :)
This may have been fixed with the fix for #497
Uuuuhh that might be so awesome.
I'll start testing for this as soon as it gets officially released to the next version.
[08:09:08 INFO]: confuser has been temporarily banned for 2 days by Console for Testing a
tempban confuser 2h Tes
[08:09:27 INFO]: confuser has been temporarily banned for 2 hours by Console for Tes
tempban confuser 30d test
[08:10:05 INFO]: confuser has been temporarily banned for 1 month by Console for test
Unfortunately I can't seem to replicate this locally
No idea if something has been changed that could be related. If not, sorry for the bump.
for 4 weeks 1 day 23 hours 59 minutes 59 seconds
Supposed to be 30 days or calculated in BM four weeks and two days.
Try to replicate it ingame and with cpu load.
I can confirm this issue. I'm opening an related issue for the wrong backwards calculation.
Should be fixed with #676
Still an issue. Just banned someone for 1 day and got "23 hours, 59 minutes and 59 seconds".