I'd venture a guess that SendChat() could be used at times when the player has no world assigned to them (during initial login, or nether portal transport perhaps?) so it tries to determine the last available world really hard.
I've just updated the sources on my desktop, which had been in storage for 8 months:
Code:
Switched to branch 'master'
Your branch is behind 'origin/master' by 997 commits, and can be fast-forwarded.
Almost 1000 commits in 8 months, nice

Oh, wow that's quite allot. Since when do we have the "rebase before merge" policy?
Is the policy mentioned in our global contributing policy?
The page
COMPILING.md should be updated or added to the issues list.
Whats the convention for returning a value and an error code from a function? I've got a function that needs to return whether it succeed, and if it succeeded, what the result was. Should I return a pair, or use a reference parameter to return the value?
Usually we use an out (reference) parameter for the value and return the success indicator.