multitheftauto / mtasa-resources

This project maintains a list of up-to-date resources that come with Multi Theft Auto.
https://multitheftauto.com
MIT License
151 stars 151 forks source link

admin2: Remove redundant serial check. #378

Closed ds1-e closed 2 years ago

ds1-e commented 2 years ago

Same as in here.

ArranTuna commented 2 years ago

It stops you entering an invalid length serial how is this redundant?

ds1-e commented 2 years ago

@ArranTuna how it can stop it if the function doesn't exist there? obraz

Anyways it's my overlook, because this check was present in admin during player join, see mentioned PR.

ArranTuna commented 2 years ago

Ok so yeah it's not in admin2 but it's in admin so really shouldn't you have made a PR to add

local serialExp = "^" .. string.rep ( "[A-F0-9]", 32 ) .. "$"
function isValidSerial ( serial )
    return serial:match ( serialExp )
end

to admin2 instead of removing it from admin and admin2?

ds1-e commented 2 years ago

The whole discussion was about removing it from admin, because it was confirmed that serial check (during player join) was redundant, because MTA AC will take care of it anyway (serial manipulating). I've mentioned before that it was my overlook in admin2, I guess it can be added for both admins in separate PRs (feel free to do so). So possibly i might close those two PRs and leave the function at least in (#377) (for serial ban check).