I just found out that the soldat documentation is outdated (what a surprise).
Commands like
tempban
are missing.
From what I see there are some issues with the time periods you can enter.
For example:
RESPAWNTIME seconds
TIMELIMIT minutes
MAXRESPAWNTIME seconds
TEMPBAN BAN players name or players number minutes
So adding a time format could help.
There is an
ISO-8601 for time and durations but it looks like this:
P3Y6M4DT12H30M5S or
P0003-06-04T12:30:05P23DT23HI don't think a lot of people would enjoy typing that (have fun with pressing the shift key).
I would extend the w,d,h,m format and use what
quakenet uses for their tempbans but also allow
mo for months:
years y
months M
months mo
weeks w
days d
hours h
minutes m
seconds s
---
number NFormat:
NyNMNwNdNhNmNsor
NyNmoNwNdNhNmNsExamples:
2y3M4w6d7h1m55s (2 years, 3 months, 4 weeks, 6 days, 7 hours, 1 minute, 55 seconds)
2y3mo4w6d7h1m55s (2 years, 3 months, 4 weeks, 6 days, 7 hours, 1 minute, 55 seconds)
3M (3 months)
3mo (3 months)
29m (29 minutes)
2y (2 years)
1h30m (1 hour, 30 minutes)optionally we could adapt it to allow real or floating point numbers:
1/2y or
0.5y or
0,5y for half a year
The
minecraft extension essencials plugin uses tempbans with spaces in quotation marks:
"2y 3mo 4w 6d 7h 1m 55s" (2 years, 3 months, 4 weeks, 6 days, 7 hours, 1 minute, 55 seconds)Since Soldat checks for bans only once a minute, seconds dont't make sense and anything below 1 minute will be ignored (e.g
0.5m).
We could allow banning by seconds and set the default banning time to work second wise so that
/tempban MM 30
would ban for 30 seconds instead of 30 minutes but that would require a less stupid ban check
(it's not really optimized currently).
This would eliminate the "is it a minute or second" issue but then people need to use
30m or something for banning in minutes again.
Since the command parsing need to get refactored anyways I wouldn't mind to do it (a general cleanup and documentation update would be nice).
It will not happen for the next version (maybe the one after that - if we are lucky).
Using
/tempban MM
without a time can be problematic for certain usernames but I setting a default ban time for missing time periods could be helpful.
I think when you write wrong ban times however it should ignore the ban completely (so the default ban time will not be applied in this case).