Actually, you can code in a maximum
alias extendmatchtime "sv_cmd rpn /timelimit timelimit 5 add dup 30 sub dup sgn 0.5 mul 0.5 add mul sub def"
It is kind of messy... so I'll explain the parts
timelimit 5 add = timelimit+5
dup 30 sub dup: puts two copies of timelimit+5-30 on the stack
sgn: replaces the topmost copy by -1, 0, 1 depending on sign
0.5 mul 0.5 add: turns the sign into 0, 0.5 or 1
mul: multiplies the changed sign with the other timelimit+5-30 value
sub: subtracts these two
This is best analyzed for the three sign values separately. If the sign is -1:
sv_cmd rpn /timelimit timelimit 5 add dup 30 sub dup sgn 0.5 mul 0.5 add mul sub def
=
sv_cmd rpn /timelimit timelimit 5 add dup 30 sub -1 0.5 mul 0.5 add mul sub def
=
sv_cmd rpn /timelimit timelimit 5 add dup 30 sub 0 mul sub def
=
sv_cmd rpn /timelimit timelimit 5 add 0 sub def
=
sv_cmd rpn /timelimit timelimit 5 add def
If it is +1:
sv_cmd rpn /timelimit timelimit 5 add dup 30 sub dup sgn 0.5 mul 0.5 add mul sub def
=
sv_cmd rpn /timelimit timelimit 5 add dup 30 sub +1 0.5 mul 0.5 add mul sub def
=
sv_cmd rpn /timelimit timelimit 5 add dup 30 sub 1 mul sub def
=
sv_cmd rpn /timelimit timelimit 5 add dup 30 sub sub def
Now what does "x dup 30 sub sub" do?
x
-> dup:
x x
-> 30:
x x 30
-> sub
x x-30
-> sub
x-(x-30) = x-x+30 = 30
So I propose these:
set timelimit_increment 5
set timelimit_decrement 5
set timelimit_min 5
set timelimit_max 30
alias extendmatchtime "sv_cmd rpn /timelimit timelimit timelimit_increment add dup timelimit_max sub dup sgn 0.5 mul 0.5 add mul sub def"
alias reducematchtime "sv_cmd rpn /timelimit timelimit timelimit_decrement sub dup timelimit_min sub dup sgn 0.5 mul 0.5 sub mul add def"
alias endmatch "timelimit -1"
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again
You can vary the number of "MS", so you can clearly see it's MS which is causing it.