05-07-2015, 03:16 AM
I'm working on fixing Core issue #135, and the documentation for FindAndDoWithPlayer seems lacking.
Is it case-sensitive or insensitive?
Is it case-sensitive or insensitive?
Question about FindAndDoWithPlayer
|
05-07-2015, 03:16 AM
I'm working on fixing Core issue #135, and the documentation for FindAndDoWithPlayer seems lacking.
Is it case-sensitive or insensitive?
It's case-insensitive. It uses the RateCompareString function, and that compares each character by making them uppercase first: https://github.com/mc-server/MCServer/bl...s.cpp#L303
Great, thanks for the solution.
Actually, thinking about this problem with plugins in general, I think we need a function DoWithClosestMatchedPlayer. Lots of functions require this and they all implement it slightly differently, inconsistently enough to be annoying to end users. Do you think this is something that we need?
05-07-2015, 03:39 AM
Isn't that what FindAndDoWithPlayer does?
05-07-2015, 04:05 AM
You're right, I read through the code and it does do that.
Then I need to change the documentation, it says that it'll run the callback on all matching players. |
« Next Oldest | Next Newest »
|